@@ -432,7 +432,7 @@ pub mod ciarlet {
432432 }
433433 }
434434
435- pub fn ciarlet_element_tabulate <
435+ pub unsafe fn ciarlet_element_tabulate <
436436 E : FiniteElement < CellType = ReferenceCellType > ,
437437 TGeo : RlstScalar ,
438438 > (
@@ -461,29 +461,33 @@ pub mod ciarlet {
461461 gen_type( name = "maptype" , replace_with = [ "IdentityMap" , "CovariantPiolaMap" , "ContravariantPiolaMap" ] ) ,
462462 field( arg = 0 , name = "element" , wrapper = "CiarletElementT" , replace_with = [ "CiarletElement<{{dtype}}, {{maptype}}>" ] ) ,
463463 ) ]
464- pub fn ciarlet_element_tabulate_f32 < E : FiniteElement < CellType = ReferenceCellType > > (
464+ pub unsafe fn ciarlet_element_tabulate_f32 < E : FiniteElement < CellType = ReferenceCellType > > (
465465 element : & E ,
466466 points : * const f32 ,
467467 npoints : usize ,
468468 nderivs : usize ,
469469 data : * mut c_void ,
470470 ) {
471- ciarlet_element_tabulate ( element, points, npoints, nderivs, data) ;
471+ unsafe {
472+ ciarlet_element_tabulate ( element, points, npoints, nderivs, data) ;
473+ }
472474 }
473475
474476 #[ concretise_types(
475477 gen_type( name = "dtype" , replace_with = [ "f32" , "f64" , "c32" , "c64" ] ) ,
476478 gen_type( name = "maptype" , replace_with = [ "IdentityMap" , "CovariantPiolaMap" , "ContravariantPiolaMap" ] ) ,
477479 field( arg = 0 , name = "element" , wrapper = "CiarletElementT" , replace_with = [ "CiarletElement<{{dtype}}, {{maptype}}>" ] ) ,
478480 ) ]
479- pub fn ciarlet_element_tabulate_f64 < E : FiniteElement < CellType = ReferenceCellType > > (
481+ pub unsafe fn ciarlet_element_tabulate_f64 < E : FiniteElement < CellType = ReferenceCellType > > (
480482 element : & E ,
481483 points : * const f64 ,
482484 npoints : usize ,
483485 nderivs : usize ,
484486 data : * mut c_void ,
485487 ) {
486- ciarlet_element_tabulate ( element, points, npoints, nderivs, data) ;
488+ unsafe {
489+ ciarlet_element_tabulate ( element, points, npoints, nderivs, data) ;
490+ }
487491 }
488492
489493 #[ concretise_types(
@@ -558,7 +562,8 @@ pub mod ciarlet {
558562 }
559563 }
560564
561- pub fn ciarlet_element_push_forward <
565+ #[ allow( clippy:: too_many_arguments) ]
566+ pub unsafe fn ciarlet_element_push_forward <
562567 E : MappedFiniteElement < CellType = ReferenceCellType > ,
563568 TGeo : RlstScalar ,
564569 > (
@@ -620,7 +625,7 @@ pub mod ciarlet {
620625 gen_type( name = "maptype" , replace_with = [ "IdentityMap" , "CovariantPiolaMap" , "ContravariantPiolaMap" ] ) ,
621626 field( arg = 0 , name = "element" , wrapper = "CiarletElementT" , replace_with = [ "CiarletElement<{{dtype}}, {{maptype}}>" ] )
622627 ) ]
623- pub fn ciarlet_element_push_forward_f32 <
628+ pub unsafe fn ciarlet_element_push_forward_f32 <
624629 E : MappedFiniteElement < CellType = ReferenceCellType > ,
625630 > (
626631 element : & E ,
@@ -634,18 +639,20 @@ pub mod ciarlet {
634639 jinv : * const f32 ,
635640 physical_values : * mut c_void ,
636641 ) {
637- ciarlet_element_push_forward (
638- element,
639- npoints,
640- nfunctions,
641- gdim,
642- reference_values,
643- nderivs,
644- j,
645- jdet,
646- jinv,
647- physical_values,
648- ) ;
642+ unsafe {
643+ ciarlet_element_push_forward (
644+ element,
645+ npoints,
646+ nfunctions,
647+ gdim,
648+ reference_values,
649+ nderivs,
650+ j,
651+ jdet,
652+ jinv,
653+ physical_values,
654+ ) ;
655+ }
649656 }
650657
651658 #[ allow( clippy:: too_many_arguments) ]
@@ -654,7 +661,7 @@ pub mod ciarlet {
654661 gen_type( name = "maptype" , replace_with = [ "IdentityMap" , "CovariantPiolaMap" , "ContravariantPiolaMap" ] ) ,
655662 field( arg = 0 , name = "element" , wrapper = "CiarletElementT" , replace_with = [ "CiarletElement<{{dtype}}, {{maptype}}>" ] )
656663 ) ]
657- pub fn ciarlet_element_push_forward_f64 <
664+ pub unsafe fn ciarlet_element_push_forward_f64 <
658665 E : MappedFiniteElement < CellType = ReferenceCellType > ,
659666 > (
660667 element : & E ,
@@ -668,21 +675,24 @@ pub mod ciarlet {
668675 jinv : * const f64 ,
669676 physical_values : * mut c_void ,
670677 ) {
671- ciarlet_element_push_forward (
672- element,
673- npoints,
674- nfunctions,
675- gdim,
676- reference_values,
677- nderivs,
678- j,
679- jdet,
680- jinv,
681- physical_values,
682- ) ;
678+ unsafe {
679+ ciarlet_element_push_forward (
680+ element,
681+ npoints,
682+ nfunctions,
683+ gdim,
684+ reference_values,
685+ nderivs,
686+ j,
687+ jdet,
688+ jinv,
689+ physical_values,
690+ ) ;
691+ }
683692 }
684693
685- pub fn ciarlet_element_pull_back <
694+ #[ allow( clippy:: too_many_arguments) ]
695+ pub unsafe fn ciarlet_element_pull_back <
686696 E : MappedFiniteElement < CellType = ReferenceCellType > ,
687697 TGeo : RlstScalar ,
688698 > (
@@ -744,7 +754,9 @@ pub mod ciarlet {
744754 gen_type( name = "maptype" , replace_with = [ "IdentityMap" , "CovariantPiolaMap" , "ContravariantPiolaMap" ] ) ,
745755 field( arg = 0 , name = "element" , wrapper = "CiarletElementT" , replace_with = [ "CiarletElement<{{dtype}}, {{maptype}}>" ] )
746756 ) ]
747- pub fn ciarlet_element_pull_back_f32 < E : MappedFiniteElement < CellType = ReferenceCellType > > (
757+ pub unsafe fn ciarlet_element_pull_back_f32 <
758+ E : MappedFiniteElement < CellType = ReferenceCellType > ,
759+ > (
748760 element : & E ,
749761 npoints : usize ,
750762 nfunctions : usize ,
@@ -756,18 +768,20 @@ pub mod ciarlet {
756768 jinv : * const f32 ,
757769 reference_values : * mut c_void ,
758770 ) {
759- ciarlet_element_pull_back (
760- element,
761- npoints,
762- nfunctions,
763- gdim,
764- physical_values,
765- nderivs,
766- j,
767- jdet,
768- jinv,
769- reference_values,
770- ) ;
771+ unsafe {
772+ ciarlet_element_pull_back (
773+ element,
774+ npoints,
775+ nfunctions,
776+ gdim,
777+ physical_values,
778+ nderivs,
779+ j,
780+ jdet,
781+ jinv,
782+ reference_values,
783+ ) ;
784+ }
771785 }
772786
773787 #[ allow( clippy:: too_many_arguments) ]
@@ -788,18 +802,20 @@ pub mod ciarlet {
788802 jinv : * const f64 ,
789803 reference_values : * mut c_void ,
790804 ) {
791- ciarlet_element_pull_back (
792- element,
793- npoints,
794- nfunctions,
795- gdim,
796- physical_values,
797- nderivs,
798- j,
799- jdet,
800- jinv,
801- reference_values,
802- ) ;
805+ unsafe {
806+ ciarlet_element_pull_back (
807+ element,
808+ npoints,
809+ nfunctions,
810+ gdim,
811+ physical_values,
812+ nderivs,
813+ j,
814+ jdet,
815+ jinv,
816+ reference_values,
817+ ) ;
818+ }
803819 }
804820
805821 #[ concretise_types(
0 commit comments