HIFLOW  2.0
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
hiflow::AssemblyAssistant< DIM, DataType > Class Template Reference

Helper class for local assembly and integration functors. More...

#include <assembly_assistant.h>

Public Types

typedef la::SeqDenseMatrix< DataType > LocalMatrix
 
typedef std::vector< DataType > LocalVector
 

Public Member Functions

 AssemblyAssistant ()
 
DataType detJ (int q) const
 Determinant of Jacobian matrix of cell transformation. More...
 
int dof_index (int s, int var) const
 Local dof index for dof s of variable var. More...
 
DataType ds (int q) const
 Surface integration element. More...
 
template<class VectorType >
void evaluate_fe_function (const VectorType &coefficients, int var, FunctionValues< DataType > &function_values) const
 Evaluate a finite element function on the current element. More...
 
template<class VectorType >
void evaluate_fe_function_gradients (const VectorType &coefficients, int var, FunctionValues< Vec< DIM, DataType > > &function_gradients) const
 Evaluate the gradient of a finite element function on the current element. More...
 
template<class VectorType >
void evaluate_fe_function_hessians (const VectorType &coefficients, int var, FunctionValues< Mat< DIM, DIM, DataType > > &function_hessians) const
 Evaluate the hessian of a finite element function on the current element. More...
 
const Vec< DIM, DataType > & grad_phi (int s, int q, int var=0) const
 Shape function gradients on physical element. More...
 
DataType h () const
 Element size parameter h. More...
 
const std::vector< Mat< DIM, DIM, DataType > > & H_F (int q) const
 Hessian tensor of cell transformation. More...
 
const Mat< DIM, DIM, DataType > & H_phi (int s, int q, int var=0) const
 Shape function hessian on physical element. More...
 
void initialize_for_element (const Element< DataType > &element, const Quadrature< DataType > &element_quadrature)
 Initialize the assistant for an element and a quadrature. More...
 
void initialize_for_facet (const Element< DataType > &element, const Quadrature< DataType > &facet_quadrature, int facet_number)
 Initialize the assistant for a facet of the element and a quadrature. More...
 
const Mat< DIM, DIM, DataType > & J (int q) const
 Jacobian matrix of cell transformation. More...
 
const Mat< DIM, DIM - 1, DataType > & Jf (int q) const
 Jacobian matrix projected onto current facet. More...
 
const Mat< DIM, DIM, DataType > & JinvT (int q) const
 Inverse transpose of Jacobian matrix of cell transformation. More...
 
const Vec< DIM, DataType > & n (int q) const
 Surface normal. More...
 
DataType nitsche_regularization (int q) const
 The Nitsche regularization parameter used in Nitsche method. More...
 
int num_dofs (int var) const
 Number of local dofs for a variable. More...
 
int num_dofs_total () const
 Number of local dofs. More...
 
int num_quadrature_points () const
 Number of quadrature points. More...
 
int num_vars () const
 Number of variables. More...
 
DataType phi (int s, int q, int var=0) const
 Shape function values on physical element. More...
 
const Vec< DIM, DataType > & q_point (int q) const
 Quadrature point on reference element. More...
 
DataType w (int q) const
 Quadrature weights. More...
 
const Vec< DIM, DataType > & x (int q) const
 Quadrature point on physical element. More...
 

Private Member Functions

void compute_facet_normal ()
 
void compute_facet_projection_matrix ()
 
void compute_fe_values ()
 
void compute_quadrature_values ()
 
void compute_transformed_cell_values ()
 
void compute_transformed_facet_values ()
 
template<class VectorType >
std::vector< DataType > extract_dof_values (const VectorType &coefficients, int var) const
 
int find_fe_type (const FEType< DataType > *fe_type) const
 
bool initialize_cell_values (const Element< DataType > &element, bool force_update)
 
bool initialize_facet_values (const Element< DataType > &element, int facet, bool force_update)
 
bool initialize_fe_types (const Element< DataType > &element, bool force_update)
 
bool initialize_quadrature (const Quadrature< DataType > &new_quadrature, bool force_update)
 

Private Attributes

mesh::EntityNumber cell_index_
 Current cell index. More...
 
const CellTransformation< DataType > * cell_transform_
 Cell transform for current element. More...
 
mesh::CellType::Tag cell_type_
 Cell type of current element. More...
 
FunctionValues< DataType > detJ_
 Determinants of jacobian matrices. More...
 
std::vector< intdof_offset_for_var_
 Mapping var -> dof offset. More...
 
FunctionValues< DataType > ds_
 Surface element on facet. More...
 
int facet_number_
 Current facet number (-1 on cell) More...
 
Mat< DIM, DIM - 1, DataType > facet_proj_
 Current facet projection matrix. More...
 
std::vector< intfe_offsets_for_var_
 Mapping var -> FEType. More...
 
std::vector< const FEType< DataType > *> fe_types_
 Current FEType:s. More...
 
std::vector< intglobal_dof_indices_
 Global dofs for current element. More...
 
FunctionValues< std::vector< Vec< DIM, DataType > > > grad_phi_
 
FunctionValues< std::vector< Vec< DIM, DataType > > > grad_phi_hat_
 Shape function hessians on reference element. More...
 
DataType h_
 Element size parameter h. More...
 
FunctionValues< std::vector< Mat< DIM, DIM, DataType > > > H_mapped_grad_
 Shape function hessians on physical element. More...
 
FunctionValues< std::vector< Mat< DIM, DIM, DataType > > > H_phi_
 
FunctionValues< std::vector< Mat< DIM, DIM, DataType > > > H_phi_hat_
 Shape function gradients on physical element. More...
 
FunctionValues< std::vector< Mat< DIM, DIM, DataType > > > H_transform_
 H-mapped shape function gradients on physical element. More...
 
FunctionValues< Mat< DIM, DIM, DataType > > J_
 Jacobian matrix at quadrature points. More...
 
FunctionValues< Mat< DIM, DIM - 1, DataType > > Jf_
 Jacobian matrix projected onto facet. More...
 
FunctionValues< Mat< DIM, DIM, DataType > > JinvT_
 Hessian of cell transformation at quadrature points. More...
 
FunctionValues< Vec< DIM, DataType > > mapped_n_
 Normals on physical element. More...
 
Vec< DIM, DataType > n_
 Current facet normal. More...
 
DataType nitsche_regularization_
 Regularization parameter for Nitsche method. More...
 
std::vector< intnum_dofs_for_var_
 Number of dofs / var. More...
 
FunctionValues< std::vector< DataType > > phi_
 Shape function values. More...
 
std::vector< Vec< DIM, DataType > > q_points_
 Quadrature points on reference element. More...
 
Quadrature< DataType > quadrature_
 Current quadrature. More...
 
std::vector< DataType > weights_
 Quadrature weights. More...
 
FunctionValues< Vec< DIM, DataType > > x_
 Quadrature points on physical element. More...
 

Detailed Description

template<int DIM, class DataType>
class hiflow::AssemblyAssistant< DIM, DataType >

Helper class for local assembly and integration functors.

See also
Concept for assembly and integration

Definition at line 49 of file assembly_assistant.h.

Member Typedef Documentation

◆ LocalMatrix

template<int DIM, class DataType>
typedef la::SeqDenseMatrix<DataType> hiflow::AssemblyAssistant< DIM, DataType >::LocalMatrix

Definition at line 53 of file assembly_assistant.h.

◆ LocalVector

template<int DIM, class DataType>
typedef std::vector<DataType> hiflow::AssemblyAssistant< DIM, DataType >::LocalVector

Definition at line 54 of file assembly_assistant.h.

Constructor & Destructor Documentation

◆ AssemblyAssistant()

template<int DIM, class DataType >
hiflow::AssemblyAssistant< DIM, DataType >::AssemblyAssistant ( )

Definition at line 309 of file assembly_assistant.h.

References hiflow::AssemblyAssistant< DIM, DataType >::facet_number_.

310  : cell_transform_ ( 0 )
311  {
312  assert ( DIM > 0 );
313  assert ( DIM <= 3 );
314  facet_number_ = -1;
315  }
int facet_number_
Current facet number (-1 on cell)
const CellTransformation< DataType > * cell_transform_
Cell transform for current element.

Member Function Documentation

◆ compute_facet_normal()

template<int DIM, class DataType >
void hiflow::AssemblyAssistant< DIM, DataType >::compute_facet_normal ( )
private

Definition at line 997 of file assembly_assistant.h.

References hiflow::AssemblyAssistant< DIM, DataType >::cell_type_, hiflow::AssemblyAssistant< DIM, DataType >::facet_number_, hiflow::mesh::CellType::HEXAHEDRON, hiflow::AssemblyAssistant< DIM, DataType >::JinvT_, hiflow::AssemblyAssistant< DIM, DataType >::mapped_n_, hiflow::AssemblyAssistant< DIM, DataType >::n_, hiflow::mesh::CellType::PYRAMID, hiflow::mesh::CellType::QUADRILATERAL, hiflow::mesh::CellType::TETRAHEDRON, and hiflow::mesh::CellType::TRIANGLE.

Referenced by hiflow::AssemblyAssistant< DIM, DataType >::initialize_facet_values().

