9 #ifndef MasterElement_h 10 #define MasterElement_h 26 #ifdef __INTEL_COMPILER 27 #define POINTER_RESTRICT restrict 29 #define POINTER_RESTRICT __restrict__ 62 throw std::runtime_error(
"shape_fcn using SharedMemView is not implemented");}
66 throw std::runtime_error(
"shifted_shape_fcn using SharedMemView is not implemented");}
72 throw std::runtime_error(
"grad_op using SharedMemView is not implemented");}
78 throw std::runtime_error(
"shifted_grad_op using SharedMemView is not implemented");}
85 throw std::runtime_error(
"grad_op using SharedMemView is not implemented");}
92 throw std::runtime_error(
"shifted_grad_op using SharedMemView is not implemented");}
97 throw std::runtime_error(
"determinant using SharedMemView is not implemented");}
104 throw std::runtime_error(
"gij using SharedMemView is not implemented");
110 throw std::runtime_error(
"scv determinant using SharedMemView is not implemented");
116 const double *coords,
119 throw std::runtime_error(
"determinant not implemented");}
123 const double *coords,
128 throw std::runtime_error(
"grad_op not implemented");}
132 const double *coords,
137 throw std::runtime_error(
"grad_op not implemented");}
140 const double *coords,
144 throw std::runtime_error(
"gij not implemented");}
150 throw std::runtime_error(
"nodal_grad_op not implemented");}
154 const int face_ordinal,
155 const double *coords,
159 throw std::runtime_error(
"face_grad_op not implemented; avoid this element type at open bcs, walls and symms");}
163 const int face_ordinal,
164 const double *coords,
168 throw std::runtime_error(
"shifted_face_grad_op not implemented");}
171 throw std::runtime_error(
"adjacentNodes not implementedunknown bc");
175 throw std::runtime_error(
"ipNodeMap not implemented");
180 throw std::runtime_error(
"shape_fcn not implemented"); }
184 throw std::runtime_error(
"shifted_shape_fcn not implemented"); }
187 const int ordinal,
const int node) {
188 throw std::runtime_error(
"adjacentNodes not implemented"); }
191 const int ordinal,
const int node) {
192 throw std::runtime_error(
"opposingFace not implemented");
196 const double *elemNodalCoord,
197 const double *pointCoord,
198 double *isoParCoord) {
199 throw std::runtime_error(
"isInElement not implemented");
204 const double *isoParCoord,
207 throw std::runtime_error(
"interpolatePoint not implemented"); }
211 const double *isoParCoord,
213 throw std::runtime_error(
"general_shape_fcn not implement"); }
216 const int face_ordinal,
217 const double *isoParCoord,
218 const double *coords,
222 throw std::runtime_error(
"general_face_grad_op not implemented");}
225 const double *isoParCoord,
226 const double *coords,
228 throw std::runtime_error(
"general_normal not implemented");}
231 const int & side_ordinal,
233 const double *side_pcoords,
234 double *elem_pcoords) {
235 throw std::runtime_error(
"sidePcoords_to_elemPcoords");}
238 throw std::runtime_error(
"side_node_ordinals not implemented");
241 double isoparametric_mapping(
const double b,
const double a,
const double xi)
const;
242 bool within_tolerance(
const double & val,
const double &
tol);
243 double vector_norm_sq(
const double * vect,
int len);
274 const int * ipNodeMap(
int ordinal = 0);
278 const double *coords,
285 void shifted_shape_fcn(
290 const double *par_coord,
302 const int * ipNodeMap(
int ordinal = 0);
306 const double *coords,
312 const double *coords,
318 void shifted_grad_op(
320 const double *coords,
328 const int face_ordinal,
329 const double *coords,
334 void shifted_face_grad_op(
336 const int face_ordinal,
337 const double *coords,
343 const double *coords,
348 const int * adjacentNodes();
353 void shifted_shape_fcn(
358 const double *par_coord,
362 const int ordinal,
const int node);
365 const int ordinal,
const int node);
368 const double *elemNodalCoord,
369 const double *pointCoord,
370 double *isoParCoord);
372 void interpolatePoint(
374 const double *isoParCoord,
378 void general_shape_fcn(
380 const double *isoParCoord,
383 void general_face_grad_op(
384 const int face_ordinal,
385 const double *isoParCoord,
386 const double *coords,
391 void sidePcoords_to_elemPcoords(
392 const int & side_ordinal,
394 const double *side_pcoords,
395 double *elem_pcoords);
398 double parametric_distance(
const std::vector<double> &x);
400 const int* side_node_ordinals(
int sideOrdinal)
final;
412 const int * ipNodeMap(
int ordinal = 0);
416 const double *coords,
423 void shifted_shape_fcn(
428 const double *par_coord,
440 const int * ipNodeMap(
int ordinal = 0);
444 const double *coords,
450 const double *coords,
456 void shifted_grad_op(
458 const double *coords,
466 const double *intLoc,
470 const double *coords,
475 const int * adjacentNodes();
480 void shifted_shape_fcn(
485 const double *par_coord,
488 void sidePcoords_to_elemPcoords(
489 const int & side_ordinal,
491 const double *side_pcoords,
492 double *elem_pcoords);
495 const int ordinal,
const int node);
498 const int ordinal,
const int node);
502 const int face_ordinal,
503 const double *coords,
508 void shifted_face_grad_op(
510 const int face_ordinal,
511 const double *coords,
516 void general_face_grad_op(
517 const int face_ordinal,
518 const double *isoParCoord,
519 const double *coords,
524 const int* side_node_ordinals(
int sideOrdinal)
final;
526 double parametric_distance(
const std::array<double,3>& x);
529 const double *elemNodalCoord,
530 const double *pointCoord,
531 double *isoParCoord);
533 void interpolatePoint(
535 const double *isoParCoord,
547 const int * ipNodeMap(
int ordinal = 0);
551 const double *coords,
558 void shifted_shape_fcn(
561 void wedge_shape_fcn(
563 const double *par_coord,
574 const int * ipNodeMap(
int ordinal = 0);
578 const double *coords,
584 const double *coords,
590 void shifted_grad_op(
592 const double *coords,
598 void wedge_derivative(
600 const double *intLoc,
605 const int face_ordinal,
606 const double *coords,
611 void shifted_face_grad_op(
613 const int face_ordinal,
614 const double *coords,
620 const double *coords,
625 const int * adjacentNodes();
628 const int ordinal,
const int node);
631 const int ordinal,
const int node);
636 void shifted_shape_fcn(
640 const double *elemNodalCoord,
641 const double *pointCoord,
642 double *isoParCoord);
644 void interpolatePoint(
646 const double *isoParCoord,
650 void wedge_shape_fcn(
652 const double *par_coord,
655 void general_face_grad_op(
656 const int face_ordinal,
657 const double *isoParCoord,
658 const double *coords,
663 void sidePcoords_to_elemPcoords(
664 const int & side_ordinal,
666 const double *side_pcoords,
667 double *elem_pcoords);
670 double parametric_distance(
const double X,
const double Y);
671 double parametric_distance(
const std::vector<double> &x);
673 const int* side_node_ordinals(
int sideOrdinal)
final;
684 const int * ipNodeMap(
int ordinal = 0);
688 const double *coords,
695 void shifted_shape_fcn(
700 const double *par_coord,
711 const int * ipNodeMap(
int ordinal = 0);
715 const double *coords,
721 const double *coords,
727 void shifted_grad_op(
729 const double *coords,
737 const int face_ordinal,
738 const double *coords,
743 void shifted_face_grad_op(
745 const int face_ordinal,
746 const double *coords,
752 const double *coords,
757 const int * adjacentNodes();
760 const int ordinal,
const int node);
763 const int ordinal,
const int node);
768 void shifted_shape_fcn(
773 const double *par_coord,
777 const double *elemNodalCoord,
778 const double *pointCoord,
779 double *isoParCoord);
781 void interpolatePoint(
783 const double *isoParCoord,
787 void general_shape_fcn(
789 const double *isoParCoord,
792 void general_face_grad_op(
793 const int face_ordinal,
794 const double *isoParCoord,
795 const double *coords,
800 void sidePcoords_to_elemPcoords(
801 const int & side_ordinal,
803 const double *side_pcoords,
804 double *elem_pcoords);
806 const int* side_node_ordinals(
int sideOrdinal)
final;
817 void shape_fcn(
double *shpfc);
818 void shifted_shape_fcn(
double *shpfc);
825 void set_quadrature_rule();
826 void GLLGLL_quadrature_weights();
828 int tensor_product_node_map(
int i,
int j)
const;
830 double gauss_point_location(
832 int gaussPointOrdinal)
const;
834 double shifted_gauss_point_location(
836 int gaussPointOrdinal)
const;
838 double tensor_product_weight(
839 int s1Node,
int s2Node,
840 int s1Ip,
int s2Ip)
const;
842 double tensor_product_weight(
int s1Node,
int s1Ip)
const;
844 double parametric_distance(
const std::array<double, 2>& x);
846 virtual void interpolatePoint(
848 const double *isoParCoord,
852 virtual double isInElement(
853 const double *elemNodalCoord,
854 const double *pointCoord,
855 double *isoParCoord);
857 virtual void sidePcoords_to_elemPcoords(
858 const int & side_ordinal,
860 const double *side_pcoords,
861 double *elem_pcoords);
863 void eval_shape_functions_at_ips();
864 void eval_shape_functions_at_shifted_ips();
866 void eval_shape_derivs_at_ips();
867 void eval_shape_derivs_at_shifted_ips();
869 void eval_shape_derivs_at_face_ips();
890 void quad9_shape_fcn(
892 const double *par_coord,
896 void quad9_shape_deriv(
898 const double *par_coord,
910 const int * ipNodeMap(
int ordinal = 0);
914 const double *coords,
919 void set_interior_info();
921 double jacobian_determinant(
937 const double *coords,
943 const double *coords,
949 void shifted_grad_op(
951 const double *coords,
959 const int face_ordinal,
960 const double *coords,
966 const double *coords,
971 const int * adjacentNodes();
973 const int * ipNodeMap(
int ordinal = 0);
976 const int ordinal,
const int node);
979 const int ordinal,
const int node);
981 const int* side_node_ordinals(
int sideOrdinal)
final;
985 void set_interior_info();
986 void set_boundary_info();
988 template <Jacobian::Direction direction>
void 1005 const int * ipNodeMap(
int ordinal = 0);
1009 const double *coords,
1016 void shifted_shape_fcn(
1021 const double *par_coord,
1033 const int * ipNodeMap(
int ordinal = 0);
1037 const double *coords,
1043 const double *coords,
1049 void shifted_grad_op(
1051 const double *coords,
1059 const int face_ordinal,
1060 const double *coords,
1065 void shifted_face_grad_op(
1067 const int face_ordinal,
1068 const double *coords,
1074 const double *coords,
1079 const int * adjacentNodes();
1084 void shifted_shape_fcn(
1089 const double *par_coord,
1093 const int ordinal,
const int node);
1096 const int ordinal,
const int node);
1099 const double *elemNodalCoord,
1100 const double *pointCoord,
1101 double *isoParCoord);
1103 void interpolatePoint(
1105 const double *isoParCoord,
1106 const double *field,
1109 double tri_parametric_distance(
1110 const std::vector<double> &x);
1112 void general_face_grad_op(
1113 const int face_ordinal,
1114 const double *isoParCoord,
1115 const double *coords,
1120 void sidePcoords_to_elemPcoords(
1121 const int & side_ordinal,
1122 const int & npoints,
1123 const double *side_pcoords,
1124 double *elem_pcoords);
1126 const int* side_node_ordinals(
int sideOrdinal)
final;
1139 const int * ipNodeMap(
int ordinal = 0);
1143 const double *coords,
1150 void shifted_shape_fcn(
1154 const double *elemNodalCoord,
1155 const double *pointCoord,
1156 double *isoParCoord);
1158 void interpolatePoint(
1160 const double *isoParCoord,
1161 const double *field,
1164 void general_shape_fcn(
1166 const double *isoParCoord,
1169 void general_normal(
1170 const double *isoParCoord,
1171 const double *coords,
1174 void non_unit_face_normal(
1175 const double * par_coord,
1176 const double * elem_nodal_coor,
1177 double * normal_vector );
1179 double parametric_distance(
const std::vector<double> &x);
1192 const int * ipNodeMap(
int ordinal = 0);
1196 const double *coords,
1203 void shifted_shape_fcn(
1208 const double *par_coord,
1212 const double *elemNodalCoord,
1213 const double *pointCoord,
1214 double *isoParCoord);
1216 double parametric_distance(
1217 const std::vector<double> &x);
1219 void interpolatePoint(
1221 const double *isoParCoord,
1222 const double *field,
1225 void general_shape_fcn(
1227 const double *isoParCoord,
1230 void general_normal(
1231 const double *isoParCoord,
1232 const double *coords,
1243 const int * ipNodeMap(
int ordinal = 0);
1247 const double *coords,
1254 void shifted_shape_fcn(
1258 const double *elemNodalCoord,
1259 const double *pointCoord,
1260 double *isoParCoord);
1262 void interpolatePoint(
1264 const double *isoParCoord,
1265 const double *field,
1268 void general_shape_fcn(
1270 const double *isoParCoord,
1273 void general_normal(
1274 const double *isoParCoord,
1275 const double *coords,
1278 double parametric_distance(
const std::vector<double> &x);
1290 const int * ipNodeMap(
int ordinal = 0);
1294 const double *coords,
1301 void shifted_shape_fcn(
1304 void interpolatePoint(
1306 const double *isoParCoord,
1307 const double *field,
std::vector< ContourData > ipInfo_
Definition: MasterElement.h:994
virtual ~QuadrilateralP2Element()
Definition: MasterElement.h:815
Definition: ElementDescription.h:27
virtual void shifted_shape_fcn(SharedMemView< DoubleType ** > &shpfc)
Definition: MasterElement.h:64
std::vector< double > intgLoc_
Definition: MasterElement.h:254
virtual ~Quad92DSCS()
Definition: MasterElement.h:933
std::vector< int > lrscv_
Definition: MasterElement.h:250
virtual void interpolatePoint(const int &nComp, const double *isoParCoord, const double *field, double *result)
Definition: MasterElement.h:202
Definition: ABLForcingAlgorithm.C:26
virtual void face_grad_op(const int nelem, const int face_ordinal, const double *coords, double *gradop, double *det_j, double *error)
Definition: MasterElement.h:152
Definition: MasterElement.h:53
virtual void determinant(const int nelem, const double *coords, double *volume, double *error)
Definition: MasterElement.h:114
std::vector< double > scsEndLoc_
Definition: MasterElement.h:882
virtual const int * side_node_ordinals(int sideOrdinal)
Definition: MasterElement.h:237
virtual void grad_op(const int nelem, const double *coords, double *gradop, double *deriv, double *det_j, double *error)
Definition: MasterElement.h:121
virtual void determinant(SharedMemView< DoubleType ** > coords, SharedMemView< DoubleType * > volume)
Definition: MasterElement.h:107
std::vector< double > ipWeight_
Definition: MasterElement.h:1316
double weight
Definition: MasterElement.h:822
virtual int opposingNodes(const int ordinal, const int node)
Definition: MasterElement.h:186
std::vector< double > expFaceShapeDerivs_
Definition: MasterElement.h:888
virtual void shifted_face_grad_op(const int nelem, const int face_ordinal, const double *coords, double *gradop, double *det_j, double *error)
Definition: MasterElement.h:161
virtual void shifted_grad_op(const int nelem, const double *coords, double *gradop, double *deriv, double *det_j, double *error)
Definition: MasterElement.h:130
int numIntPoints_
Definition: MasterElement.h:247
virtual void general_shape_fcn(const int numIp, const double *isoParCoord, double *shpfc)
Definition: MasterElement.h:209
virtual ~Quad92DSCV()
Definition: MasterElement.h:908
int nodesPerElement_
Definition: MasterElement.h:246
std::vector< double > shapeFunctionsShift_
Definition: MasterElement.h:885
Definition: MasterElement.h:1284
virtual void shape_fcn(SharedMemView< DoubleType ** > &shpfc)
Definition: MasterElement.h:60
virtual double isInElement(const double *elemNodalCoord, const double *pointCoord, double *isoParCoord)
Definition: MasterElement.h:195
Definition: MasterElement.h:541
virtual const int * adjacentNodes()
Definition: MasterElement.h:170
Definition: MasterElement.h:42
Definition: Algorithm.h:14
virtual void shape_fcn(double *shpfc)
Definition: MasterElement.h:178
virtual int opposingFace(const int ordinal, const int node)
Definition: MasterElement.h:190
Definition: MasterElement.h:705
std::vector< double > gaussAbscissae_
Definition: MasterElement.h:877
virtual void determinant(SharedMemView< DoubleType ** > &coords, SharedMemView< DoubleType ** > &areav)
Definition: MasterElement.h:94
#define POINTER_RESTRICT
Definition: MasterElement.h:29
Definition: MasterElement.h:1132
std::vector< double > nodeLoc_
Definition: MasterElement.h:258
Definition: MasterElement.h:44
std::vector< int > oppFace_
Definition: MasterElement.h:253
Definition: MasterElement.h:43
std::vector< double > shapeDerivsShift_
Definition: MasterElement.h:887
std::vector< double > shapeFunctions_
Definition: MasterElement.h:884
std::vector< double > intgExpFace_
Definition: MasterElement.h:256
Definition: MasterElement.h:295
const double scsDist_
Definition: MasterElement.h:871
Definition: MasterElement.h:433
virtual void sidePcoords_to_elemPcoords(const int &side_ordinal, const int &npoints, const double *side_pcoords, double *elem_pcoords)
Definition: MasterElement.h:230
int nDim_
Definition: MasterElement.h:245
const double elemThickness_
Definition: MasterElement.h:1280
virtual void grad_op_fem(SharedMemView< DoubleType ** > &coords, SharedMemView< DoubleType *** > &gradop, SharedMemView< DoubleType *** > &deriv, SharedMemView< DoubleType * > &det_j)
Definition: MasterElement.h:80
Definition: MasterElement.h:904
virtual ~Edge32DSCS()
Definition: MasterElement.h:1288
std::vector< int > sideNodeOrdinals_
Definition: MasterElement.h:259
Definition: MasterElement.h:820
Jacobian::Direction direction
Definition: MasterElement.h:821
Definition: MasterElement.h:1185
Definition: MasterElement.h:1027
std::vector< int > oppNode_
Definition: MasterElement.h:252
virtual void general_normal(const double *isoParCoord, const double *coords, double *normal)
Definition: MasterElement.h:224
virtual void grad_op(SharedMemView< DoubleType ** > &coords, SharedMemView< DoubleType *** > &gradop, SharedMemView< DoubleType *** > &deriv)
Definition: MasterElement.h:68
Definition: MasterElement.h:1237
double scaleToStandardIsoFac_
Definition: MasterElement.h:248
Definition: MasterElement.h:405
Direction
Definition: MasterElement.h:40
std::vector< double > shapeDerivs_
Definition: MasterElement.h:886
Kokkos::View< T, Kokkos::LayoutRight, DeviceShmem, Kokkos::MemoryUnmanaged > SharedMemView
Definition: KokkosInterface.h:25
int ipsPerFace_
Definition: MasterElement.h:995
Definition: MasterElement.h:929
std::vector< double > intgExpFaceShift_
Definition: MasterElement.h:257
virtual const int * ipNodeMap(int ordinal=0)
Definition: MasterElement.h:174
std::vector< int > ipNodeMap_
Definition: MasterElement.h:251
std::vector< int > stkNodeMap_
Definition: MasterElement.h:881
Definition: MasterElement.h:267
virtual void gij(SharedMemView< DoubleType ** > coords, SharedMemView< DoubleType *** > gupper, SharedMemView< DoubleType *** > glower, SharedMemView< DoubleType *** > deriv)
Definition: MasterElement.h:99
std::vector< double > intgLocShift_
Definition: MasterElement.h:255
const double tol
Definition: UnitTestUtils.h:56
const int nodes1D_
Definition: MasterElement.h:872
virtual void gij(const double *coords, double *gupperij, double *glowerij, double *deriv)
Definition: MasterElement.h:139
Definition: MasterElement.h:999
Definition: AlgTraits.h:72
Definition: MasterElement.h:568
const double elemThickness_
Definition: MasterElement.h:1181
virtual void shifted_grad_op(SharedMemView< DoubleType ** > &coords, SharedMemView< DoubleType *** > &gradop, SharedMemView< DoubleType *** > &deriv)
Definition: MasterElement.h:74
std::vector< double > ipWeight_
Definition: MasterElement.h:925
std::vector< double > weights_
Definition: MasterElement.h:263
virtual void shifted_grad_op_fem(SharedMemView< DoubleType ** > &coords, SharedMemView< DoubleType *** > &gradop, SharedMemView< DoubleType *** > &deriv, SharedMemView< DoubleType * > &det_j)
Definition: MasterElement.h:87
std::vector< double > gaussWeight_
Definition: MasterElement.h:879
Definition: MasterElement.h:809
std::vector< double > gaussAbscissae1D_
Definition: MasterElement.h:876
int numQuad_
Definition: MasterElement.h:873
virtual void general_face_grad_op(const int face_ordinal, const double *isoParCoord, const double *coords, double *gradop, double *det_j, double *error)
Definition: MasterElement.h:215
virtual void nodal_grad_op(const int nelem, double *deriv, double *error)
Definition: MasterElement.h:146
std::vector< double > gaussAbscissaeShift_
Definition: MasterElement.h:878
std::vector< int > sideOffset_
Definition: MasterElement.h:260
Definition: MasterElement.h:678
virtual void shifted_shape_fcn(double *shpfc)
Definition: MasterElement.h:182