1 #include <lifev/core/fem/FastAssembler.hpp> 8 using namespace std::chrono;
12 using namespace LifeV;
36 for (
int j = 0; j < 3; j++ )
46 for (
int i = 0; i < M_referenceFE->nbDof(); i++ )
55 for(
int i = 0 ; i < M_referenceFE->nbDof() ; i++ )
57 for (
int j = 0; j < M_qr->nbQuadPt(); j++ )
59 delete [] M_dphi[i][j];
67 for(
int i = 0 ; i < M_referenceFE->nbDof() ; i++ )
69 for (
int j = 0; j < M_qr->nbQuadPt(); j++ )
71 for (
int k = 0; k < 3; k++ )
73 delete [] M_d2phi[i][j][k];
75 delete [] M_d2phi[i][j];
93 for (
int j = 0; j < M_referenceFE->nbDof(); j++ )
95 delete [] M_vals[i][j];
116 for (
int k = 0; k < 3; k++ )
118 for (
int z = 0; z < 3; z++ )
120 for (
int i = 0; i < M_referenceFE->nbDof(); i++ )
122 delete [] M_vals_supg[i_elem][k][z][i];
143 for (
int j = 0; j < 3; j++ )
166 M_numScalarDofs = fespace->dof().numTotalDof();
179 for (
int j = 0; j < 3 ; j++ )
187 fe->update( M_mesh->element (i), UPDATE_D2PHI );
189 for (
int j = 0; j < 3; j++ )
191 for (
int k = 0; k < 3; k++ )
200 M_phi =
new double* [ M_referenceFE->nbDof() ];
201 for (
int i = 0; i < M_referenceFE->nbDof(); i++ )
203 M_phi[i] =
new double [ M_qr->nbQuadPt() ];
209 for (UInt j (0); j < M_referenceFE->nbDof(); ++j)
211 M_phi[j][q] = M_referenceFE->phi (j, M_qr->quadPointCoor (q) );
217 M_dphi =
new double** [ M_referenceFE->nbDof() ];
219 for (
int i = 0; i < M_referenceFE->nbDof(); i++ )
221 M_dphi[i] =
new double* [ M_qr->nbQuadPt() ];
222 for (
int j = 0; j < M_qr->nbQuadPt() ; j++ )
224 M_dphi[i][j] =
new double [ 3 ];
231 for (UInt i (0); i < M_referenceFE->nbDof(); ++i)
233 for (UInt j (0); j < 3; ++j)
235 M_dphi[i][q][j] = M_referenceFE->dPhi (i, j, M_qr->quadPointCoor (q) );
242 M_d2phi =
new double*** [ M_referenceFE->nbDof() ];
244 for (
int i = 0; i < M_referenceFE->nbDof(); i++ )
246 M_d2phi[i] =
new double** [ M_qr->nbQuadPt() ];
247 for (
int j = 0; j < M_qr->nbQuadPt() ; j++ )
249 M_d2phi[i][j] =
new double* [ 3 ];
250 for (
int k = 0; k < 3 ; k++ )
252 M_d2phi[i][j][k] =
new double [ 3 ];
260 for (UInt i (0); i < M_referenceFE->nbDof(); ++i)
262 for (UInt j (0); j < 3; ++j)
264 for (UInt k (0); k < 3; ++k)
266 M_d2phi[i][q][j][k] = M_referenceFE->d2Phi (i, j, k, M_qr->quadPointCoor (q) );
278 M_elements[i] =
new double [ M_referenceFE->nbDof() ];
283 for (
int j = 0; j < M_referenceFE->nbDof(); j++ )
285 M_elements[i][j] = fespace->dof().localToGlobalMap (i, j);
297 M_vals[i_elem] =
new double* [ M_referenceFE->nbDof() ];
298 for (
int i = 0; i < M_referenceFE->nbDof(); i++ )
300 M_vals[i_elem][i] =
new double [ M_referenceFE->nbDof() ];
308 M_rows[i_elem] =
new int [ M_referenceFE->nbDof() ];
315 M_cols[i_elem] =
new int [ M_referenceFE->nbDof() ];
329 for (
int k = 0; k < 3; k++ )
332 for (
int z = 0; z < 3; z++ )
334 M_vals_supg[i_elem][k][z] =
new double* [ M_referenceFE->nbDof() ];
335 for (
int i = 0; i < M_referenceFE->nbDof(); i++ )
337 M_vals_supg[i_elem][k][z][i] =
new double [ M_referenceFE->nbDof() ];
338 for (
int j = 0; j < M_referenceFE->nbDof(); j++ )
340 M_vals_supg[i_elem][k][z][i][j] = 0.0;
351 M_rows_tmp[i_elem] =
new int [ M_referenceFE->nbDof() ];
358 M_cols_tmp[i_elem] =
new int [ M_referenceFE->nbDof() ];
368 M_G[i] =
new double* [ 3 ];
369 M_g[i] =
new double [ 3 ];
370 for (
int j = 0; j < 3 ; j++ )
372 M_G[i][j] =
new double [ 3 ];
414 M_numScalarDofs = fespace->dof().numTotalDof();
427 for (
int j = 0; j < 3 ; j++ )
435 fe->update( M_mesh->element (meshSub_elements[i]), UPDATE_DPHI );
437 for (
int j = 0; j < 3; j++ )
439 for (
int k = 0; k < 3; k++ )
448 M_phi =
new double* [ M_referenceFE->nbDof() ];
449 for (
int i = 0; i < M_referenceFE->nbDof(); i++ )
451 M_phi[i] =
new double [ M_qr->nbQuadPt() ];
457 for (UInt j (0); j < M_referenceFE->nbDof(); ++j)
459 M_phi[j][q] = M_referenceFE->phi (j, M_qr->quadPointCoor (q) );
465 M_dphi =
new double** [ M_referenceFE->nbDof() ];
467 for (
int i = 0; i < M_referenceFE->nbDof(); i++ )
469 M_dphi[i] =
new double* [ M_qr->nbQuadPt() ];
470 for (
int j = 0; j < M_qr->nbQuadPt() ; j++ )
472 M_dphi[i][j] =
new double [ 3 ];
479 for (UInt i (0); i < M_referenceFE->nbDof(); ++i)
481 for (UInt j (0); j < 3; ++j)
483 M_dphi[i][q][j] = M_referenceFE->dPhi (i, j, M_qr->quadPointCoor (q) );
494 M_elements[i] =
new double [ M_referenceFE->nbDof() ];
499 for (
int j = 0; j < M_referenceFE->nbDof(); j++ )
501 M_elements[i][j] = fespace->dof().localToGlobalMap (meshSub_elements[i], j);
511 int ndof = M_referenceFE->nbDof();
514 double w_quad[NumQuadPoints];
515 for (
int q = 0; q < NumQuadPoints ; q++ )
520 #pragma omp parallel firstprivate( w_quad, ndof, NumQuadPoints) 522 int i_el, i_elem, i_dof, q, d1, d2, i_test, i_trial;
525 double dphi_phys[ndof][NumQuadPoints][3];
534 for ( i_dof = 0; i_dof < ndof; i_dof++ )
537 for ( q = 0; q < NumQuadPoints ; q++ )
540 for ( d1 = 0; d1 < 3 ; d1++ )
542 dphi_phys[i_dof][q][d1] = 0.0;
545 for ( d2 = 0; d2 < 3 ; d2++ )
554 for ( i_test = 0; i_test < ndof; i_test++ )
559 for ( i_trial = 0; i_trial < ndof; i_trial++ )
565 for ( q = 0; q < NumQuadPoints ; q++ )
568 for ( d1 = 0; d1 < 3 ; d1++ )
570 integral += dphi_phys[i_test][q][d1] * dphi_phys[i_trial][q][d1]*w_quad[q];
581 matrix->matrixPtr()->InsertGlobalValues ( ndof, M_rows[k], ndof, M_cols[k], M_vals[k], Epetra_FECrsMatrix::ROW_MAJOR);
589 int ndof = M_referenceFE->nbDof();
592 double w_quad[NumQuadPoints];
593 for (
int q = 0; q < NumQuadPoints ; q++ )
598 #pragma omp parallel firstprivate( w_quad, ndof, NumQuadPoints) 600 int i_el, i_elem, i_dof, q, d1, d2, i_test, i_trial;
603 double dphi_phys[ndof][NumQuadPoints][3];
612 for ( i_dof = 0; i_dof < ndof; i_dof++ )
615 for ( q = 0; q < NumQuadPoints ; q++ )
618 for ( d1 = 0; d1 < 3 ; d1++ )
620 dphi_phys[i_dof][q][d1] = 0.0;
623 for ( d2 = 0; d2 < 3 ; d2++ )
632 for ( i_test = 0; i_test < ndof; i_test++ )
637 for ( i_trial = 0; i_trial < ndof; i_trial++ )
643 for ( q = 0; q < NumQuadPoints ; q++ )
646 for ( d1 = 0; d1 < 3 ; d1++ )
648 integral += dphi_phys[i_test][q][d1] * dphi_phys[i_trial][q][d1]*w_quad[q];
659 matrix->matrixPtr()->InsertGlobalValues ( ndof, M_rows[k], ndof, M_cols[k], M_vals[k], Epetra_FECrsMatrix::ROW_MAJOR);
662 for (
UInt d1 = 1; d1 < 3 ; d1++ )
666 for (
UInt i = 0; i < ndof; i++ )
671 matrix->matrixPtr()->InsertGlobalValues ( ndof, M_rows[k], ndof, M_cols[k], M_vals[k], Epetra_FECrsMatrix::ROW_MAJOR);
680 int ndof = M_referenceFE->nbDof();
683 double w_quad[NumQuadPoints];
684 for (
int q = 0; q < NumQuadPoints ; q++ )
689 #pragma omp parallel firstprivate( w_quad, ndof, NumQuadPoints) 691 int i_el, i_elem, i_dof, q, d1, d2, i_test, i_trial;
694 double dphi_phys[ndof][NumQuadPoints][3];
703 for ( i_test = 0; i_test < ndof; i_test++ )
708 for ( i_trial = 0; i_trial < ndof; i_trial++ )
714 for ( q = 0; q < NumQuadPoints ; q++ )
716 integral +=
M_phi[i_test][q] *
M_phi[i_trial][q]*w_quad[q];
726 matrix->matrixPtr()->InsertGlobalValues ( ndof, M_rows[k], ndof, M_cols[k], M_vals[k], Epetra_FECrsMatrix::ROW_MAJOR);
729 for (
UInt d1 = 1; d1 < 3 ; d1++ )
733 for (
UInt i = 0; i < ndof; i++ )
738 matrix->matrixPtr()->InsertGlobalValues ( ndof, M_rows[k], ndof, M_cols[k], M_vals[k], Epetra_FECrsMatrix::ROW_MAJOR);
746 int ndof = M_referenceFE->nbDof();
749 double w_quad[NumQuadPoints];
750 for (
int q = 0; q < NumQuadPoints ; q++ )
755 #pragma omp parallel firstprivate( w_quad, ndof, NumQuadPoints) 757 int i_el, i_elem, i_dof, q, d1, d2, i_test, i_trial;
760 double dphi_phys[ndof][NumQuadPoints][3];
769 for ( i_test = 0; i_test < ndof; i_test++ )
774 for ( i_trial = 0; i_trial < ndof; i_trial++ )
780 for ( q = 0; q < NumQuadPoints ; q++ )
782 integral +=
M_phi[i_test][q] *
M_phi[i_trial][q]*w_quad[q];
792 matrix->matrixPtr()->InsertGlobalValues ( ndof, M_rows[k], ndof, M_cols[k], M_vals[k], Epetra_FECrsMatrix::ROW_MAJOR);
800 assembleConvective( *matrix, u_h );
806 int ndof = M_referenceFE->nbDof();
808 int ndof_vec = M_referenceFE->nbDof()*3;
810 double w_quad[NumQuadPoints];
811 for (
int q = 0; q < NumQuadPoints ; q++ )
816 #pragma omp parallel firstprivate( w_quad, ndof, NumQuadPoints) 818 int i_elem, i_dof, q, d1, d2, i_test, i_trial, e_idof;
821 double dphi_phys[ndof][NumQuadPoints][3];
823 double uhq[3][NumQuadPoints];
830 for ( i_dof = 0; i_dof < ndof; i_dof++ )
833 for ( q = 0; q < NumQuadPoints ; q++ )
836 for ( d1 = 0; d1 < 3 ; d1++ )
838 dphi_phys[i_dof][q][d1] = 0.0;
841 for ( d2 = 0; d2 < 3 ; d2++ )
850 for ( q = 0; q < NumQuadPoints ; q++ )
852 for ( d1 = 0; d1 < 3 ; d1++ )
855 for ( i_dof = 0; i_dof < ndof; i_dof++ )
865 for ( i_test = 0; i_test < ndof; i_test++ )
870 for ( i_trial = 0; i_trial < ndof; i_trial++ )
876 for ( q = 0; q < NumQuadPoints ; q++ )
879 for ( d1 = 0; d1 < 3 ; d1++ )
881 integral += uhq[d1][q] * dphi_phys[i_trial][q][d1] *
M_phi[i_test][q] * w_quad[q];
892 matrix.matrixPtr()->InsertGlobalValues ( ndof, M_rows[k], ndof, M_cols[k], M_vals[k], Epetra_FECrsMatrix::ROW_MAJOR);
895 for (
UInt d1 = 1; d1 < 3 ; d1++ )
899 for (
UInt i = 0; i < ndof; i++ )
904 matrix.matrixPtr()->InsertGlobalValues ( ndof, M_rows[k], ndof, M_cols[k], M_vals[k], Epetra_FECrsMatrix::ROW_MAJOR);
914 int ndof = M_referenceFE->nbDof();
917 double w_quad[NumQuadPoints];
918 for (
int q = 0; q < NumQuadPoints ; q++ )
923 #pragma omp parallel firstprivate( w_quad, ndof, NumQuadPoints) 925 int i_el, i_elem, i_dof, q, d1, d2, i_test, i_trial;
928 double dphi_phys[ndof][NumQuadPoints][3];
937 for ( i_dof = 0; i_dof < ndof; i_dof++ )
940 for ( q = 0; q < NumQuadPoints ; q++ )
943 for ( d1 = 0; d1 < 3 ; d1++ )
945 dphi_phys[i_dof][q][d1] = 0.0;
948 for ( d2 = 0; d2 < 3 ; d2++ )
957 for ( i_test = 0; i_test < ndof; i_test++ )
962 for ( i_trial = 0; i_trial < ndof; i_trial++ )
968 for ( q = 0; q < NumQuadPoints ; q++ )
970 integral +=
M_phi[i_test][q] *
M_phi[i_trial][q]*w_quad[q];
972 for ( d1 = 0; d1 < 3 ; d1++ )
974 integral += dphi_phys[i_test][q][d1] * dphi_phys[i_trial][q][d1]*w_quad[q];
985 matrix->matrixPtr()->InsertGlobalValues ( ndof, M_rows[k], ndof, M_cols[k], M_vals[k], Epetra_FECrsMatrix::ROW_MAJOR);
988 for (
UInt d1 = 1; d1 < 3 ; d1++ )
992 for (
UInt i = 0; i < ndof; i++ )
997 matrix->matrixPtr()->InsertGlobalValues ( ndof, M_rows[k], ndof, M_cols[k], M_vals[k], Epetra_FECrsMatrix::ROW_MAJOR);
1005 int ndof = M_referenceFE->nbDof();
1007 int ndof_vec = M_referenceFE->nbDof()*3;
1009 double w_quad[NumQuadPoints];
1010 for (
int q = 0; q < NumQuadPoints ; q++ )
1015 #pragma omp parallel firstprivate( w_quad, ndof, NumQuadPoints) 1017 int i_elem, i_dof, q, d1, d2, i_test, i_trial, e_idof;
1018 double integral, integral_test, integral_trial;
1020 double dphi_phys[ndof][NumQuadPoints][3];
1022 double uhq[3][NumQuadPoints];
1029 for ( i_dof = 0; i_dof < ndof; i_dof++ )
1032 for ( q = 0; q < NumQuadPoints ; q++ )
1035 for ( d1 = 0; d1 < 3 ; d1++ )
1037 dphi_phys[i_dof][q][d1] = 0.0;
1040 for ( d2 = 0; d2 < 3 ; d2++ )
1049 for ( q = 0; q < NumQuadPoints ; q++ )
1051 for ( d1 = 0; d1 < 3 ; d1++ )
1054 for ( i_dof = 0; i_dof < ndof; i_dof++ )
1063 for ( q = 0; q < NumQuadPoints ; q++ )
1065 M_Tau_M[i_elem][q] = 1.0/std::sqrt(
1067 +
M_density*
M_density*( uhq[0][q]*(
M_G[i_elem][0][0]* uhq[0][q] +
M_G[i_elem][0][1] * uhq[1][q] +
M_G[i_elem][0][2] * uhq[2][q] ) +
1068 uhq[1][q]*(
M_G[i_elem][1][0]* uhq[0][q] +
M_G[i_elem][1][1] * uhq[1][q] +
M_G[i_elem][1][2] * uhq[2][q] ) +
1069 uhq[2][q]*(
M_G[i_elem][2][0]* uhq[0][q] +
M_G[i_elem][2][1] * uhq[1][q] +
M_G[i_elem][2][2] * uhq[2][q] )
1072 M_G[i_elem][0][0]*
M_G[i_elem][0][0] +
M_G[i_elem][0][1]*
M_G[i_elem][0][1] +
M_G[i_elem][0][2]*
M_G[i_elem][0][2] +
1073 M_G[i_elem][1][0]*
M_G[i_elem][1][0] +
M_G[i_elem][1][1]*
M_G[i_elem][1][1] +
M_G[i_elem][1][2]*
M_G[i_elem][1][2] +
1074 M_G[i_elem][2][0]*
M_G[i_elem][2][0] +
M_G[i_elem][2][1]*
M_G[i_elem][2][1] +
M_G[i_elem][2][2]*
M_G[i_elem][2][2]
1087 for ( i_test = 0; i_test < ndof; i_test++ )
1092 for ( i_trial = 0; i_trial < ndof; i_trial++ )
1098 for ( q = 0; q < NumQuadPoints ; q++ )
1104 for ( d1 = 0; d1 < 3 ; d1++ )
1106 integral_test += uhq[d1][q] * dphi_phys[i_test][q][d1];
1107 integral_trial += uhq[d1][q] * dphi_phys[i_trial][q][d1];
1109 integral +=
M_Tau_M[i_elem][q] * (integral_test * integral_trial + integral_test *
M_phi[i_trial][q] ) * w_quad[q];
1116 for ( d1 = 0; d1 < 3; d1++ )
1118 for ( d2 = 0; d2 < 3; d2++ )
1122 for ( q = 0; q < NumQuadPoints ; q++ )
1124 integral +=
M_Tau_C[i_elem][q] * dphi_phys[i_test][q][d1] * dphi_phys[i_trial][q][d2] * w_quad[q];
1135 for (
UInt d1 = 0; d1 < 3 ; d1++ )
1137 for (
UInt d2 = 0; d2 < 3 ; d2++ )
1141 for (
UInt i = 0; i < ndof; i++ )
1146 matrix->matrixPtr()->InsertGlobalValues ( ndof, M_rows_tmp[k], ndof, M_cols_tmp[k], M_vals_supg[k][d1][d2], Epetra_FECrsMatrix::ROW_MAJOR);
1155 int ndof = M_referenceFE->nbDof();
1158 double w_quad[NumQuadPoints];
1159 for (
int q = 0; q < NumQuadPoints ; q++ )
1164 #pragma omp parallel firstprivate( w_quad, ndof, NumQuadPoints) 1166 int i_el, i_elem, i_dof, q, d1, d2, i_test, i_trial, e_idof;
1169 double dphi_phys[ndof][NumQuadPoints][3];
1171 double uhq[3][NumQuadPoints];
1180 for ( i_dof = 0; i_dof < ndof; i_dof++ )
1183 for ( q = 0; q < NumQuadPoints ; q++ )
1186 for ( d1 = 0; d1 < 3 ; d1++ )
1188 dphi_phys[i_dof][q][d1] = 0.0;
1191 for ( d2 = 0; d2 < 3 ; d2++ )
1200 for ( q = 0; q < NumQuadPoints ; q++ )
1202 for ( d1 = 0; d1 < 3 ; d1++ )
1205 for ( i_dof = 0; i_dof < ndof; i_dof++ )
1214 for ( q = 0; q < NumQuadPoints ; q++ )
1216 M_Tau_M[i_elem][q] = 1.0/std::sqrt(
1218 +
M_density*
M_density*( uhq[0][q]*(
M_G[i_elem][0][0]* uhq[0][q] +
M_G[i_elem][0][1] * uhq[1][q] +
M_G[i_elem][0][2] * uhq[2][q] ) +
1219 uhq[1][q]*(
M_G[i_elem][1][0]* uhq[0][q] +
M_G[i_elem][1][1] * uhq[1][q] +
M_G[i_elem][1][2] * uhq[2][q] ) +
1220 uhq[2][q]*(
M_G[i_elem][2][0]* uhq[0][q] +
M_G[i_elem][2][1] * uhq[1][q] +
M_G[i_elem][2][2] * uhq[2][q] )
1223 M_G[i_elem][0][0]*
M_G[i_elem][0][0] +
M_G[i_elem][0][1]*
M_G[i_elem][0][1] +
M_G[i_elem][0][2]*
M_G[i_elem][0][2] +
1224 M_G[i_elem][1][0]*
M_G[i_elem][1][0] +
M_G[i_elem][1][1]*
M_G[i_elem][1][1] +
M_G[i_elem][1][2]*
M_G[i_elem][1][2] +
1225 M_G[i_elem][2][0]*
M_G[i_elem][2][0] +
M_G[i_elem][2][1]*
M_G[i_elem][2][1] +
M_G[i_elem][2][2]*
M_G[i_elem][2][2]
1231 for ( i_test = 0; i_test < ndof; i_test++ )
1236 for ( i_trial = 0; i_trial < ndof; i_trial++ )
1242 for ( q = 0; q < NumQuadPoints ; q++ )
1245 for ( d1 = 0; d1 < 3 ; d1++ )
1247 integral +=
M_Tau_M[i_elem][q] * dphi_phys[i_test][q][d1] * dphi_phys[i_trial][q][d1]*w_quad[q];
1258 matrix->matrixPtr()->InsertGlobalValues ( ndof, M_rows[k], ndof, M_cols[k], M_vals[k], Epetra_FECrsMatrix::ROW_MAJOR);
1275 int ndof = M_referenceFE->nbDof();
1278 double w_quad[NumQuadPoints];
1279 for (
int q = 0; q < NumQuadPoints ; q++ )
1284 #pragma omp parallel firstprivate( w_quad, ndof, NumQuadPoints) 1286 int i_el, i_elem, i_dof, q, d1, d2, i_test, i_trial, iCoor, jCoor, k1, k2;
1287 double integral, partialSum, integral_test, integral_trial;
1289 double d2phi_phys[ndof][NumQuadPoints][3][3];
1296 for ( q = 0; q < NumQuadPoints ; q++ )
1299 for ( i_dof = 0; i_dof < ndof; i_dof++ )
1302 for ( iCoor = 0; iCoor < 3 ; iCoor++ )
1305 for ( jCoor = 0; jCoor < 3 ; jCoor++ )
1309 for ( k1 = 0; k1 < 3 ; k1++ )
1312 for ( k2 = 0; k2 < 3 ; k2++ )
1319 d2phi_phys[i_dof][q][iCoor][jCoor] = partialSum;
1326 for ( i_test = 0; i_test < ndof; i_test++ )
1331 for ( i_trial = 0; i_trial < ndof; i_trial++ )
1337 for ( q = 0; q < NumQuadPoints ; q++ )
1339 integral_test = 0.0;
1340 integral_trial = 0.0;
1342 for ( d1 = 0; d1 < 3 ; d1++ )
1344 integral_test += d2phi_phys[i_test][q][d1][d1];
1345 integral_trial += d2phi_phys[i_trial][q][d1][d1];
1347 integral += integral_test * integral_trial * w_quad[q];
1357 matrix->matrixPtr()->InsertGlobalValues ( ndof, M_rows[k], ndof, M_cols[k], M_vals[k], Epetra_FECrsMatrix::ROW_MAJOR);
1360 for (
UInt d1 = 1; d1 < 3 ; d1++ )
1364 for (
UInt i = 0; i < ndof; i++ )
1369 matrix->matrixPtr()->InsertGlobalValues ( ndof, M_rows[k], ndof, M_cols[k], M_vals[k], Epetra_FECrsMatrix::ROW_MAJOR);
FastAssembler(const meshPtr_Type &mesh, const commPtr_Type &comm, const ReferenceFE *refFE, const qr_Type *qr)
Constructor.
void assemble_SUPG_block00(matrixPtr_Type &matrix, const vector_Type &u_h)
FE Assembly of SUPG terms - block (0,0)
void allocateSpace(const int &numElements, CurrentFE *fe, const fespacePtr_Type &fespace, const UInt *meshSub_elements)
Allocate space for members before the assembly.
boost::shared_ptr< matrix_Type > matrixPtr_Type
void assembleMass_vectorial(matrixPtr_Type &matrix)
FE Assembly of vectorial mass matrix.
void assembleGradGrad_vectorial(matrixPtr_Type &matrix)
FE Assembly of vectorial grad-grad.
const Real & weight(const UInt &ig) const
weight(ig) is the ig-th quadrature weight
boost::shared_ptr< fespace_Type > fespacePtr_Type
void NS_constant_terms_00(matrixPtr_Type &matrix)
FE Assembly of NS constant terms (no scaling by coefficients like density or bdf) ...
void assembleGradGrad_scalar(matrixPtr_Type &matrix)
FE Assembly of scalar grad-grad.
boost::shared_ptr< comm_Type > commPtr_Type
const data_type & operator[](const UInt row) const
Access operators.
void assembleConvective(matrix_Type &matrix, const vector_Type &u_h)
FE Assembly of NS constant terms (no scaling by coefficients like viscosity)
~FastAssembler()
Destructor.
boost::shared_ptr< mesh_Type > meshPtr_Type
MatrixEpetra< Real > matrix_Type
void updateInverseJacobian(const UInt &iQuadPt)
Real tInverseJacobian(UInt element1, UInt element2, UInt quadNode) const
Getter for the inverse of the jacobian.
void assemble_SUPG_block11(matrixPtr_Type &matrix, const vector_Type &u_h)
FE Assembly of SUPG terms - block (1,1)
void allocateSpace_SUPG(CurrentFE *fe)
Allocate space for supg before the assembly.
void allocateSpace(const int &numElements, CurrentFE *fe, const fespacePtr_Type &fespace)
Allocate space for members before the assembly.
double Real
Generic real data.
CurrentFE - A primordial class for the assembly of the local matrices/vectors retaining the values on...
The class for a reference Lagrangian finite element.
void setConstants_NavierStokes(const Real &density, const Real &viscosity, const Real ×tep, const Real &orderBDF, const Real &C_I)
Set physical parameters for NS.
Real detJacobian(UInt quadNode) const
Getter for the determinant of the jacobian in a given quadrature node.
const ReferenceFE * M_referenceFE
void assembleConvective(matrixPtr_Type &matrix, const vector_Type &u_h)
FE Assembly of NS constant terms (no scaling by coefficients like viscosity)
const UInt & nbQuadPt() const
Getter for the number of quadrature points.
void assembleMass_scalar(matrixPtr_Type &matrix)
FE Assembly of scalar mass matrix.
uint32_type UInt
generic unsigned integer (used mainly for addressing)
void assembleLaplacianPhiILaplacianPhiJ_vectorial(matrixPtr_Type &matrix)
FE Assembly of laplacian PhiI laplacian PhiJ.