998  {
999  using mesh::CellType;
1000 
1001  switch ( cell_type_ )
1002  {
1003  case CellType::TRIANGLE:
1004  switch ( facet_number_ )
1005  {
1006  case 0: // bottom edge
1007  for ( size_t d = 0; d != DIM; ++d )
1008  {
1009  switch ( d )
1010  {
1011  case 0: n_[d] = 0.0;
1012  break;
1013  case 1: n_[d] = -1.0;
1014  break;
1015  case 2: n_[d] = 0.0;
1016  break;
1017  default: assert ( false );
1018  break;
1019  }
1020  }
1021  break;
1022  case 1: // diagonal
1023  for ( size_t d = 0; d != DIM; ++d )
1024  {
1025  switch ( d )
1026  {
1027  case 0: n_[d] = 1. / std::sqrt ( 2. );
1028  break;
1029  case 1: n_[d] = 1. / std::sqrt ( 2. );
1030  break;
1031  case 2: n_[d] = .0;
1032  break;
1033  default: assert ( false );
1034  break;
1035  }
1036  }
1037  break;
1038  case 2: // left edge
1039  for ( size_t d = 0; d != DIM; ++d )
1040  {
1041  switch ( d )
1042  {
1043  case 0: n_[d] = -1.0;
1044  break;
1045  case 1: n_[d] = 0.0;
1046  break;
1047  case 2: n_[d] = 0.0;
1048  break;
1049  default: assert ( false );
1050  break;
1051  }
1052  }
1053  break;
1054  default:
1055  assert ( 0 );
1056  }
1057  break;
1059  switch ( facet_number_ )
1060  {
1061  case 0: // bottom edge
1062  for ( size_t d = 0; d != DIM; ++d )
1063  {
1064  switch ( d )
1065  {
1066  case 0: n_[d] = 0.0;
1067  break;
1068  case 1: n_[d] = -1.0;
1069  break;
1070  case 2: n_[d] = 0.0;
1071  break;
1072  default: assert ( false );
1073  break;
1074  }
1075  }
1076  break;
1077  case 1: // right edge
1078  for ( size_t d = 0; d != DIM; ++d )
1079  {
1080  switch ( d )
1081  {
1082  case 0: n_[d] = 1.0;
1083  break;
1084  case 1: n_[d] = 0.0;
1085  break;
1086  case 2: n_[d] = 0.0;
1087  break;
1088  default: assert ( false );
1089  break;
1090  }
1091  }
1092  break;
1093  case 2: // top edge
1094  for ( size_t d = 0; d != DIM; ++d )
1095  {
1096  switch ( d )
1097  {
1098  case 0: n_[d] = 0.0;
1099  break;
1100  case 1: n_[d] = 1.0;
1101  break;
1102  case 2: n_[d] = 0.0;
1103  break;
1104  default: assert ( false );
1105  break;
1106  }
1107  }
1108  break;
1109  case 3: // left edge
1110  for ( size_t d = 0; d != DIM; ++d )
1111  {
1112  switch ( d )
1113  {
1114  case 0: n_[d] = -1.0;
1115  break;
1116  case 1: n_[d] = 0.0;
1117  break;
1118  case 2: n_[d] = 0.0;
1119  break;
1120  default: assert ( false );
1121  break;
1122  }
1123  }
1124  break;
1125  default:
1126  assert ( 0 );
1127  }
1128  break;
1129 
1130  case CellType::HEXAHEDRON:
1131  switch ( facet_number_ )
1132  {
1133  case 0: // bottom
1134  for ( size_t d = 0; d != DIM; ++d )
1135  {
1136  switch ( d )
1137  {
1138  case 0: n_[d] = 0.0;
1139  break;
1140  case 1: n_[d] = 0.0;
1141  break;
1142  case 2: n_[d] = -1.0;
1143  break;
1144  default: assert ( false );
1145  break;
1146  }
1147  }
1148  break;
1149 
1150  case 5: // top
1151  for ( size_t d = 0; d < DIM; ++d )
1152  {
1153  switch ( d )
1154  {
1155  case 0: n_[d] = 0.0;
1156  break;
1157  case 1: n_[d] = 0.0;
1158  break;
1159  case 2: n_[d] = 1.0;
1160  break;
1161  default: assert ( false );
1162  break;
1163  }
1164  }
1165  break;
1166 
1167  case 1: // front
1168  for ( size_t d = 0; d != DIM; ++d )
1169  {
1170  switch ( d )
1171  {
1172  case 0: n_[d] = 0.0;
1173  break;
1174  case 1: n_[d] = -1.0;
1175  break;
1176  case 2: n_[d] = 0.0;
1177  break;
1178  default: assert ( false );
1179  break;
1180  }
1181  }
1182  break;
1183 
1184  case 4: // back
1185  for ( size_t d = 0; d != DIM; ++d )
1186  {
1187  switch ( d )
1188  {
1189  case 0: n_[d] = 0.0;
1190  break;
1191  case 1: n_[d] = 1.0;
1192  break;
1193  case 2: n_[d] = 0.0;
1194  break;
1195  default: assert ( false );
1196  break;
1197  }
1198  }
1199  break;
1200 
1201  case 2: // left
1202  for ( size_t d = 0; d != DIM; ++d )
1203  {
1204  switch ( d )
1205  {
1206  case 0: n_[d] = -1.0;
1207  break;
1208  case 1: n_[d] = 0.0;
1209  break;
1210  case 2: n_[d] = 0.0;
1211  break;
1212  default: assert ( false );
1213  break;
1214  }
1215  }
1216  break;
1217 
1218  case 3: // right
1219  for ( size_t d = 0; d != DIM; ++d )
1220  {
1221  switch ( d )
1222  {
1223  case 0: n_[d] = 1.0;
1224  break;
1225  case 1: n_[d] = 0.0;
1226  break;
1227  case 2: n_[d] = 0.0;
1228  break;
1229  default: assert ( false );
1230  break;
1231  }
1232  }
1233  break;
1234 
1235  default:
1236  assert ( 0 );
1237  }
1238  break;
1239 
1240  case CellType::TETRAHEDRON:
1241  switch ( facet_number_ )
1242  {
1243  case 0: // bottom
1244  for ( size_t d = 0; d != DIM; ++d )
1245  {
1246  switch ( d )
1247  {
1248  case 0: n_[d] = 0.0;
1249  break;
1250  case 1: n_[d] = 0.0;
1251  break;
1252  case 2: n_[d] = -1.0;
1253  break;
1254  default: assert ( false );
1255  break;
1256  }
1257  }
1258  break;
1259 
1260  case 1: // front
1261  for ( size_t d = 0; d != DIM; ++d )
1262  {
1263  switch ( d )
1264  {
1265  case 0: n_[d] = 0.0;
1266  break;
1267  case 1: n_[d] = -1.0;
1268  break;
1269  case 2: n_[d] = 0.0;
1270  break;
1271  default: assert ( false );
1272  break;
1273  }
1274  }
1275  break;
1276 
1277  case 2: // left
1278  for ( size_t d = 0; d != DIM; ++d )
1279  {
1280  switch ( d )
1281  {
1282  case 0: n_[d] = -1.0;
1283  break;
1284  case 1: n_[d] = 0.0;
1285  break;
1286  case 2: n_[d] = 0.0;
1287  break;
1288  default: assert ( false );
1289  break;
1290  }
1291  }
1292  break;
1293 
1294  case 3: // back
1295  for ( size_t d = 0; d != DIM; ++d )
1296  {
1297  switch ( d )
1298  {
1299  case 0: n_[d] = 1. / std::sqrt ( 3. );
1300  break;
1301  case 1: n_[d] = 1. / std::sqrt ( 3. );
1302  break;
1303  case 2: n_[d] = 1. / std::sqrt ( 3. );
1304  break;
1305  default: assert ( false );
1306  break;
1307  }
1308  }
1309  break;
1310 
1311  default:
1312  std::cerr << "Failed: Facet number " << facet_number_ << " is not valid.\n";
1313  assert ( 0 );
1314  }
1315  break;
1316 
1317  case CellType::PYRAMID:
1318  switch ( facet_number_ )
1319  {
1320  case 0: // bottom
1321  for ( size_t d = 0; d != DIM; ++d )
1322  {
1323  switch ( d )
1324  {
1325  case 0: n_[d] = 0.0;
1326  break;
1327  case 1: n_[d] = 0.0;
1328  break;
1329  case 2: n_[d] = -1.0;
1330  break;
1331  default: assert ( false );
1332  break;
1333  }
1334  }
1335  break;
1336 
1337  case 1: // front
1338  for ( size_t d = 0; d != DIM; ++d )
1339  {
1340  switch ( d )
1341  {
1342  case 0: n_[d] = 0.0;
1343  break;
1344  case 1: n_[d] = -2. / std::sqrt ( 3. );
1345  break;
1346  case 2: n_[d] = 1. / std::sqrt ( 3. );
1347  break;
1348  default: assert ( false );
1349  break;
1350  }
1351  }
1352  break;
1353 
1354  case 2: // right
1355  for ( size_t d = 0; d != DIM; ++d )
1356  {
1357  switch ( d )
1358  {
1359  case 0: n_[d] = 2. / std::sqrt ( 3. );
1360  break;
1361  case 1: n_[d] = 0.0;
1362  break;
1363  case 2: n_[d] = 1. / std::sqrt ( 3. );
1364  break;
1365  default: assert ( false );
1366  break;
1367  }
1368  }
1369  break;
1370 
1371  case 3: // back
1372  for ( size_t d = 0; d != DIM; ++d )
1373  {
1374  switch ( d )
1375  {
1376  case 0: n_[d] = 0.0;
1377  break;
1378  case 1: n_[d] = 2. / std::sqrt ( 3. );
1379  break;
1380  case 2: n_[d] = 1. / std::sqrt ( 3. );
1381  break;
1382  default: assert ( false );
1383  break;
1384  }
1385  }
1386  break;
1387 
1388  case 4: // left
1389  for ( size_t d = 0; d != DIM; ++d )
1390  {
1391  switch ( d )
1392  {
1393  case 0: n_[d] = -2. / std::sqrt ( 3. );
1394  break;
1395  case 1: n_[d] = 0.0;
1396  break;
1397  case 2: n_[d] = 1. / std::sqrt ( 3. );
1398  break;
1399  default: assert ( false );
1400  break;
1401  }
1402  }
1403  break;
1404 
1405  default:
1406  std::cerr << "Failed: Facet number " << facet_number_ << " is not valid.\n";
1407  assert ( 0 );
1408  }
1409  break;
1410 
1411  default:
1412  // not yet supported
1413  std::cerr << "Failed: Cell type " << cell_type_ << " not yet implemented!\n";
1414  assert ( false );
1415  }
1416 
1417  // precompute the normals on the quadrature points.
1418  mapped_n_.compute ( JinvT_, EvalMappedNormal<DIM, DataType>( n_ ) );
1419  }
int facet_number_
Current facet number (-1 on cell)
FunctionValues< Mat< DIM, DIM, DataType > > JinvT_
Hessian of cell transformation at quadrature points.
Vec< DIM, DataType > n_
Current facet normal.
FunctionValues< Vec< DIM, DataType > > mapped_n_
Normals on physical element.
mesh::CellType::Tag cell_type_
Cell type of current element.

◆ compute_facet_projection_matrix()

template<int DIM, class DataType >
void hiflow::AssemblyAssistant< DIM, DataType >::compute_facet_projection_matrix ( )
private

Definition at line 794 of file assembly_assistant.h.

References hiflow::AssemblyAssistant< DIM, DataType >::cell_type_, hiflow::AssemblyAssistant< DIM, DataType >::facet_number_, hiflow::AssemblyAssistant< DIM, DataType >::facet_proj_, hiflow::mesh::CellType::HEXAHEDRON, hiflow::mesh::CellType::PYRAMID, hiflow::mesh::CellType::QUADRILATERAL, hiflow::mesh::CellType::TETRAHEDRON, and hiflow::mesh::CellType::TRIANGLE.

Referenced by hiflow::AssemblyAssistant< DIM, DataType >::initialize_facet_values().

795  {
796  using mesh::CellType;
797 
798  switch ( cell_type_ )
799  {
800  case CellType::TRIANGLE:
801  switch ( facet_number_ )
802  {
803  case 0: //bottom edge
804  facet_proj_ ( 0, 0 ) = 1.;
805  facet_proj_ ( 1, 0 ) = 0.;
806  break;
807  case 1: // diagonal
808  facet_proj_ ( 0, 0 ) = 1.;
809  facet_proj_ ( 1, 0 ) = -1.;
810  break;
811  case 2: // left edge
812  facet_proj_ ( 0, 0 ) = 0.;
813  facet_proj_ ( 1, 0 ) = 1.;
814  break;
815  default:
816  assert ( 0 );
817  }
818  break;
820  switch ( facet_number_ )
821  {
822  case 0: // bottom edge
823  case 2: // top edge
824  facet_proj_ ( 0, 0 ) = 1.;
825  facet_proj_ ( 1, 0 ) = 0.;
826  break;
827  case 1: // right edge
828  case 3: // left edge
829  facet_proj_ ( 0, 0 ) = 0.;
830  facet_proj_ ( 1, 0 ) = 1.;
831  break;
832  default:
833  assert ( 0 );
834  }
835  break;
837  switch ( facet_number_ )
838  {
839  case 0: // bottom
840  case 5: // top
841  facet_proj_ ( 0, 0 ) = 1.;
842  facet_proj_ ( 1, 0 ) = 0.;
843  facet_proj_ ( 2, 0 ) = 0.;
844 
845  facet_proj_ ( 0, 1 ) = 0.;
846  facet_proj_ ( 1, 1 ) = 1.;
847  facet_proj_ ( 2, 1 ) = 0.;
848  break;
849 
850  case 1: // front 1
851  case 4: // back 4
852  facet_proj_ ( 0, 0 ) = 1.;
853  facet_proj_ ( 1, 0 ) = 0.;
854  facet_proj_ ( 2, 0 ) = 0.;
855 
856  facet_proj_ ( 0, 1 ) = 0.;
857  facet_proj_ ( 1, 1 ) = 0.;
858  facet_proj_ ( 2, 1 ) = 1.;
859  break;
860 
861  case 2: // left 2
862  case 3: // right 3
863  facet_proj_ ( 0, 0 ) = 0.;
864  facet_proj_ ( 1, 0 ) = 1.;
865  facet_proj_ ( 2, 0 ) = 0.;
866 
867  facet_proj_ ( 0, 1 ) = 0.;
868  facet_proj_ ( 1, 1 ) = 0.;
869  facet_proj_ ( 2, 1 ) = 1.;
870  break;
871 
872  default:
873  assert ( 0 );
874  }
875  break;
877  switch ( facet_number_ )
878  {
879  case 0: // bottom
880  facet_proj_ ( 0, 0 ) = 1.;
881  facet_proj_ ( 1, 0 ) = 0.;
882  facet_proj_ ( 2, 0 ) = 0.;
883 
884  facet_proj_ ( 0, 1 ) = 0.;
885  facet_proj_ ( 1, 1 ) = 1.;
886  facet_proj_ ( 2, 1 ) = 0.;
887  break;
888 
889  case 1: // front
890  facet_proj_ ( 0, 0 ) = 1.;
891  facet_proj_ ( 1, 0 ) = 0.;
892  facet_proj_ ( 2, 0 ) = 0.;
893 
894  facet_proj_ ( 0, 1 ) = 0.;
895  facet_proj_ ( 1, 1 ) = 0.;
896  facet_proj_ ( 2, 1 ) = 1.;
897  break;
898 
899  case 2: // left
900  facet_proj_ ( 0, 0 ) = 0.;
901  facet_proj_ ( 1, 0 ) = 1.;
902  facet_proj_ ( 2, 0 ) = 0.;
903 
904  facet_proj_ ( 0, 1 ) = 0.;
905  facet_proj_ ( 1, 1 ) = 0.;
906  facet_proj_ ( 2, 1 ) = 1.;
907  break;
908 
909  case 3: // back
910  /*facet_proj_(0, 0) = 1.;
911  facet_proj_(1, 0) = -1.;
912  facet_proj_(2, 0) = 0.;
913 
914  facet_proj_(0, 1) = 0.;
915  facet_proj_(1, 1) = 1.;
916  facet_proj_(2, 1) = -1.;*/
917  facet_proj_ ( 0, 0 ) = 1.;
918  facet_proj_ ( 1, 0 ) = 0.;
919  facet_proj_ ( 2, 0 ) = -1.;
920 
921  facet_proj_ ( 0, 1 ) = 0.;
922  facet_proj_ ( 1, 1 ) = 1.;
923  facet_proj_ ( 2, 1 ) = -1.;
924  break;
925 
926  default:
927  assert ( 0 );
928  }
929  break;
930  case CellType::PYRAMID:
931  switch ( facet_number_ )
932  {
933  case 0: // bottom
934  facet_proj_ ( 0, 0 ) = 1.;
935  facet_proj_ ( 1, 0 ) = 0.;
936  facet_proj_ ( 2, 0 ) = 0.;
937 
938  facet_proj_ ( 1, 1 ) = 0.;
939  facet_proj_ ( 1, 1 ) = 1.;
940  facet_proj_ ( 2, 1 ) = 0.;
941  break;
942 
943  case 1: //front
944  facet_proj_ ( 0, 0 ) = 1.;
945  facet_proj_ ( 1, 0 ) = 0.;
946  facet_proj_ ( 2, 0 ) = 0.;
947 
948  facet_proj_ ( 0, 1 ) = 0.5;
949  facet_proj_ ( 1, 1 ) = 0.5;
950  facet_proj_ ( 2, 1 ) = 1.;
951  break;
952 
953  case 2: //right
954  facet_proj_ ( 0, 0 ) = 0.;
955  facet_proj_ ( 1, 0 ) = 1.;
956  facet_proj_ ( 2, 0 ) = 0.;
957 
958  facet_proj_ ( 0, 1 ) = -0.5;
959  facet_proj_ ( 1, 1 ) = 0.5;
960  facet_proj_ ( 2, 1 ) = 1.;
961  break;
962 
963  case 3: //back
964  facet_proj_ ( 0, 0 ) = -1.;
965  facet_proj_ ( 1, 0 ) = 0.;
966  facet_proj_ ( 2, 0 ) = 0.;
967 
968  facet_proj_ ( 0, 1 ) = -0.5;
969  facet_proj_ ( 1, 1 ) = -0.;
970  facet_proj_ ( 2, 1 ) = 1.;
971  break;
972 
973  case 4: //left
974  facet_proj_ ( 0, 0 ) = 0.;
975  facet_proj_ ( 1, 0 ) = -1.;
976  facet_proj_ ( 2, 0 ) = 0.;
977 
978  facet_proj_ ( 0, 1 ) = 0.5;
979  facet_proj_ ( 1, 1 ) = -0.5;
980  facet_proj_ ( 2, 1 ) = 1.;
981  break;
982 
983  default:
984  assert ( 0 );
985 
986  }
987  break;
988 
989  default:
990  // not yet supported
991  std::cerr << "Failed: Cell type " << cell_type_ << " not yet implemented!\n";
992  assert ( false );
993  }
994  }
Mat< DIM, DIM - 1, DataType > facet_proj_
Current facet projection matrix.
int facet_number_
Current facet number (-1 on cell)
mesh::CellType::Tag cell_type_
Cell type of current element.

◆ compute_fe_values()

template<int DIM, class DataType >
void hiflow::AssemblyAssistant< DIM, DataType >::compute_fe_values ( )
private

Definition at line 735 of file assembly_assistant.h.

References hiflow::FunctionValues< T >::compute(), hiflow::AssemblyAssistant< DIM, DataType >::fe_types_, hiflow::AssemblyAssistant< DIM, DataType >::grad_phi_hat_, hiflow::AssemblyAssistant< DIM, DataType >::H_phi_hat_, hiflow::AssemblyAssistant< DIM, DataType >::phi_, hiflow::AssemblyAssistant< DIM, DataType >::q_points_, and hiflow::AssemblyAssistant< DIM, DataType >::quadrature_.

Referenced by hiflow::AssemblyAssistant< DIM, DataType >::initialize_fe_types().

736  {
737  assert ( q_points_.size ( ) == quadrature_.size ( ) );
738  assert ( !fe_types_.empty ( ) );
739 
740  // compute shape function values
741  phi_.compute ( q_points_, EvalShapeFunctions<DIM, DataType>( fe_types_ ) );
742 
743  // compute shape function gradients
744  grad_phi_hat_.compute ( q_points_, EvalShapeFunctionGradients<DIM, DataType>( fe_types_ ) );
745 
746  // compute shape function hessians
747  H_phi_hat_.compute ( q_points_, EvalShapeFunctionHessians<DIM, DataType>( fe_types_ ) );
748  }
std::vector< Vec< DIM, DataType > > q_points_
Quadrature points on reference element.
void compute(const Arguments &arguments, const Function &function)
Evaluates a function object at a set of argument values and stores the function values internally...
std::vector< const FEType< DataType > *> fe_types_
Current FEType:s.
FunctionValues< std::vector< DataType > > phi_
Shape function values.
FunctionValues< std::vector< Mat< DIM, DIM, DataType > > > H_phi_hat_
Shape function gradients on physical element.
FunctionValues< std::vector< Vec< DIM, DataType > > > grad_phi_hat_
Shape function hessians on reference element.
Quadrature< DataType > quadrature_
Current quadrature.

◆ compute_quadrature_values()

template<int DIM, class DataType >
void hiflow::AssemblyAssistant< DIM, DataType >::compute_quadrature_values ( )
private

Definition at line 709 of file assembly_assistant.h.

References hiflow::AssemblyAssistant< DIM, DataType >::q_points_, hiflow::AssemblyAssistant< DIM, DataType >::quadrature_, and hiflow::AssemblyAssistant< DIM, DataType >::weights_.

Referenced by hiflow::AssemblyAssistant< DIM, DataType >::initialize_quadrature().

710  {
711  size_t num_q = quadrature_.size ( );
712  q_points_.resize ( num_q );
713  weights_.resize ( num_q );
714  for ( size_t q = 0; q != num_q; ++q )
715  {
716  for ( size_t c = 0; c != DIM; ++c )
717  {
718  switch ( c )
719  {
720  case 0: q_points_[q][0] = quadrature_.x ( q );
721  break;
722  case 1: q_points_[q][1] = quadrature_.y ( q );
723  break;
724  case 2: q_points_[q][2] = quadrature_.z ( q );
725  break;
726  default: assert ( false );
727  break;
728  }
729  }
730  weights_[q] = quadrature_.w ( q );
731  }
732  }
std::vector< Vec< DIM, DataType > > q_points_
Quadrature points on reference element.
std::vector< DataType > weights_
Quadrature weights.
Quadrature< DataType > quadrature_
Current quadrature.

◆ compute_transformed_cell_values()

template<int DIM, class DataType >
void hiflow::AssemblyAssistant< DIM, DataType >::compute_transformed_cell_values ( )
private

Definition at line 751 of file assembly_assistant.h.

References hiflow::AssemblyAssistant< DIM, DataType >::cell_transform_, hiflow::FunctionValues< T >::compute(), hiflow::AssemblyAssistant< DIM, DataType >::detJ(), hiflow::AssemblyAssistant< DIM, DataType >::detJ_, hiflow::AssemblyAssistant< DIM, DataType >::grad_phi_, hiflow::AssemblyAssistant< DIM, DataType >::grad_phi_hat_, hiflow::AssemblyAssistant< DIM, DataType >::h_, hiflow::AssemblyAssistant< DIM, DataType >::H_mapped_grad_, hiflow::AssemblyAssistant< DIM, DataType >::H_phi_, hiflow::AssemblyAssistant< DIM, DataType >::H_phi_hat_, hiflow::AssemblyAssistant< DIM, DataType >::H_transform_, hiflow::AssemblyAssistant< DIM, DataType >::J_, hiflow::AssemblyAssistant< DIM, DataType >::JinvT_, hiflow::AssemblyAssistant< DIM, DataType >::q_points_, hiflow::AssemblyAssistant< DIM, DataType >::quadrature_, and hiflow::AssemblyAssistant< DIM, DataType >::x_.

Referenced by hiflow::AssemblyAssistant< DIM, DataType >::initialize_cell_values(), and hiflow::AssemblyAssistant< DIM, DataType >::initialize_facet_values().

752  {
753  assert ( q_points_.size ( ) == quadrature_.size ( ) );
754  assert ( cell_transform_ != 0 );
755 
756  // compute quadrature points on physical cell
757  x_.compute ( q_points_, EvalPhysicalPoint<DIM, DataType>( *cell_transform_ ) );
758 
759  // compute jacobians on physical cell
760  J_.compute ( q_points_, EvalPhysicalJacobian<DIM, DataType>( *cell_transform_ ) );
761 
762  // compute hessians on physical cell
763  H_transform_.compute ( q_points_, EvalCellTransformationHessian<DIM, DataType>( *cell_transform_ ) );
764  // compute determinant of jacobians
765  detJ_.compute ( J_, EvalDeterminant<DIM, DataType>( ) );
766 
767  // compute inverse-transpose of jacobians
768  JinvT_.compute ( J_, EvalInvTranspose<DIM, DataType>( ) );
769 
770  // compute JinvT * grad_phi_hat
771  grad_phi_.compute ( JinvT_, EvalMappedShapeFunctionGradients<DIM, DataType>( grad_phi_hat_ ) );
772 
773  H_mapped_grad_.compute ( H_transform_, EvalHMappedGradients<DIM, DataType>( grad_phi_ ) );
774  H_phi_.compute ( JinvT_, EvalMappedShapeFunctionHessians<DIM, DataType>( H_phi_hat_, H_mapped_grad_ ) );
775 
776  // compute mesh parameter h
777  h_ = std::pow ( static_cast < DataType > ( std::abs ( detJ ( 0 ) ) ), static_cast < DataType > ( 1. / static_cast < DataType > ( DIM ) ) );
778  }
std::vector< Vec< DIM, DataType > > q_points_
Quadrature points on reference element.
DataType detJ(int q) const
Determinant of Jacobian matrix of cell transformation.
void compute(const Arguments &arguments, const Function &function)
Evaluates a function object at a set of argument values and stores the function values internally...
FunctionValues< std::vector< Mat< DIM, DIM, DataType > > > H_mapped_grad_
Shape function hessians on physical element.
FunctionValues< Vec< DIM, DataType > > x_
Quadrature points on physical element.
FunctionValues< std::vector< Mat< DIM, DIM, DataType > > > H_transform_
H-mapped shape function gradients on physical element.
DataType h_
Element size parameter h.
FunctionValues< Mat< DIM, DIM, DataType > > J_
Jacobian matrix at quadrature points.
FunctionValues< DataType > detJ_
Determinants of jacobian matrices.
const CellTransformation< DataType > * cell_transform_
Cell transform for current element.
FunctionValues< std::vector< Mat< DIM, DIM, DataType > > > H_phi_
FunctionValues< Mat< DIM, DIM, DataType > > JinvT_
Hessian of cell transformation at quadrature points.
FunctionValues< std::vector< Vec< DIM, DataType > > > grad_phi_
FunctionValues< std::vector< Mat< DIM, DIM, DataType > > > H_phi_hat_
Shape function gradients on physical element.
FunctionValues< std::vector< Vec< DIM, DataType > > > grad_phi_hat_
Shape function hessians on reference element.
Quadrature< DataType > quadrature_
Current quadrature.

◆ compute_transformed_facet_values()

template<int DIM, class DataType >
void hiflow::AssemblyAssistant< DIM, DataType >::compute_transformed_facet_values ( )
private

Definition at line 781 of file assembly_assistant.h.

References hiflow::AssemblyAssistant< DIM, DataType >::cell_transform_, hiflow::FunctionValues< T >::compute(), hiflow::AssemblyAssistant< DIM, DataType >::detJ(), hiflow::AssemblyAssistant< DIM, DataType >::ds_, hiflow::AssemblyAssistant< DIM, DataType >::facet_proj_, hiflow::AssemblyAssistant< DIM, DataType >::h_, hiflow::AssemblyAssistant< DIM, DataType >::J_, hiflow::AssemblyAssistant< DIM, DataType >::Jf_, hiflow::AssemblyAssistant< DIM, DataType >::q_points_, and hiflow::AssemblyAssistant< DIM, DataType >::quadrature_.

Referenced by hiflow::AssemblyAssistant< DIM, DataType >::initialize_facet_values().

782  {
783  assert ( q_points_.size ( ) == quadrature_.size ( ) );
784  assert ( cell_transform_ != 0 );
785 
786  Jf_.compute ( J_, EvalRightMatrixMult < DIM, DIM, DIM - 1, DataType > ( facet_proj_ ) );
787  ds_.compute ( Jf_, EvalSurfaceElement<DIM, DataType>( ) );
788 
789  // compute mesh parameter h
790  h_ = std::pow ( static_cast < DataType > ( std::abs ( detJ ( 0 ) ) ), static_cast < DataType > ( 1. / static_cast < DataType > ( DIM ) ) );
791  }
std::vector< Vec< DIM, DataType > > q_points_
Quadrature points on reference element.
DataType detJ(int q) const
Determinant of Jacobian matrix of cell transformation.
void compute(const Arguments &arguments, const Function &function)
Evaluates a function object at a set of argument values and stores the function values internally...
Mat< DIM, DIM - 1, DataType > facet_proj_
Current facet projection matrix.
DataType h_
Element size parameter h.
FunctionValues< Mat< DIM, DIM, DataType > > J_
Jacobian matrix at quadrature points.
const CellTransformation< DataType > * cell_transform_
Cell transform for current element.
FunctionValues< DataType > ds_
Surface element on facet.
FunctionValues< Mat< DIM, DIM - 1, DataType > > Jf_
Jacobian matrix projected onto facet.
Quadrature< DataType > quadrature_
Current quadrature.

◆ detJ()

template<int DIM, class DataType >
DataType hiflow::AssemblyAssistant< DIM, DataType >::detJ ( int  q) const
inline

Determinant of Jacobian matrix of cell transformation.

Parameters
qindex of the quadrature point
Returns
Jacobian determinant $det(DF_K(\xi_q))$ of the cell transformation $F_K$.

Definition at line 360 of file assembly_assistant.h.

References hiflow::AssemblyAssistant< DIM, DataType >::detJ_.

Referenced by hiflow::AssemblyAssistant< DIM, DataType >::compute_transformed_cell_values(), and hiflow::AssemblyAssistant< DIM, DataType >::compute_transformed_facet_values().

361  {
362  return detJ_[q];
363  }
FunctionValues< DataType > detJ_
Determinants of jacobian matrices.

◆ dof_index()

template<int DIM, class DataType >
int hiflow::AssemblyAssistant< DIM, DataType >::dof_index ( int  s,
int  var 
) const
inline

Local dof index for dof s of variable var.

Parameters
sdof index relative to variable var ( in range [0, num_dofs(var)) )
varvariable number
Returns
Local dof index $l = l(var, s)$ for dof $s$ for variable var.

Definition at line 431 of file assembly_assistant.h.

References hiflow::AssemblyAssistant< DIM, DataType >::dof_offset_for_var_.

Referenced by hiflow::AssemblyAssistant< DIM, DataType >::extract_dof_values().

432  {
433  return dof_offset_for_var_[var] + i;
434  }
std::vector< int > dof_offset_for_var_
Mapping var -> dof offset.

◆ ds()

template<int DIM, class DataType >
DataType hiflow::AssemblyAssistant< DIM, DataType >::ds ( int  q) const
inline

Surface integration element.

Precondition
Assembly assistant was initialized on a facet.
Parameters
qindex of the quadrature point
Returns
Surface integration element ds(q) = (det(Jf^T * Jf)) on current facet.

Definition at line 373 of file assembly_assistant.h.

References hiflow::AssemblyAssistant< DIM, DataType >::ds_, and hiflow::AssemblyAssistant< DIM, DataType >::facet_number_.

374  {
375  assert ( facet_number_ > -1 );
376  return ds_[q];
377  }
int facet_number_
Current facet number (-1 on cell)
FunctionValues< DataType > ds_
Surface element on facet.

◆ evaluate_fe_function()

template<int DIM, class DataType >
template<class VectorType >
void hiflow::AssemblyAssistant< DIM, DataType >::evaluate_fe_function ( const VectorType &  coefficients,
int  var,
FunctionValues< DataType > &  function_values 
) const

Evaluate a finite element function on the current element.

Parameters
[in]coefficientsglobal vector of dof values for the function.
[in]varvariable to compute the function for.
[out]function_valuesfunction values evaluated at all quadrature points.

Definition at line 444 of file assembly_assistant.h.

References hiflow::FunctionValues< T >::compute(), hiflow::AssemblyAssistant< DIM, DataType >::extract_dof_values(), hiflow::AssemblyAssistant< DIM, DataType >::fe_offsets_for_var_, and hiflow::AssemblyAssistant< DIM, DataType >::phi_.

446  {
447  // extract dof-values corresponding to local variable
448  const std::vector<DataType> local_coefficients = extract_dof_values ( coefficients, var );
449 
450  // compute function values
451  function_values.compute ( phi_,
452  EvalFiniteElementFunction<DataType>( fe_offsets_for_var_[var],
453  local_coefficients ) );
454  }
void compute(const Arguments &arguments, const Function &function)
Evaluates a function object at a set of argument values and stores the function values internally...
FunctionValues< std::vector< DataType > > phi_
Shape function values.
std::vector< int > fe_offsets_for_var_
Mapping var -> FEType.
std::vector< DataType > extract_dof_values(const VectorType &coefficients, int var) const

◆ evaluate_fe_function_gradients()

template<int DIM, class DataType >
template<class VectorType >
void hiflow::AssemblyAssistant< DIM, DataType >::evaluate_fe_function_gradients ( const VectorType &  coefficients,
int  var,
FunctionValues< Vec< DIM, DataType > > &  function_gradients 
) const

Evaluate the gradient of a finite element function on the current element.

Parameters
[in]coefficientsglobal vector of dof values for the function.
[in]varvariable to compute the gradient for.
[out]function_gradientsfunction gradients at all quadrature points.

Definition at line 458 of file assembly_assistant.h.

References hiflow::AssemblyAssistant< DIM, DataType >::extract_dof_values(), hiflow::AssemblyAssistant< DIM, DataType >::fe_offsets_for_var_, and hiflow::AssemblyAssistant< DIM, DataType >::grad_phi_.

460  {
461  // extract dof-values corresponding to local variable
462  const std::vector<DataType> local_coefficients = extract_dof_values ( coefficients, var );
463 
464  // compute function values
465  function_gradients.compute ( grad_phi_,
466  EvalFiniteElementFunctionGradient<DIM, DataType>( fe_offsets_for_var_[var],
467  local_coefficients ) );
468  }
std::vector< int > fe_offsets_for_var_
Mapping var -> FEType.
std::vector< DataType > extract_dof_values(const VectorType &coefficients, int var) const
FunctionValues< std::vector< Vec< DIM, DataType > > > grad_phi_

◆ evaluate_fe_function_hessians()

template<int DIM, class DataType >
template<class VectorType >
void hiflow::AssemblyAssistant< DIM, DataType >::evaluate_fe_function_hessians ( const VectorType &  coefficients,
int  var,
FunctionValues< Mat< DIM, DIM, DataType > > &  function_hessians 
) const

Evaluate the hessian of a finite element function on the current element.

Parameters
[in]coefficientsglobal vector of dof values for the function.
[in]varvariable to compute the gradient for.
[out]function_hessiansfunction gradients at all quadrature points.

Definition at line 472 of file assembly_assistant.h.

References hiflow::AssemblyAssistant< DIM, DataType >::extract_dof_values(), hiflow::AssemblyAssistant< DIM, DataType >::fe_offsets_for_var_, and hiflow::AssemblyAssistant< DIM, DataType >::H_phi_.

474  {
475  // extract dof-values corresponding to local variable
476  const std::vector<DataType> local_coefficients = extract_dof_values ( coefficients, var );
477 
478  // compute function values
479  function_hessians.compute ( H_phi_,
480  EvalFiniteElementFunctionHessian<DIM, DataType>( fe_offsets_for_var_[var],
481  local_coefficients ) );
482  }
FunctionValues< std::vector< Mat< DIM, DIM, DataType > > > H_phi_
std::vector< int > fe_offsets_for_var_
Mapping var -> FEType.
std::vector< DataType > extract_dof_values(const VectorType &coefficients, int var) const

◆ extract_dof_values()

template<int DIM, class DataType >
template<class VectorType >
std::vector< DataType > hiflow::AssemblyAssistant< DIM, DataType >::extract_dof_values ( const VectorType &  coefficients,
int  var 
) const
private

Definition at line 1423 of file assembly_assistant.h.

References hiflow::AssemblyAssistant< DIM, DataType >::dof_index(), hiflow::AssemblyAssistant< DIM, DataType >::global_dof_indices_, hiflow::AssemblyAssistant< DIM, DataType >::num_dofs(), and hiflow::vec2ptr().

Referenced by hiflow::AssemblyAssistant< DIM, DataType >::evaluate_fe_function(), hiflow::AssemblyAssistant< DIM, DataType >::evaluate_fe_function_gradients(), and hiflow::AssemblyAssistant< DIM, DataType >::evaluate_fe_function_hessians().

1425  {
1426  // extract dof-values corresponding to local variable
1427 
1428  // find global dof indices corresponding to this variable
1429  const size_t num_var_dofs = num_dofs ( var );
1430  std::vector<DataType> local_coefficients ( num_var_dofs, 0. );
1431  std::vector<int> var_dof_indices ( num_var_dofs, -1 );
1432  for ( size_t i = 0; i != num_var_dofs; ++i )
1433  {
1434  var_dof_indices[i] = this->global_dof_indices_[dof_index ( i, var )];
1435  }
1436  coefficients.GetValues ( vec2ptr ( var_dof_indices ), num_var_dofs, vec2ptr ( local_coefficients ) );
1437  return local_coefficients;
1438  }
int num_dofs(int var) const
Number of local dofs for a variable.
T * vec2ptr(std::vector< T > &vec)
Conversion from vector to pointer to first element.
Definition: pointers.h:57
int dof_index(int s, int var) const
Local dof index for dof s of variable var.
std::vector< int > global_dof_indices_
Global dofs for current element.

◆ find_fe_type()

template<int DIM, class DataType >
int hiflow::AssemblyAssistant< DIM, DataType >::find_fe_type ( const FEType< DataType > *  fe_type) const
private

Definition at line 682 of file assembly_assistant.h.

References hiflow::AssemblyAssistant< DIM, DataType >::fe_types_, and hiflow::doffem::FEType< DataType >::get_global_id().

Referenced by hiflow::AssemblyAssistant< DIM, DataType >::initialize_fe_types().

683  {
684  assert ( fe_type != 0 );
685  int pos = 0;
686  bool fe_type_found = false;
687  typedef typename std::vector<const FEType<DataType>* >::const_iterator Iterator;
688  for ( Iterator it = fe_types_.begin ( ), e_it = fe_types_.end ( ); it != e_it; ++it )
689  {
690  if ( ( *it )->get_global_id ( ) == fe_type->get_global_id ( ) )
691  {
692  fe_type_found = true;
693  break;
694  }
695  ++pos;
696  }
697 
698  if ( fe_type_found )
699  {
700  return pos;
701  }
702  else
703  {
704  return -1;
705  }
706  }
std::vector< const FEType< DataType > *> fe_types_
Current FEType:s.

◆ grad_phi()

template<int DIM, class DataType >
const Vec< DIM, DataType > & hiflow::AssemblyAssistant< DIM, DataType >::grad_phi ( int  s,
int  q,
int  var = 0 
) const
inline

Shape function gradients on physical element.

Parameters
sindex of the shape function (relative to variable var if given)
qindex of the quadrature point
varvariable number
Returns
Shape function gradient $\nabla\varphi_{v,i}(x_q)$

Definition at line 324 of file assembly_assistant.h.

References hiflow::AssemblyAssistant< DIM, DataType >::fe_offsets_for_var_, and hiflow::AssemblyAssistant< DIM, DataType >::grad_phi_.

325  {
326  return grad_phi_[q][fe_offsets_for_var_[var] + s];
327  }
std::vector< int > fe_offsets_for_var_
Mapping var -> FEType.
FunctionValues< std::vector< Vec< DIM, DataType > > > grad_phi_

◆ h()

template<int DIM, class DataType >
DataType hiflow::AssemblyAssistant< DIM, DataType >::h ( ) const
inline

Element size parameter h.

Returns
Element size parameter h

Definition at line 437 of file assembly_assistant.h.

References hiflow::AssemblyAssistant< DIM, DataType >::h_.

438  {
439  return h_;
440  }
DataType h_
Element size parameter h.

◆ H_F()

template<int DIM, class DataType >
const std::vector< Mat< DIM, DIM, DataType > > & hiflow::AssemblyAssistant< DIM, DataType >::H_F ( int  q) const
inline

Hessian tensor of cell transformation.

Parameters
qindex of the quadrature point
Returns
Hessian tensor $H_{ijk} = \partial_j\partial_k{F_i}$ of the cell transformation $F_K$. Index i is the position in the vector, and jk the indices for the contained matrices.

Definition at line 354 of file assembly_assistant.h.

References hiflow::AssemblyAssistant< DIM, DataType >::H_transform_.

355  {
356  return H_transform_[q];
357  }
FunctionValues< std::vector< Mat< DIM, DIM, DataType > > > H_transform_
H-mapped shape function gradients on physical element.

◆ H_phi()

template<int DIM, class DataType >
const Mat< DIM, DIM, DataType > & hiflow::AssemblyAssistant< DIM, DataType >::H_phi ( int  s,
int  q,
int  var = 0 
) const
inline

Shape function hessian on physical element.

Parameters
sindex of the shape function (relative to variable var if given)
qindex of the quadrature point
varvariable number
Returns
Shape function hessian $\partial_j\partial_k\varphi_{v,i}(x_q)$
Todo:
This function has not been tested yet.

Definition at line 330 of file assembly_assistant.h.

References hiflow::AssemblyAssistant< DIM, DataType >::fe_offsets_for_var_, and hiflow::AssemblyAssistant< DIM, DataType >::H_phi_.

331  {
332  return H_phi_[q][fe_offsets_for_var_[var] + s];
333  }
FunctionValues< std::vector< Mat< DIM, DIM, DataType > > > H_phi_
std::vector< int > fe_offsets_for_var_
Mapping var -> FEType.

◆ initialize_cell_values()

template<int DIM, class DataType >
bool hiflow::AssemblyAssistant< DIM, DataType >::initialize_cell_values ( const Element< DataType > &  element,
bool  force_update 
)
private

Definition at line 625 of file assembly_assistant.h.

References hiflow::AssemblyAssistant< DIM, DataType >::cell_index_, hiflow::AssemblyAssistant< DIM, DataType >::cell_transform_, hiflow::AssemblyAssistant< DIM, DataType >::cell_type_, hiflow::AssemblyAssistant< DIM, DataType >::compute_transformed_cell_values(), hiflow::Element< DataType >::get_cell(), hiflow::Element< DataType >::get_cell_index(), and hiflow::Element< DataType >::get_cell_transformation().

Referenced by hiflow::AssemblyAssistant< DIM, DataType >::initialize_for_element().

627  {
628  mesh::EntityNumber new_cell_index = element.get_cell_index ( );
629 
630  if ( force_update || ( cell_index_ != new_cell_index ) )
631  {
632  cell_index_ = new_cell_index;
633  cell_type_ = element.get_cell ( ).cell_type ( ).tag ( );
634  cell_transform_ = element.get_cell_transformation ( );
635 
637  return true;
638  }
639  return false;
640  }
const CellTransformation< DataType > * cell_transform_
Cell transform for current element.
mesh::EntityNumber cell_index_
Current cell index.
mesh::CellType::Tag cell_type_
Cell type of current element.
int EntityNumber
Definition: types.h:72

◆ initialize_facet_values()

template<int DIM, class DataType >
bool hiflow::AssemblyAssistant< DIM, DataType >::initialize_facet_values ( const Element< DataType > &  element,
int  facet,
bool  force_update 
)
private

Definition at line 643 of file assembly_assistant.h.

References hiflow::AssemblyAssistant< DIM, DataType >::cell_index_, hiflow::AssemblyAssistant< DIM, DataType >::cell_transform_, hiflow::AssemblyAssistant< DIM, DataType >::cell_type_, hiflow::AssemblyAssistant< DIM, DataType >::compute_facet_normal(), hiflow::AssemblyAssistant< DIM, DataType >::compute_facet_projection_matrix(), hiflow::AssemblyAssistant< DIM, DataType >::compute_transformed_cell_values(), hiflow::AssemblyAssistant< DIM, DataType >::compute_transformed_facet_values(), hiflow::AssemblyAssistant< DIM, DataType >::facet_number_, hiflow::Element< DataType >::get_cell(), hiflow::Element< DataType >::get_cell_index(), hiflow::Element< DataType >::get_cell_transformation(), and hiflow::AssemblyAssistant< DIM, DataType >::nitsche_regularization_.

Referenced by hiflow::AssemblyAssistant< DIM, DataType >::initialize_for_facet().

646  {
647 
648  if ( DIM == 1 )
649  {
650  throw "Facet integration not possible for DIM = 1\n";
651  }
652 
653  mesh::EntityNumber new_cell_index = element.get_cell_index ( );
654 
655  if ( force_update
656  || facet_number_ != facet
657  || ( cell_index_ != new_cell_index ) )
658  {
659 
660  //compute map: local facet dof to local cell dof
661 
662  cell_index_ = new_cell_index;
663  cell_type_ = element.get_cell ( ).cell_type ( ).tag ( );
664  cell_transform_ = element.get_cell_transformation ( );
665 
667 
668  // facet - specific initialization
669  facet_number_ = facet;
670  // TODO: Compute this parameter in some way
675 
676  return true;
677  }
678  return false;
679  }
DataType nitsche_regularization_
Regularization parameter for Nitsche method.
int facet_number_
Current facet number (-1 on cell)
const CellTransformation< DataType > * cell_transform_
Cell transform for current element.
mesh::EntityNumber cell_index_
Current cell index.
mesh::CellType::Tag cell_type_
Cell type of current element.
int EntityNumber
Definition: types.h:72

◆ initialize_fe_types()

template<int DIM, class DataType >
bool hiflow::AssemblyAssistant< DIM, DataType >::initialize_fe_types ( const Element< DataType > &  element,
bool  force_update 
)
private

Definition at line 554 of file assembly_assistant.h.

References hiflow::AssemblyAssistant< DIM, DataType >::compute_fe_values(), hiflow::AssemblyAssistant< DIM, DataType >::dof_offset_for_var_, hiflow::AssemblyAssistant< DIM, DataType >::fe_offsets_for_var_, hiflow::AssemblyAssistant< DIM, DataType >::fe_types_, hiflow::AssemblyAssistant< DIM, DataType >::find_fe_type(), hiflow::Element< DataType >::get_fe_type(), hiflow::Element< DataType >::get_num_dofs(), hiflow::Element< DataType >::get_num_variables(), hiflow::AssemblyAssistant< DIM, DataType >::num_dofs(), hiflow::AssemblyAssistant< DIM, DataType >::num_dofs_for_var_, and hiflow::AssemblyAssistant< DIM, DataType >::num_vars().

Referenced by hiflow::AssemblyAssistant< DIM, DataType >::initialize_for_element(), and hiflow::AssemblyAssistant< DIM, DataType >::initialize_for_facet().

555  {
556  const size_t num_vars = element.get_num_variables ( );
557 
558  // fe_types_.empty() is true the first time function is called
559  bool need_fe_update = force_update || fe_types_.empty ( );
560 
561  // check if element type changed
562  if ( !need_fe_update )
563  {
564  for ( size_t var = 0; var != num_vars; ++var )
565  {
566  const FEType<DataType>* element_fe_type = element.get_fe_type ( var );
567 
568  // check that we have Lagrange element (so that we can get degree)
569  assert ( element_fe_type != 0 );
570 
571  // check if element_fe_type already exists
572  const int pos = find_fe_type ( element_fe_type );
573  if ( pos < 0 )
574  {
575  need_fe_update = true;
576  break;
577  }
578  }
579  }
580 
581  if ( need_fe_update )
582  {
583  fe_types_.clear ( );
584  fe_offsets_for_var_.clear ( );
585  num_dofs_for_var_.clear ( );
586  dof_offset_for_var_.clear ( );
587 
588  fe_types_.reserve ( num_vars );
589  fe_offsets_for_var_.reserve ( num_vars );
590  dof_offset_for_var_.reserve ( num_vars );
591 
592  int offset = 0;
593  int num_dofs = 0;
594 
595  std::vector<int> pos2offset;
596  pos2offset.reserve ( num_vars );
597 
598  // rebuild fe_types_ and var_offsets_ vectors
599  for ( size_t var = 0; var != num_vars; ++var )
600  {
601  const FEType<DataType>* element_fe_type = element.get_fe_type ( var );
602  assert ( element_fe_type != 0 );
603  const int pos = find_fe_type ( element_fe_type );
604  if ( pos < 0 )
605  { // this fe_type has not been added before
606  fe_types_.push_back ( element_fe_type );
607  fe_offsets_for_var_.push_back ( offset );
608  pos2offset.push_back ( offset );
609  offset += element.get_num_dofs ( var );
610  }
611  else
612  {
613  fe_offsets_for_var_.push_back ( pos2offset[pos] );
614  }
615  num_dofs_for_var_.push_back ( element.get_num_dofs ( var ) );
616  dof_offset_for_var_.push_back ( num_dofs );
617  num_dofs += num_dofs_for_var_.back ( );
618  }
619  compute_fe_values ( );
620  }
621  return need_fe_update;
622  }
int num_vars() const
Number of variables.
int num_dofs(int var) const
Number of local dofs for a variable.
std::vector< const FEType< DataType > *> fe_types_
Current FEType:s.
std::vector< int > num_dofs_for_var_
Number of dofs / var.
std::vector< int > fe_offsets_for_var_
Mapping var -> FEType.
int find_fe_type(const FEType< DataType > *fe_type) const
std::vector< int > dof_offset_for_var_
Mapping var -> dof offset.

◆ initialize_for_element()

template<int DIM, class DataType >
void hiflow::AssemblyAssistant< DIM, DataType >::initialize_for_element ( const Element< DataType > &  element,
const Quadrature< DataType > &  element_quadrature 
)

Initialize the assistant for an element and a quadrature.

Recomputes all necessary values on the given element for the given quadrature formula

Parameters
[in]elementelement for which to initialize the AssemblyAssistant
[in]quadraturequadrature rule

Definition at line 485 of file assembly_assistant.h.

References hiflow::AssemblyAssistant< DIM, DataType >::facet_number_, hiflow::Element< DataType >::get_dof_indices(), hiflow::AssemblyAssistant< DIM, DataType >::global_dof_indices_, hiflow::AssemblyAssistant< DIM, DataType >::initialize_cell_values(), hiflow::AssemblyAssistant< DIM, DataType >::initialize_fe_types(), and hiflow::AssemblyAssistant< DIM, DataType >::initialize_quadrature().

487  {
488 
489  facet_number_ = -1;
490 
491  // initialize quadrature
492  const bool changed_quadrature = initialize_quadrature ( element_quadrature, false );
493 
494  // initialize fe types
495  const bool changed_fe_types = initialize_fe_types ( element, changed_quadrature );
496 
497  // compute transform values for new cell
498  initialize_cell_values ( element, changed_quadrature || changed_fe_types );
499 
500  // update global dof indices
501  this->global_dof_indices_.clear ( );
502  element.get_dof_indices ( this->global_dof_indices_ );
503 
504  }
bool initialize_quadrature(const Quadrature< DataType > &new_quadrature, bool force_update)
bool initialize_cell_values(const Element< DataType > &element, bool force_update)
int facet_number_
Current facet number (-1 on cell)
std::vector< int > global_dof_indices_
Global dofs for current element.
bool initialize_fe_types(const Element< DataType > &element, bool force_update)

◆ initialize_for_facet()

template<int DIM, class DataType >
void hiflow::AssemblyAssistant< DIM, DataType >::initialize_for_facet ( const Element< DataType > &  element,
const Quadrature< DataType > &  facet_quadrature,
int  facet_number 
)

Initialize the assistant for a facet of the element and a quadrature.

Recomputes all necessary values on the given element for the given quadrature formula and facet.

Parameters
[in]elementelement for which to initialize the AssemblyAssistant
[in]facet_quadraturequadrature rule (should have points only on the given element facet)
[in]facet_numberlocal number of facet in element

Definition at line 507 of file assembly_assistant.h.

References hiflow::AssemblyAssistant< DIM, DataType >::facet_number_, hiflow::Element< DataType >::get_dof_indices(), hiflow::AssemblyAssistant< DIM, DataType >::global_dof_indices_, hiflow::AssemblyAssistant< DIM, DataType >::initialize_facet_values(), hiflow::AssemblyAssistant< DIM, DataType >::initialize_fe_types(), and hiflow::AssemblyAssistant< DIM, DataType >::initialize_quadrature().

510  {
511 
512  // initialize quadrature
513  bool force_update = true; //(facet_number_ != facet_number);
514  facet_number_ = facet_number;
515 
516  const bool changed_quadrature = initialize_quadrature ( facet_quadrature, force_update );
517 
518  // initialize fe types
519  const bool changed_fe_types = initialize_fe_types ( element, changed_quadrature );
520 
521  // compute transform values for new facet
522  initialize_facet_values ( element, facet_number, changed_quadrature || changed_fe_types );
523 
524  // update global dof indices
525  this->global_dof_indices_.clear ( );
526  element.get_dof_indices ( this->global_dof_indices_ );
527  }
bool initialize_quadrature(const Quadrature< DataType > &new_quadrature, bool force_update)
int facet_number_
Current facet number (-1 on cell)
bool initialize_facet_values(const Element< DataType > &element, int facet, bool force_update)
std::vector< int > global_dof_indices_
Global dofs for current element.
bool initialize_fe_types(const Element< DataType > &element, bool force_update)

◆ initialize_quadrature()

template<int DIM, class DataType >
bool hiflow::AssemblyAssistant< DIM, DataType >::initialize_quadrature ( const Quadrature< DataType > &  new_quadrature,
bool  force_update 
)
private

Definition at line 530 of file assembly_assistant.h.

References hiflow::AssemblyAssistant< DIM, DataType >::compute_quadrature_values(), hiflow::Quadrature< DataType >::name(), hiflow::AssemblyAssistant< DIM, DataType >::quadrature_, and hiflow::Quadrature< DataType >::size().

Referenced by hiflow::AssemblyAssistant< DIM, DataType >::initialize_for_element(), and hiflow::AssemblyAssistant< DIM, DataType >::initialize_for_facet().

532  {
533  // check if quadrature changed
534  bool need_quadrature_update = force_update || quadrature_.size ( ) == 0;
535  if ( !need_quadrature_update )
536  {
537  if ( new_quadrature.size ( ) != quadrature_.size ( )
538  || new_quadrature.name ( ) != quadrature_.name ( ) )
539  {
540  need_quadrature_update = true;
541  }
542  }
543 
544  if ( need_quadrature_update )
545  {
546  // copy quadrature
547  quadrature_ = new_quadrature;
549  }
550  return need_quadrature_update;
551  }
Quadrature< DataType > quadrature_
Current quadrature.

◆ J()

template<int DIM, class DataType >
const Mat< DIM, DIM, DataType > & hiflow::AssemblyAssistant< DIM, DataType >::J ( int  q) const
inline

Jacobian matrix of cell transformation.

Parameters
qindex of the quadrature point
Returns
Jacobian matrix $DF_K(\xi_q)$ of the cell transformation $F_K$.

Definition at line 342 of file assembly_assistant.h.

References hiflow::AssemblyAssistant< DIM, DataType >::J_.

343  {
344  return J_[q];
345  }
FunctionValues< Mat< DIM, DIM, DataType > > J_
Jacobian matrix at quadrature points.

◆ Jf()

template<int DIM, class DataType >
const Mat< DIM, DIM - 1, DataType > & hiflow::AssemblyAssistant< DIM, DataType >::Jf ( int  q) const
inline

Jacobian matrix projected onto current facet.

Precondition
Assembly assistant was initialized on a facet.
Parameters
qindex of the quadrature point
Returns
Jf(q) = J(q) * R, where R is projection matrix corresponding to current facet.

Definition at line 366 of file assembly_assistant.h.

References hiflow::AssemblyAssistant< DIM, DataType >::facet_number_, and hiflow::AssemblyAssistant< DIM, DataType >::Jf_.

367  {
368  assert ( facet_number_ > -1 );
369  return Jf_[q];
370  }
int facet_number_
Current facet number (-1 on cell)
FunctionValues< Mat< DIM, DIM - 1, DataType > > Jf_
Jacobian matrix projected onto facet.

◆ JinvT()

template<int DIM, class DataType >
const Mat< DIM, DIM, DataType > & hiflow::AssemblyAssistant< DIM, DataType >::JinvT ( int  q) const
inline

Inverse transpose of Jacobian matrix of cell transformation.

Parameters
qindex of the quadrature point
Returns
Inverse transpose $(DF_K(\xi_q))^{-T}$ of the jacobian matrix of the cell transformation $F_K$.

Definition at line 348 of file assembly_assistant.h.

References hiflow::AssemblyAssistant< DIM, DataType >::JinvT_.

349  {
350  return JinvT_[q];
351  }
FunctionValues< Mat< DIM, DIM, DataType > > JinvT_
Hessian of cell transformation at quadrature points.

◆ n()

template<int DIM, class DataType >
const Vec< DIM, DataType > & hiflow::AssemblyAssistant< DIM, DataType >::n ( int  q) const
inline

Surface normal.

Precondition
Assembly assistant was initialized on a facet.
Parameters
qindex of the quadrature point
Returns
Surface normal n on current (reference) facet.

Definition at line 380 of file assembly_assistant.h.

References hiflow::AssemblyAssistant< DIM, DataType >::facet_number_, and hiflow::AssemblyAssistant< DIM, DataType >::mapped_n_.

381  {
382  assert ( facet_number_ > -1 );
383  return mapped_n_[q];
384  }
int facet_number_
Current facet number (-1 on cell)
FunctionValues< Vec< DIM, DataType > > mapped_n_
Normals on physical element.

◆ nitsche_regularization()

template<int DIM, class DataType >
DataType hiflow::AssemblyAssistant< DIM, DataType >::nitsche_regularization ( int  q) const
inline

The Nitsche regularization parameter used in Nitsche method.

Precondition
Assembly assistant was initialized on a facet.
Parameters
qindex of the quadrature point
Returns
Nitsche regularization parameter.
Todo:
Compute it in some good way.

Definition at line 387 of file assembly_assistant.h.

References hiflow::AssemblyAssistant< DIM, DataType >::facet_number_, and hiflow::AssemblyAssistant< DIM, DataType >::nitsche_regularization_.

388  {
389  assert ( facet_number_ > -1 );
390  // TODO: use q and specify this parameter somehow
392  }
DataType nitsche_regularization_
Regularization parameter for Nitsche method.
int facet_number_
Current facet number (-1 on cell)

◆ num_dofs()

template<int DIM, class DataType >
int hiflow::AssemblyAssistant< DIM, DataType >::num_dofs ( int  var) const
inline

Number of local dofs for a variable.

Parameters
varvariable number
Returns
Number of local dofs for variable var.

Definition at line 413 of file assembly_assistant.h.

References hiflow::AssemblyAssistant< DIM, DataType >::num_dofs_for_var_.

Referenced by hiflow::AssemblyAssistant< DIM, DataType >::extract_dof_values(), and hiflow::AssemblyAssistant< DIM, DataType >::initialize_fe_types().

414  {
415  return num_dofs_for_var_[var];
416  }
std::vector< int > num_dofs_for_var_
Number of dofs / var.

◆ num_dofs_total()

template<int DIM, class DataType >
int hiflow::AssemblyAssistant< DIM, DataType >::num_dofs_total ( ) const
inline

Number of local dofs.

Returns
Total number of local dofs for all variables.

Definition at line 419 of file assembly_assistant.h.

References hiflow::AssemblyAssistant< DIM, DataType >::num_dofs_for_var_.

420  {
421  return std::accumulate ( num_dofs_for_var_.begin ( ), num_dofs_for_var_.end ( ), 0 );
422  }
std::vector< int > num_dofs_for_var_
Number of dofs / var.

◆ num_quadrature_points()

template<int DIM, class DataType >
int hiflow::AssemblyAssistant< DIM, DataType >::num_quadrature_points ( ) const
inline

Number of quadrature points.

Returns
Number of quadrature points for current quadrature rule.

Definition at line 401 of file assembly_assistant.h.

References hiflow::AssemblyAssistant< DIM, DataType >::q_points_.

402  {
403  return q_points_.size ( );
404  }
std::vector< Vec< DIM, DataType > > q_points_
Quadrature points on reference element.

◆ num_vars()

template<int DIM, class DataType >
int hiflow::AssemblyAssistant< DIM, DataType >::num_vars ( ) const
inline

Number of variables.

Returns
Number of variables.

Definition at line 425 of file assembly_assistant.h.

References hiflow::AssemblyAssistant< DIM, DataType >::num_dofs_for_var_.

Referenced by hiflow::AssemblyAssistant< DIM, DataType >::initialize_fe_types().

426  {
427  return num_dofs_for_var_.size ( );
428  }
std::vector< int > num_dofs_for_var_
Number of dofs / var.

◆ phi()

template<int DIM, class DataType >
DataType hiflow::AssemblyAssistant< DIM, DataType >::phi ( int  s,
int  q,
int  var = 0 
) const
inline

Shape function values on physical element.

Parameters
sindex of the shape function (relative to variable var if given)
qindex of the quadrature point
varvariable number
Returns
Shape function value $\varphi_{v,i}(\xi_q)$

Definition at line 318 of file assembly_assistant.h.

References hiflow::AssemblyAssistant< DIM, DataType >::fe_offsets_for_var_, and hiflow::AssemblyAssistant< DIM, DataType >::phi_.

319  {
320  return phi_[q][fe_offsets_for_var_[var] + s];
321  }
FunctionValues< std::vector< DataType > > phi_
Shape function values.
std::vector< int > fe_offsets_for_var_
Mapping var -> FEType.

◆ q_point()

template<int DIM, class DataType >
const Vec< DIM, DataType > & hiflow::AssemblyAssistant< DIM, DataType >::q_point ( int  q) const
inline

Quadrature point on reference element.

Parameters
qindex of the quadrature point
Returns
Quadrature point $\xi_q$ on reference element

Definition at line 395 of file assembly_assistant.h.

References hiflow::AssemblyAssistant< DIM, DataType >::q_points_.

396  {
397  return q_points_[q];
398  }
std::vector< Vec< DIM, DataType > > q_points_
Quadrature points on reference element.

◆ w()

template<int DIM, class DataType >
DataType hiflow::AssemblyAssistant< DIM, DataType >::w ( int  q) const
inline

Quadrature weights.

Parameters
qindex of the quadrature point
Returns
Quadrature weight $w_q$ for the

Definition at line 407 of file assembly_assistant.h.

References hiflow::AssemblyAssistant< DIM, DataType >::weights_.

408  {
409  return weights_[q];
410  }
std::vector< DataType > weights_
Quadrature weights.

◆ x()

template<int DIM, class DataType >
const Vec< DIM, DataType > & hiflow::AssemblyAssistant< DIM, DataType >::x ( int  q) const
inline

Quadrature point on physical element.

Parameters
qindex of the quadrature point
Returns
Quadrature point $x_q$ on physical element

Definition at line 336 of file assembly_assistant.h.

References hiflow::AssemblyAssistant< DIM, DataType >::x_.

337  {
338  return x_[q];
339  }
FunctionValues< Vec< DIM, DataType > > x_
Quadrature points on physical element.

Member Data Documentation

◆ cell_index_

template<int DIM, class DataType>
mesh::EntityNumber hiflow::AssemblyAssistant< DIM, DataType >::cell_index_
private

◆ cell_transform_

template<int DIM, class DataType>
const CellTransformation<DataType>* hiflow::AssemblyAssistant< DIM, DataType >::cell_transform_
private

◆ cell_type_

template<int DIM, class DataType>
mesh::CellType::Tag hiflow::AssemblyAssistant< DIM, DataType >::cell_type_
private

◆ detJ_

template<int DIM, class DataType>
FunctionValues<DataType> hiflow::AssemblyAssistant< DIM, DataType >::detJ_
private

◆ dof_offset_for_var_

template<int DIM, class DataType>
std::vector<int> hiflow::AssemblyAssistant< DIM, DataType >::dof_offset_for_var_
private

◆ ds_

template<int DIM, class DataType>
FunctionValues<DataType> hiflow::AssemblyAssistant< DIM, DataType >::ds_
private

◆ facet_number_

template<int DIM, class DataType>
int hiflow::AssemblyAssistant< DIM, DataType >::facet_number_
private

◆ facet_proj_

template<int DIM, class DataType>
Mat< DIM, DIM - 1, DataType > hiflow::AssemblyAssistant< DIM, DataType >::facet_proj_
private

◆ fe_offsets_for_var_

template<int DIM, class DataType>
std::vector<int> hiflow::AssemblyAssistant< DIM, DataType >::fe_offsets_for_var_
private

◆ fe_types_

template<int DIM, class DataType>
std::vector<const FEType<DataType>* > hiflow::AssemblyAssistant< DIM, DataType >::fe_types_
private

◆ global_dof_indices_

template<int DIM, class DataType>
std::vector<int> hiflow::AssemblyAssistant< DIM, DataType >::global_dof_indices_
private

◆ grad_phi_

template<int DIM, class DataType>
FunctionValues< std::vector< Vec<DIM, DataType> > > hiflow::AssemblyAssistant< DIM, DataType >::grad_phi_
private

◆ grad_phi_hat_

template<int DIM, class DataType>
FunctionValues< std::vector< Vec<DIM, DataType> > > hiflow::AssemblyAssistant< DIM, DataType >::grad_phi_hat_
private

◆ h_

template<int DIM, class DataType>
DataType hiflow::AssemblyAssistant< DIM, DataType >::h_
private

◆ H_mapped_grad_

template<int DIM, class DataType>
FunctionValues< std::vector< Mat<DIM, DIM, DataType> > > hiflow::AssemblyAssistant< DIM, DataType >::H_mapped_grad_
private

Shape function hessians on physical element.

Definition at line 298 of file assembly_assistant.h.

Referenced by hiflow::AssemblyAssistant< DIM, DataType >::compute_transformed_cell_values().

◆ H_phi_

template<int DIM, class DataType>
FunctionValues< std::vector< Mat<DIM, DIM, DataType> > > hiflow::AssemblyAssistant< DIM, DataType >::H_phi_
private

◆ H_phi_hat_

template<int DIM, class DataType>
FunctionValues< std::vector< Mat<DIM, DIM, DataType> > > hiflow::AssemblyAssistant< DIM, DataType >::H_phi_hat_
private

◆ H_transform_

template<int DIM, class DataType>
FunctionValues< std::vector< Mat<DIM, DIM, DataType> > > hiflow::AssemblyAssistant< DIM, DataType >::H_transform_
private

H-mapped shape function gradients on physical element.

Definition at line 295 of file assembly_assistant.h.

Referenced by hiflow::AssemblyAssistant< DIM, DataType >::compute_transformed_cell_values(), and hiflow::AssemblyAssistant< DIM, DataType >::H_F().

◆ J_

template<int DIM, class DataType>
FunctionValues< Mat<DIM, DIM, DataType> > hiflow::AssemblyAssistant< DIM, DataType >::J_
private

◆ Jf_

template<int DIM, class DataType>
FunctionValues< Mat < DIM, DIM - 1, DataType > > hiflow::AssemblyAssistant< DIM, DataType >::Jf_
private

◆ JinvT_

template<int DIM, class DataType>
FunctionValues< Mat<DIM, DIM, DataType> > hiflow::AssemblyAssistant< DIM, DataType >::JinvT_
private

Hessian of cell transformation at quadrature points.

Inverse-transpose of jacobian matrices

Definition at line 293 of file assembly_assistant.h.

Referenced by hiflow::AssemblyAssistant< DIM, DataType >::compute_facet_normal(), hiflow::AssemblyAssistant< DIM, DataType >::compute_transformed_cell_values(), and hiflow::AssemblyAssistant< DIM, DataType >::JinvT().

◆ mapped_n_

template<int DIM, class DataType>
FunctionValues< Vec<DIM, DataType> > hiflow::AssemblyAssistant< DIM, DataType >::mapped_n_
private

◆ n_

template<int DIM, class DataType>
Vec<DIM, DataType> hiflow::AssemblyAssistant< DIM, DataType >::n_
private

Current facet normal.

Definition at line 263 of file assembly_assistant.h.

Referenced by hiflow::AssemblyAssistant< DIM, DataType >::compute_facet_normal().

◆ nitsche_regularization_

template<int DIM, class DataType>
DataType hiflow::AssemblyAssistant< DIM, DataType >::nitsche_regularization_
private

◆ num_dofs_for_var_

template<int DIM, class DataType>
std::vector<int> hiflow::AssemblyAssistant< DIM, DataType >::num_dofs_for_var_
private

◆ phi_

template<int DIM, class DataType>
FunctionValues< std::vector< DataType> > hiflow::AssemblyAssistant< DIM, DataType >::phi_
private

◆ q_points_

template<int DIM, class DataType>
std::vector< Vec<DIM, DataType> > hiflow::AssemblyAssistant< DIM, DataType >::q_points_
private

◆ quadrature_

template<int DIM, class DataType>
Quadrature<DataType> hiflow::AssemblyAssistant< DIM, DataType >::quadrature_
private

◆ weights_

template<int DIM, class DataType>
std::vector<DataType> hiflow::AssemblyAssistant< DIM, DataType >::weights_
private

◆ x_

template<int DIM, class DataType>
FunctionValues< Vec<DIM, DataType> > hiflow::AssemblyAssistant< DIM, DataType >::x_
private

The documentation for this class was generated from the following file: