40 #include <boost/math/special_functions/gamma.hpp>
94 m_session->LoadParameter (
"thermalConductivity",
103 int nConvectiveFields = pFields.num_elements();
104 int nScalars = nConvectiveFields - 1;
105 int nDim = pFields[0]->GetCoordim(0);
106 int nSolutionPts = pFields[0]->GetTotPoints();
107 int nTracePts = pFields[0]->GetTrace()->GetTotPoints();
110 if (pSession->DefinesSolverInfo(
"HOMOGENEOUS"))
151 for (i = 0; i < nScalars; ++i)
160 for (j = 0; j < nDim; ++j)
171 for (i = 0; i < nConvectiveFields; ++i)
179 for (j = 0; j < nDim; ++j)
190 for (j = 0; j < nScalars; ++j)
200 for (j = 0; j < nScalars+1; ++j)
230 int nLocalSolutionPts;
231 int nElements = pFields[0]->GetExpSize();
232 int nDimensions = pFields[0]->GetCoordim(0);
233 int nSolutionPts = pFields[0]->GetTotPoints();
234 int nTracePts = pFields[0]->GetTrace()->GetTotPoints();
237 for (i = 0; i < nDimensions; ++i)
256 for (n = 0; n < nElements; ++n)
258 ptsKeys = pFields[0]->GetExp(n)->GetPointsKeys();
259 nLocalSolutionPts = pFields[0]->GetExp(n)->GetTotPoints();
260 phys_offset = pFields[0]->GetPhys_Offset(n);
261 jac = pFields[0]->GetExp(n)
264 for (i = 0; i < nLocalSolutionPts; ++i)
266 m_jac[i+phys_offset] = jac[0];
284 for (n = 0; n < nElements; ++n)
286 base = pFields[0]->GetExp(n)->GetBase();
287 nquad0 = base[0]->GetNumPoints();
288 nquad1 = base[1]->GetNumPoints();
296 pFields[0]->GetExp(n)->GetEdgeQFactors(
297 0, auxArray1 = m_Q2D_e0[n]);
298 pFields[0]->GetExp(n)->GetEdgeQFactors(
299 1, auxArray1 = m_Q2D_e1[n]);
300 pFields[0]->GetExp(n)->GetEdgeQFactors(
301 2, auxArray1 = m_Q2D_e2[n]);
302 pFields[0]->GetExp(n)->GetEdgeQFactors(
303 3, auxArray1 = m_Q2D_e3[n]);
305 ptsKeys = pFields[0]->GetExp(n)->GetPointsKeys();
306 nLocalSolutionPts = pFields[0]->GetExp(n)->GetTotPoints();
307 phys_offset = pFields[0]->GetPhys_Offset(n);
309 jac = pFields[0]->GetExp(n)
312 gmat = pFields[0]->GetExp(n)
316 if (pFields[0]->GetExp(n)
317 ->as<LocalRegions::Expansion2D>()->GetGeom2D()
318 ->GetMetricInfo()->GetGtype()
321 for (i = 0; i < nLocalSolutionPts; ++i)
323 m_jac[i+phys_offset] = jac[i];
324 m_gmat[0][i+phys_offset] = gmat[0][i];
325 m_gmat[1][i+phys_offset] = gmat[1][i];
326 m_gmat[2][i+phys_offset] = gmat[2][i];
327 m_gmat[3][i+phys_offset] = gmat[3][i];
332 for (i = 0; i < nLocalSolutionPts; ++i)
334 m_jac[i+phys_offset] = jac[0];
335 m_gmat[0][i+phys_offset] = gmat[0][0];
336 m_gmat[1][i+phys_offset] = gmat[1][0];
337 m_gmat[2][i+phys_offset] = gmat[2][0];
338 m_gmat[3][i+phys_offset] = gmat[3][0];
346 ASSERTL0(
false,
"3DFR Metric terms not implemented yet");
351 ASSERTL0(
false,
"Expansion dimension not recognised");
381 int nquad0, nquad1, nquad2;
382 int nmodes0, nmodes1, nmodes2;
385 int nElements = pFields[0]->GetExpSize();
386 int nDim = pFields[0]->GetCoordim(0);
395 for (n = 0; n < nElements; ++n)
397 base = pFields[0]->GetExp(n)->GetBase();
398 nquad0 = base[0]->GetNumPoints();
399 nmodes0 = base[0]->GetNumModes();
403 base[0]->GetZW(z0, w0);
415 int p0 = nmodes0 - 1;
421 NekDouble ap0 = boost::math::tgamma(2 * p0 + 1)
423 * boost::math::tgamma(p0 + 1)
424 * boost::math::tgamma(p0 + 1));
433 c0 = 2.0 * p0 / ((2.0 * p0 + 1.0) * (p0 + 1.0)
434 * (ap0 * boost::math::tgamma(p0 + 1))
435 * (ap0 * boost::math::tgamma(p0 + 1)));
439 c0 = 2.0 * (p0 + 1.0) / ((2.0 * p0 + 1.0) * p0
440 * (ap0 * boost::math::tgamma(p0 + 1))
441 * (ap0 * boost::math::tgamma(p0 + 1)));
445 c0 = -2.0 / ((2.0 * p0 + 1.0)
446 * (ap0 * boost::math::tgamma(p0 + 1))
447 * (ap0 * boost::math::tgamma(p0 + 1)));
451 c0 = 10000000000000000.0;
454 NekDouble etap0 = 0.5 * c0 * (2.0 * p0 + 1.0)
455 * (ap0 * boost::math::tgamma(p0 + 1))
456 * (ap0 * boost::math::tgamma(p0 + 1));
458 NekDouble overeta0 = 1.0 / (1.0 + etap0);
469 for(i = 0; i < nquad0; ++i)
475 m_dGL_xi1[n][i] = 0.5 * sign0 * m_dGL_xi1[n][i];
479 for(i = 0; i < nquad0; ++i)
481 m_dGR_xi1[n][i] = etap0 * dLpm0[i];
482 m_dGR_xi1[n][i] += dLpp0[i];
483 m_dGR_xi1[n][i] *= overeta0;
484 m_dGR_xi1[n][i] += dLp0[i];
485 m_dGR_xi1[n][i] = 0.5 * m_dGR_xi1[n][i];
502 for (n = 0; n < nElements; ++n)
504 base = pFields[0]->GetExp(n)->GetBase();
505 nquad0 = base[0]->GetNumPoints();
506 nquad1 = base[1]->GetNumPoints();
507 nmodes0 = base[0]->GetNumModes();
508 nmodes1 = base[1]->GetNumModes();
515 base[0]->GetZW(z0, w0);
516 base[1]->GetZW(z1, w1);
533 int p0 = nmodes0 - 1;
534 int p1 = nmodes1 - 1;
541 NekDouble ap0 = boost::math::tgamma(2 * p0 + 1)
543 * boost::math::tgamma(p0 + 1)
544 * boost::math::tgamma(p0 + 1));
546 NekDouble ap1 = boost::math::tgamma(2 * p1 + 1)
548 * boost::math::tgamma(p1 + 1)
549 * boost::math::tgamma(p1 + 1));
559 c0 = 2.0 * p0 / ((2.0 * p0 + 1.0) * (p0 + 1.0)
560 * (ap0 * boost::math::tgamma(p0 + 1))
561 * (ap0 * boost::math::tgamma(p0 + 1)));
563 c1 = 2.0 * p1 / ((2.0 * p1 + 1.0) * (p1 + 1.0)
564 * (ap1 * boost::math::tgamma(p1 + 1))
565 * (ap1 * boost::math::tgamma(p1 + 1)));
569 c0 = 2.0 * (p0 + 1.0) / ((2.0 * p0 + 1.0) * p0
570 * (ap0 * boost::math::tgamma(p0 + 1))
571 * (ap0 * boost::math::tgamma(p0 + 1)));
573 c1 = 2.0 * (p1 + 1.0) / ((2.0 * p1 + 1.0) * p1
574 * (ap1 * boost::math::tgamma(p1 + 1))
575 * (ap1 * boost::math::tgamma(p1 + 1)));
579 c0 = -2.0 / ((2.0 * p0 + 1.0)
580 * (ap0 * boost::math::tgamma(p0 + 1))
581 * (ap0 * boost::math::tgamma(p0 + 1)));
583 c1 = -2.0 / ((2.0 * p1 + 1.0)
584 * (ap1 * boost::math::tgamma(p1 + 1))
585 * (ap1 * boost::math::tgamma(p1 + 1)));
589 c0 = 10000000000000000.0;
590 c1 = 10000000000000000.0;
593 NekDouble etap0 = 0.5 * c0 * (2.0 * p0 + 1.0)
594 * (ap0 * boost::math::tgamma(p0 + 1))
595 * (ap0 * boost::math::tgamma(p0 + 1));
597 NekDouble etap1 = 0.5 * c1 * (2.0 * p1 + 1.0)
598 * (ap1 * boost::math::tgamma(p1 + 1))
599 * (ap1 * boost::math::tgamma(p1 + 1));
601 NekDouble overeta0 = 1.0 / (1.0 + etap0);
602 NekDouble overeta1 = 1.0 / (1.0 + etap1);
617 for(i = 0; i < nquad0; ++i)
623 m_dGL_xi1[n][i] = 0.5 * sign0 * m_dGL_xi1[n][i];
627 for(i = 0; i < nquad1; ++i)
629 m_dGL_xi2[n][i] = etap1 * dLpm1[i];
630 m_dGL_xi2[n][i] += dLpp1[i];
631 m_dGL_xi2[n][i] *= overeta1;
632 m_dGL_xi2[n][i] = dLp1[i] - m_dGL_xi2[n][i];
633 m_dGL_xi2[n][i] = 0.5 * sign1 * m_dGL_xi2[n][i];
637 for(i = 0; i < nquad0; ++i)
639 m_dGR_xi1[n][i] = etap0 * dLpm0[i];
640 m_dGR_xi1[n][i] += dLpp0[i];
641 m_dGR_xi1[n][i] *= overeta0;
642 m_dGR_xi1[n][i] += dLp0[i];
643 m_dGR_xi1[n][i] = 0.5 * m_dGR_xi1[n][i];
647 for(i = 0; i < nquad1; ++i)
649 m_dGR_xi2[n][i] = etap1 * dLpm1[i];
650 m_dGR_xi2[n][i] += dLpp1[i];
651 m_dGR_xi2[n][i] *= overeta1;
652 m_dGR_xi2[n][i] += dLp1[i];
653 m_dGR_xi2[n][i] = 0.5 * m_dGR_xi2[n][i];
667 for (n = 0; n < nElements; ++n)
669 base = pFields[0]->GetExp(n)->GetBase();
670 nquad0 = base[0]->GetNumPoints();
671 nquad1 = base[1]->GetNumPoints();
672 nquad2 = base[2]->GetNumPoints();
673 nmodes0 = base[0]->GetNumModes();
674 nmodes1 = base[1]->GetNumModes();
675 nmodes2 = base[2]->GetNumModes();
684 base[0]->GetZW(z0, w0);
685 base[1]->GetZW(z1, w1);
686 base[1]->GetZW(z2, w2);
708 int p0 = nmodes0 - 1;
709 int p1 = nmodes1 - 1;
710 int p2 = nmodes2 - 1;
718 NekDouble ap0 = boost::math::tgamma(2 * p0 + 1)
720 * boost::math::tgamma(p0 + 1)
721 * boost::math::tgamma(p0 + 1));
724 NekDouble ap1 = boost::math::tgamma(2 * p1 + 1)
726 * boost::math::tgamma(p1 + 1)
727 * boost::math::tgamma(p1 + 1));
730 NekDouble ap2 = boost::math::tgamma(2 * p2 + 1)
732 * boost::math::tgamma(p2 + 1)
733 * boost::math::tgamma(p2 + 1));
744 c0 = 2.0 * p0 / ((2.0 * p0 + 1.0) * (p0 + 1.0)
745 * (ap0 * boost::math::tgamma(p0 + 1))
746 * (ap0 * boost::math::tgamma(p0 + 1)));
748 c1 = 2.0 * p1 / ((2.0 * p1 + 1.0) * (p1 + 1.0)
749 * (ap1 * boost::math::tgamma(p1 + 1))
750 * (ap1 * boost::math::tgamma(p1 + 1)));
752 c2 = 2.0 * p2 / ((2.0 * p2 + 1.0) * (p2 + 1.0)
753 * (ap2 * boost::math::tgamma(p2 + 1))
754 * (ap2 * boost::math::tgamma(p2 + 1)));
758 c0 = 2.0 * (p0 + 1.0) / ((2.0 * p0 + 1.0) * p0
759 * (ap0 * boost::math::tgamma(p0 + 1))
760 * (ap0 * boost::math::tgamma(p0 + 1)));
762 c1 = 2.0 * (p1 + 1.0) / ((2.0 * p1 + 1.0) * p1
763 * (ap1 * boost::math::tgamma(p1 + 1))
764 * (ap1 * boost::math::tgamma(p1 + 1)));
766 c2 = 2.0 * (p2 + 1.0) / ((2.0 * p2 + 1.0) * p2
767 * (ap2 * boost::math::tgamma(p2 + 1))
768 * (ap2 * boost::math::tgamma(p2 + 1)));
772 c0 = -2.0 / ((2.0 * p0 + 1.0)
773 * (ap0 * boost::math::tgamma(p0 + 1))
774 * (ap0 * boost::math::tgamma(p0 + 1)));
776 c1 = -2.0 / ((2.0 * p1 + 1.0)
777 * (ap1 * boost::math::tgamma(p1 + 1))
778 * (ap1 * boost::math::tgamma(p1 + 1)));
780 c2 = -2.0 / ((2.0 * p2 + 1.0)
781 * (ap2 * boost::math::tgamma(p2 + 1))
782 * (ap2 * boost::math::tgamma(p2 + 1)));
786 c0 = 10000000000000000.0;
787 c1 = 10000000000000000.0;
788 c2 = 10000000000000000.0;
791 NekDouble etap0 = 0.5 * c0 * (2.0 * p0 + 1.0)
792 * (ap0 * boost::math::tgamma(p0 + 1))
793 * (ap0 * boost::math::tgamma(p0 + 1));
795 NekDouble etap1 = 0.5 * c1 * (2.0 * p1 + 1.0)
796 * (ap1 * boost::math::tgamma(p1 + 1))
797 * (ap1 * boost::math::tgamma(p1 + 1));
799 NekDouble etap2 = 0.5 * c2 * (2.0 * p2 + 1.0)
800 * (ap2 * boost::math::tgamma(p2 + 1))
801 * (ap2 * boost::math::tgamma(p2 + 1));
803 NekDouble overeta0 = 1.0 / (1.0 + etap0);
804 NekDouble overeta1 = 1.0 / (1.0 + etap1);
805 NekDouble overeta2 = 1.0 / (1.0 + etap2);
824 for(i = 0; i < nquad0; ++i)
830 m_dGL_xi1[n][i] = 0.5 * sign0 * m_dGL_xi1[n][i];
834 for(i = 0; i < nquad1; ++i)
836 m_dGL_xi2[n][i] = etap1 * dLpm1[i];
837 m_dGL_xi2[n][i] += dLpp1[i];
838 m_dGL_xi2[n][i] *= overeta1;
839 m_dGL_xi2[n][i] = dLp1[i] - m_dGL_xi2[n][i];
840 m_dGL_xi2[n][i] = 0.5 * sign1 * m_dGL_xi2[n][i];
844 for(i = 0; i < nquad2; ++i)
846 m_dGL_xi3[n][i] = etap2 * dLpm2[i];
847 m_dGL_xi3[n][i] += dLpp2[i];
848 m_dGL_xi3[n][i] *= overeta2;
849 m_dGL_xi3[n][i] = dLp2[i] - m_dGL_xi3[n][i];
850 m_dGL_xi3[n][i] = 0.5 * sign2 * m_dGL_xi3[n][i];
854 for(i = 0; i < nquad0; ++i)
856 m_dGR_xi1[n][i] = etap0 * dLpm0[i];
857 m_dGR_xi1[n][i] += dLpp0[i];
858 m_dGR_xi1[n][i] *= overeta0;
859 m_dGR_xi1[n][i] += dLp0[i];
860 m_dGR_xi1[n][i] = 0.5 * m_dGR_xi1[n][i];
864 for(i = 0; i < nquad1; ++i)
866 m_dGR_xi2[n][i] = etap1 * dLpm1[i];
867 m_dGR_xi2[n][i] += dLpp1[i];
868 m_dGR_xi2[n][i] *= overeta1;
869 m_dGR_xi2[n][i] += dLp1[i];
870 m_dGR_xi2[n][i] = 0.5 * m_dGR_xi2[n][i];
874 for(i = 0; i < nquad2; ++i)
876 m_dGR_xi3[n][i] = etap2 * dLpm2[i];
877 m_dGR_xi3[n][i] += dLpp2[i];
878 m_dGR_xi3[n][i] *= overeta2;
879 m_dGR_xi3[n][i] += dLp2[i];
880 m_dGR_xi3[n][i] = 0.5 * m_dGR_xi3[n][i];
887 ASSERTL0(
false,
"Expansion dimension not recognised");
902 const int nConvectiveFields,
917 Basis = fields[0]->GetExp(0)->GetBase();
919 int nElements = fields[0]->GetExpSize();
920 int nDim = fields[0]->GetCoordim(0);
921 int nScalars = inarray.num_elements();
922 int nSolutionPts = fields[0]->GetTotPoints();
923 int nCoeffs = fields[0]->GetNcoeffs();
926 for (i = 0; i < nConvectiveFields; ++i)
939 for (i = 0; i < nScalars; ++i)
943 for (n = 0; n < nElements; n++)
945 phys_offset = fields[0]->GetPhys_Offset(n);
947 fields[i]->GetExp(n)->PhysDeriv(0,
948 auxArray1 = inarray[i] + phys_offset,
949 auxArray2 =
m_DU1[i][0] + phys_offset);
979 for (i = 0; i < nConvectiveFields; ++i)
983 for (n = 0; n < nElements; n++)
985 phys_offset = fields[0]->GetPhys_Offset(n);
987 fields[i]->GetExp(n)->PhysDeriv(0,
989 auxArray2 =
m_DD1[i][0] + phys_offset);
1006 &
m_DD1[i][0][0], 1, &outarray[i][0], 1);
1009 if(!(Basis[0]->Collocation()))
1011 fields[i]->FwdTrans(outarray[i], outarrayCoeff[i]);
1012 fields[i]->BwdTrans(outarrayCoeff[i], outarray[i]);
1020 for(i = 0; i < nScalars; ++i)
1022 for (j = 0; j < nDim; ++j)
1031 &
m_gmat[0][0], 1, &u1_hat[0], 1);
1034 &
m_jac[0], 1, &u1_hat[0], 1);
1037 &
m_gmat[1][0], 1, &u2_hat[0], 1);
1040 &
m_jac[0], 1, &u2_hat[0], 1);
1045 &
m_gmat[2][0], 1, &u1_hat[0], 1);
1048 &
m_jac[0], 1, &u1_hat[0], 1);
1051 &
m_gmat[3][0], 1, &u2_hat[0], 1);
1054 &
m_jac[0], 1, &u2_hat[0], 1);
1057 for (n = 0; n < nElements; n++)
1059 phys_offset = fields[0]->GetPhys_Offset(n);
1061 fields[i]->GetExp(n)->StdPhysDeriv(0,
1062 auxArray1 = u1_hat + phys_offset,
1063 auxArray2 =
m_tmp1[i][j] + phys_offset);
1065 fields[i]->GetExp(n)->StdPhysDeriv(1,
1066 auxArray1 = u2_hat + phys_offset,
1067 auxArray2 =
m_tmp2[i][j] + phys_offset);
1072 &
m_DU1[i][j][0], 1);
1081 inarray[i],
m_IF1[i][j],
1087 for (j = 0; j < nSolutionPts; ++j)
1110 for (j = 0; j < nSolutionPts; j++)
1119 m_gmat[0][j] * m_BD1[i][1][j] -
1120 m_gmat[1][j] * m_BD1[i][0][j];
1124 for (j = 0; j < nDim; ++j)
1135 for (i = 0; i < nScalars; ++i)
1152 for (i = 0; i < nConvectiveFields; ++i)
1158 for (j = 0; j < nSolutionPts; j++)
1167 for (n = 0; n < nElements; n++)
1169 phys_offset = fields[0]->GetPhys_Offset(n);
1171 fields[0]->GetExp(n)->StdPhysDeriv(0,
1172 auxArray1 = f_hat + phys_offset,
1173 auxArray2 =
m_DD1[i][0] + phys_offset);
1175 fields[0]->GetExp(n)->StdPhysDeriv(1,
1176 auxArray1 = g_hat + phys_offset,
1177 auxArray2 =
m_DD1[i][1] + phys_offset);
1185 if (Basis[0]->GetPointsType() ==
1187 Basis[1]->GetPointsType() ==
1205 &
m_divFC[i][0], 1, &outarray[i][0], 1);
1210 &
m_jac[0], 1, &outarray[i][0], 1);
1213 if(!(Basis[0]->Collocation()))
1215 fields[i]->FwdTrans(outarray[i], outarrayCoeff[i]);
1216 fields[i]->BwdTrans(outarrayCoeff[i], outarray[i]);
1224 ASSERTL0(
false,
"3D FRDG case not implemented yet");
1242 int nTracePts = fields[0]->GetTrace()->GetTotPoints();
1243 int nScalars = inarray.num_elements();
1244 int nDim = fields[0]->GetCoordim(0);
1250 for (i = 0; i < nDim; ++i)
1252 fields[0]->ExtractTracePhys(inarray[i],
m_traceVel[i]);
1262 for (i = 0; i < nScalars; ++i)
1267 fields[i]->GetFwdBwdTracePhys(inarray[i], Fwd[i], Bwd[i]);
1268 fields[0]->GetTrace()->Upwind(Vn, Fwd[i], Bwd[i], numflux[i]);
1272 if (fields[0]->GetBndCondExpansions().num_elements())
1278 for (j = 0; j < nDim; ++j)
1280 for (i = 0; i < nScalars; ++i)
1283 numericalFluxO1[i][j], 1);
1301 int nBndEdgePts, nBndEdges, nBndRegions;
1303 int nTracePts = fields[0]->GetTrace()->GetTotPoints();
1304 int nScalars = inarray.num_elements();
1314 for (i = 0; i < nScalars; ++i)
1319 fields[i]->ExtractTracePhys(inarray[i], uplus[i]);
1323 for (i = 0; i < nScalars-1; ++i)
1328 nBndRegions = fields[i+1]->
1329 GetBndCondExpansions().num_elements();
1330 for (j = 0; j < nBndRegions; ++j)
1332 nBndEdges = fields[i+1]->
1333 GetBndCondExpansions()[j]->GetExpSize();
1334 for (e = 0; e < nBndEdges; ++e)
1336 nBndEdgePts = fields[i+1]->
1337 GetBndCondExpansions()[j]->GetExp(e)->GetTotPoints();
1340 GetBndCondExpansions()[j]->GetPhys_Offset(e);
1342 id2 = fields[0]->GetTrace()->
1343 GetPhys_Offset(fields[0]->GetTraceMap()->
1344 GetBndCondTraceToGlobalTraceMap(cnt++));
1347 if (boost::iequals(fields[i]->GetBndConditions()[j]->
1348 GetUserDefined(),
"WallViscous") ||
1349 boost::iequals(fields[i]->GetBndConditions()[j]->
1350 GetUserDefined(),
"WallAdiabatic"))
1353 &scalarVariables[i][id2], 1);
1357 else if (fields[i]->GetBndConditions()[j]->
1358 GetBoundaryConditionType() ==
1363 GetBndCondExpansions()[j]->
1364 UpdatePhys())[id1], 1,
1366 GetBndCondExpansions()[j]->
1367 UpdatePhys())[id1], 1,
1368 &scalarVariables[i][id2], 1);
1372 if (fields[i]->GetBndConditions()[j]->
1373 GetBoundaryConditionType() ==
1377 &scalarVariables[i][id2], 1,
1378 &penaltyfluxO1[i][id2], 1);
1382 else if ((fields[i]->GetBndConditions()[j])->
1383 GetBoundaryConditionType() ==
1388 &penaltyfluxO1[i][id2], 1);
1393 &scalarVariables[i][id2], 1,
1394 &scalarVariables[i][id2], 1,
1411 nBndRegions = fields[nScalars]->
1412 GetBndCondExpansions().num_elements();
1413 for (j = 0; j < nBndRegions; ++j)
1415 nBndEdges = fields[nScalars]->
1416 GetBndCondExpansions()[j]->GetExpSize();
1417 for (e = 0; e < nBndEdges; ++e)
1419 nBndEdgePts = fields[nScalars]->
1420 GetBndCondExpansions()[j]->GetExp(e)->GetTotPoints();
1422 id1 = fields[nScalars]->
1423 GetBndCondExpansions()[j]->GetPhys_Offset(e);
1425 id2 = fields[0]->GetTrace()->
1426 GetPhys_Offset(fields[0]->GetTraceMap()->
1427 GetBndCondTraceToGlobalTraceMap(cnt++));
1430 if (boost::iequals(fields[i]->GetBndConditions()[j]->
1431 GetUserDefined(),
"WallViscous"))
1435 &scalarVariables[nScalars-1][id2], 1);
1439 else if (fields[i]->GetBndConditions()[j]->
1440 GetBoundaryConditionType() ==
1445 &(fields[nScalars]->
1446 GetBndCondExpansions()[j]->
1449 GetBndCondExpansions()[j]->
1451 &scalarVariables[nScalars-1][id2], 1);
1455 &scalarVariables[nScalars-1][id2], 1,
1457 &scalarVariables[nScalars-1][id2], 1);
1461 &scalarVariables[nScalars-1][id2], 1,
1462 &scalarVariables[nScalars-1][id2], 1);
1466 if (fields[nScalars]->GetBndConditions()[j]->
1467 GetBoundaryConditionType() ==
1470 fields[nScalars]->GetBndConditions()[j]
1471 ->GetUserDefined(),
"WallAdiabatic"))
1474 &scalarVariables[nScalars-1][id2], 1,
1475 &penaltyfluxO1[nScalars-1][id2], 1);
1480 else if (((fields[nScalars]->GetBndConditions()[j])->
1481 GetBoundaryConditionType() ==
1484 fields[nScalars]->GetBndConditions()[j]
1485 ->GetUserDefined(),
"WallAdiabatic"))
1488 &uplus[nScalars-1][id2], 1,
1489 &penaltyfluxO1[nScalars-1][id2], 1);
1507 int nTracePts = fields[0]->GetTrace()->GetTotPoints();
1508 int nVariables = fields.num_elements();
1509 int nDim = fields[0]->GetCoordim(0);
1520 for (i = 0; i < nDim; ++i)
1522 fields[0]->ExtractTracePhys(ufield[i],
m_traceVel[i]);
1530 for (i = 1; i < nVariables; ++i)
1533 for (j = 0; j < nDim; ++j)
1536 fields[i]->GetFwdBwdTracePhys(qfield[j][i], qFwd, qBwd);
1539 fields[i]->GetTrace()->Upwind(Vn, qBwd, qFwd, qfluxtemp);
1546 if (fields[0]->GetBndCondExpansions().num_elements())
1571 int nBndEdges, nBndEdgePts;
1575 int nTracePts = fields[0]->GetTrace()->GetTotPoints();
1576 int nBndRegions = fields[var]->GetBndCondExpansions().num_elements();
1582 fields[var]->ExtractTracePhys(qfield, qtemp);
1585 for (i = 0; i < nBndRegions; ++i)
1588 nBndEdges = fields[var]->
1589 GetBndCondExpansions()[i]->GetExpSize();
1592 for (e = 0; e < nBndEdges; ++e)
1594 nBndEdgePts = fields[var]->
1595 GetBndCondExpansions()[i]->GetExp(e)->GetTotPoints();
1597 id2 = fields[0]->GetTrace()->
1598 GetPhys_Offset(fields[0]->GetTraceMap()->
1599 GetBndCondTraceToGlobalTraceMap(cnt++));
1604 if(fields[var]->GetBndConditions()[i]->
1606 && !boost::iequals(fields[var]->GetBndConditions()[i]
1607 ->GetUserDefined(),
"WallAdiabatic"))
1612 &penaltyflux[id2], 1);
1616 else if((fields[var]->GetBndConditions()[i])->
1620 "Neumann bcs not implemented for LFRNS");
1622 else if(boost::iequals(fields[var]->GetBndConditions()[i]
1623 ->GetUserDefined(),
"WallAdiabatic"))
1635 &penaltyflux[id2], 1);
1654 const int nConvectiveFields,
1661 int nLocalSolutionPts, phys_offset;
1669 Basis = fields[0]->GetExp(0)->GetBasis(0);
1671 int nElements = fields[0]->GetExpSize();
1672 int nPts = fields[0]->GetTotPoints();
1682 for (n = 0; n < nElements; ++n)
1684 nLocalSolutionPts = fields[0]->GetExp(n)->GetTotPoints();
1685 phys_offset = fields[0]->GetPhys_Offset(n);
1690 &flux[phys_offset], 1,
1693 fields[0]->GetExp(n)->GetVertexPhysVals(0, tmparrayX1,
1695 JumpL[n] = iFlux[n] - tmpFluxVertex;
1697 fields[0]->GetExp(n)->GetVertexPhysVals(1, tmparrayX1,
1699 JumpR[n] = iFlux[n+1] - tmpFluxVertex;
1702 for (n = 0; n < nElements; ++n)
1704 ptsKeys = fields[0]->GetExp(n)->GetPointsKeys();
1705 nLocalSolutionPts = fields[0]->GetExp(n)->GetTotPoints();
1706 phys_offset = fields[0]->GetPhys_Offset(n);
1707 jac = fields[0]->GetExp(n)
1711 JumpL[n] = JumpL[n] * jac[0];
1712 JumpR[n] = JumpR[n] * jac[0];
1723 Vmath::Vadd(nLocalSolutionPts, &DCL[0], 1, &DCR[0], 1,
1724 &derCFlux[phys_offset], 1);
1744 const int nConvectiveFields,
1745 const int direction,
1751 int n, e, i, j, cnt;
1755 int nElements = fields[0]->GetExpSize();
1756 int trace_offset, phys_offset;
1757 int nLocalSolutionPts;
1765 &elmtToTrace = fields[0]->GetTraceMap()->GetElmtToTrace();
1768 for (n = 0; n < nElements; ++n)
1771 phys_offset = fields[0]->GetPhys_Offset(n);
1772 nLocalSolutionPts = fields[0]->GetExp(n)->GetTotPoints();
1773 ptsKeys = fields[0]->GetExp(n)->GetPointsKeys();
1778 base = fields[0]->GetExp(n)->GetBase();
1779 nquad0 = base[0]->GetNumPoints();
1780 nquad1 = base[1]->GetNumPoints();
1788 for (e = 0; e < fields[0]->GetExp(n)->GetNedges(); ++e)
1791 nEdgePts = fields[0]->GetExp(n)->GetEdgeNumPoints(e);
1797 trace_offset = fields[0]->GetTrace()->GetPhys_Offset(
1798 elmtToTrace[n][e]->GetElmtId());
1807 fields[0]->GetExp(n)->GetEdgePhysVals(
1808 e, elmtToTrace[n][e],
1810 auxArray1 = tmparray);
1821 &tmparray[0], 1, &fluxJumps[0], 1);
1825 if (fields[0]->GetExp(n)->GetEorient(e) ==
1834 if (fields[0]->GetExp(n)->as<LocalRegions::Expansion2D>()
1835 ->GetGeom2D()->GetMetricInfo()->GetGtype()
1840 fields[0]->GetExp(n)->GetEdgePhysVals(
1841 e, elmtToTrace[n][e],
1842 jac, auxArray1 = jacEdge);
1846 if (fields[0]->GetExp(n)->GetEorient(e) ==
1855 for (j = 0; j < nEdgePts; j++)
1857 fluxJumps[j] = fluxJumps[j] * jacEdge[j];
1875 for (i = 0; i < nquad0; ++i)
1880 for (j = 0; j < nquad1; ++j)
1883 divCFluxE0[cnt] = fluxJumps[i] *
m_dGL_xi2[n][j];
1888 for (i = 0; i < nquad1; ++i)
1893 for (j = 0; j < nquad0; ++j)
1895 cnt = (nquad0)*i + j;
1896 divCFluxE1[cnt] = fluxJumps[i] *
m_dGR_xi1[n][j];
1901 for (i = 0; i < nquad0; ++i)
1906 for (j = 0; j < nquad1; ++j)
1908 cnt = (nquad0 - 1) + j*nquad0 - i;
1909 divCFluxE2[cnt] = fluxJumps[i] *
m_dGR_xi2[n][j];
1914 for (i = 0; i < nquad1; ++i)
1918 for (j = 0; j < nquad0; ++j)
1920 cnt = (nquad0*nquad1 - nquad0) + j - i*nquad0;
1921 divCFluxE3[cnt] = fluxJumps[i] *
m_dGL_xi1[n][j];
1927 ASSERTL0(
false,
"edge value (< 3) is out of range");
1941 &divCFluxE3[0], 1, &derCFlux[phys_offset], 1);
1943 else if (direction == 1)
1946 &divCFluxE2[0], 1, &derCFlux[phys_offset], 1);
1965 const int nConvectiveFields,
1972 int n, e, i, j, cnt;
1974 int nElements = fields[0]->GetExpSize();
1975 int nLocalSolutionPts;
1986 &elmtToTrace = fields[0]->GetTraceMap()->GetElmtToTrace();
1989 for(n = 0; n < nElements; ++n)
1992 phys_offset = fields[0]->GetPhys_Offset(n);
1993 nLocalSolutionPts = fields[0]->GetExp(n)->GetTotPoints();
1995 base = fields[0]->GetExp(n)->GetBase();
1996 nquad0 = base[0]->GetNumPoints();
1997 nquad1 = base[1]->GetNumPoints();
2005 for(e = 0; e < fields[0]->GetExp(n)->GetNedges(); ++e)
2008 nEdgePts = fields[0]->GetExp(n)->GetEdgeNumPoints(e);
2017 trace_offset = fields[0]->GetTrace()->GetPhys_Offset(
2018 elmtToTrace[n][e]->GetElmtId());
2022 fields[0]->GetExp(n)->GetEdgeNormal(e);
2026 fields[0]->GetExp(n)->GetEdgePhysVals(
2027 e, elmtToTrace[n][e],
2028 fluxX1 + phys_offset,
2029 auxArray1 = tmparrayX1);
2033 fields[0]->GetExp(n)->GetEdgePhysVals(
2034 e, elmtToTrace[n][e],
2035 fluxX2 + phys_offset,
2036 auxArray1 = tmparrayX2);
2039 for (i = 0; i < nEdgePts; ++i)
2048 &numericalFlux[trace_offset], 1,
2049 &fluxN[0], 1, &fluxJumps[0], 1);
2052 if (fields[0]->GetExp(n)->GetEorient(e) ==
2056 auxArray1 = fluxJumps, 1,
2057 auxArray2 = fluxJumps, 1);
2060 NekDouble fac = fields[0]->GetExp(n)->EdgeNormalNegated(e) ?
2063 for (i = 0; i < nEdgePts; ++i)
2068 fluxJumps[i] = -fluxJumps[i];
2076 for (i = 0; i < nquad0; ++i)
2079 fluxJumps[i] = -(
m_Q2D_e0[n][i]) * fluxJumps[i];
2081 for (j = 0; j < nquad1; ++j)
2084 divCFluxE0[cnt] = fluxJumps[i] *
m_dGL_xi2[n][j];
2089 for (i = 0; i < nquad1; ++i)
2092 fluxJumps[i] = (
m_Q2D_e1[n][i]) * fluxJumps[i];
2094 for (j = 0; j < nquad0; ++j)
2096 cnt = (nquad0)*i + j;
2097 divCFluxE1[cnt] = fluxJumps[i] *
m_dGR_xi1[n][j];
2102 for (i = 0; i < nquad0; ++i)
2105 fluxJumps[i] = (
m_Q2D_e2[n][i]) * fluxJumps[i];
2107 for (j = 0; j < nquad1; ++j)
2109 cnt = (nquad0 - 1) + j*nquad0 - i;
2110 divCFluxE2[cnt] = fluxJumps[i] *
m_dGR_xi2[n][j];
2115 for (i = 0; i < nquad1; ++i)
2118 fluxJumps[i] = -(
m_Q2D_e3[n][i]) * fluxJumps[i];
2119 for (j = 0; j < nquad0; ++j)
2121 cnt = (nquad0*nquad1 - nquad0) + j - i*nquad0;
2122 divCFluxE3[cnt] = fluxJumps[i] *
m_dGL_xi1[n][j];
2129 ASSERTL0(
false,
"edge value (< 3) is out of range");
2136 &divCFluxE1[0], 1, &divCFlux[phys_offset], 1);
2138 Vmath::Vadd(nLocalSolutionPts, &divCFlux[phys_offset], 1,
2139 &divCFluxE2[0], 1, &divCFlux[phys_offset], 1);
2141 Vmath::Vadd(nLocalSolutionPts, &divCFlux[phys_offset], 1,
2142 &divCFluxE3[0], 1, &divCFlux[phys_offset], 1);
2161 const int nConvectiveFields,
2168 int n, e, i, j, cnt;
2170 int nElements = fields[0]->GetExpSize();
2171 int nLocalSolutionPts;
2182 &elmtToTrace = fields[0]->GetTraceMap()->GetElmtToTrace();
2185 for(n = 0; n < nElements; ++n)
2188 phys_offset = fields[0]->GetPhys_Offset(n);
2189 nLocalSolutionPts = fields[0]->GetExp(n)->GetTotPoints();
2191 base = fields[0]->GetExp(n)->GetBase();
2192 nquad0 = base[0]->GetNumPoints();
2193 nquad1 = base[1]->GetNumPoints();
2201 for(e = 0; e < fields[0]->GetExp(n)->GetNedges(); ++e)
2204 nEdgePts = fields[0]->GetExp(n)->GetEdgeNumPoints(e);
2213 trace_offset = fields[0]->GetTrace()->GetPhys_Offset(
2214 elmtToTrace[n][e]->GetElmtId());
2218 fields[0]->GetExp(n)->GetEdgeNormal(e);
2227 fields[0]->GetExp(n)->GetEdgePhysVals(
2228 e, elmtToTrace[n][e],
2229 fluxX2 + phys_offset,
2230 auxArray1 = fluxN_D);
2236 &numericalFlux[trace_offset], 1,
2240 if (fields[0]->GetExp(n)->GetEorient(e) ==
2244 auxArray1 = fluxN, 1,
2245 auxArray2 = fluxN, 1);
2248 auxArray1 = fluxN_D, 1,
2249 auxArray2 = fluxN_D, 1);
2253 for (i = 0; i < nquad0; ++i)
2256 fluxN_R[i] = (
m_Q2D_e0[n][i]) * fluxN[i];
2259 for (i = 0; i < nEdgePts; ++i)
2266 fluxN_R[i] = -fluxN_R[i];
2274 &fluxN_D[0], 1, &fluxJumps[0], 1);
2278 for (i = 0; i < nquad0; ++i)
2280 for (j = 0; j < nquad1; ++j)
2292 fields[0]->GetExp(n)->GetEdgePhysVals(
2293 e, elmtToTrace[n][e],
2294 fluxX1 + phys_offset,
2295 auxArray1 = fluxN_D);
2299 &numericalFlux[trace_offset], 1,
2303 if (fields[0]->GetExp(n)->GetEorient(e) ==
2307 auxArray1 = fluxN, 1,
2308 auxArray2 = fluxN, 1);
2311 auxArray1 = fluxN_D, 1,
2312 auxArray2 = fluxN_D, 1);
2316 for (i = 0; i < nquad1; ++i)
2319 fluxN_R[i] = (
m_Q2D_e1[n][i]) * fluxN[i];
2322 for (i = 0; i < nEdgePts; ++i)
2329 fluxN_R[i] = -fluxN_R[i];
2337 &fluxN_D[0], 1, &fluxJumps[0], 1);
2341 for (i = 0; i < nquad1; ++i)
2343 for (j = 0; j < nquad0; ++j)
2345 cnt = (nquad0)*i + j;
2357 fields[0]->GetExp(n)->GetEdgePhysVals(
2358 e, elmtToTrace[n][e],
2359 fluxX2 + phys_offset,
2360 auxArray1 = fluxN_D);
2364 &numericalFlux[trace_offset], 1,
2368 if (fields[0]->GetExp(n)->GetEorient(e) ==
2372 auxArray1 = fluxN, 1,
2373 auxArray2 = fluxN, 1);
2376 auxArray1 = fluxN_D, 1,
2377 auxArray2 = fluxN_D, 1);
2381 for (i = 0; i < nquad0; ++i)
2384 fluxN_R[i] = (
m_Q2D_e2[n][i]) * fluxN[i];
2387 for (i = 0; i < nEdgePts; ++i)
2394 fluxN_R[i] = -fluxN_R[i];
2403 &fluxN_D[0], 1, &fluxJumps[0], 1);
2407 for (i = 0; i < nquad0; ++i)
2409 for (j = 0; j < nquad1; ++j)
2411 cnt = (nquad0 - 1) + j*nquad0 - i;
2422 fields[0]->GetExp(n)->GetEdgePhysVals(
2423 e, elmtToTrace[n][e],
2424 fluxX1 + phys_offset,
2425 auxArray1 = fluxN_D);
2430 &numericalFlux[trace_offset], 1,
2434 if (fields[0]->GetExp(n)->GetEorient(e) ==
2438 auxArray1 = fluxN, 1,
2439 auxArray2 = fluxN, 1);
2442 auxArray1 = fluxN_D, 1,
2443 auxArray2 = fluxN_D, 1);
2447 for (i = 0; i < nquad1; ++i)
2450 fluxN_R[i] = (
m_Q2D_e3[n][i]) * fluxN[i];
2453 for (i = 0; i < nEdgePts; ++i)
2460 fluxN_R[i] = -fluxN_R[i];
2469 &fluxN_D[0], 1, &fluxJumps[0], 1);
2473 for (i = 0; i < nquad1; ++i)
2475 for (j = 0; j < nquad0; ++j)
2477 cnt = (nquad0*nquad1 - nquad0) + j
2485 ASSERTL0(
false,
"edge value (< 3) is out of range");
2493 &divCFluxE1[0], 1, &divCFlux[phys_offset], 1);
2495 Vmath::Vadd(nLocalSolutionPts, &divCFlux[phys_offset], 1,
2496 &divCFluxE2[0], 1, &divCFlux[phys_offset], 1);
2498 Vmath::Vadd(nLocalSolutionPts, &divCFlux[phys_offset], 1,
2499 &divCFluxE3[0], 1, &divCFlux[phys_offset], 1);
Array< OneD, Array< OneD, NekDouble > > m_dGR_xi1
virtual void v_DerCFlux_2D(const int nConvectiveFields, const int direction, const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const Array< OneD, const NekDouble > &flux, const Array< OneD, NekDouble > &iFlux, Array< OneD, NekDouble > &derCFlux)
Compute the derivative of the corrective flux wrt a given coordinate for 2D problems.
virtual void v_SetupMetrics(LibUtilities::SessionReaderSharedPtr pSession, Array< OneD, MultiRegions::ExpListSharedPtr > pFields)
Setup the metric terms to compute the contravariant fluxes. (i.e. this special metric terms transform...
virtual void v_SetupCFunctions(LibUtilities::SessionReaderSharedPtr pSession, Array< OneD, MultiRegions::ExpListSharedPtr > pFields)
Setup the derivatives of the correction functions. For more details see J Sci Comput (2011) 47: 50–7...
#define ASSERTL0(condition, msg)
Array< OneD, Array< OneD, Array< OneD, NekDouble > > > m_DU1
std::vector< PointsKey > PointsKeyVector
virtual void v_DivCFlux_2D(const int nConvectiveFields, const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const Array< OneD, const NekDouble > &fluxX1, const Array< OneD, const NekDouble > &fluxX2, const Array< OneD, const NekDouble > &numericalFlux, Array< OneD, NekDouble > &divCFlux)
Compute the divergence of the corrective flux for 2D problems.
virtual void v_Diffuse(const int nConvective, const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const Array< OneD, Array< OneD, NekDouble > > &pFwd=NullNekDoubleArrayofArray, const Array< OneD, Array< OneD, NekDouble > > &pBwd=NullNekDoubleArrayofArray)
Calculate FR Diffusion for the Navier-Stokes (NS) equations using an LDG interface flux...
Array< OneD, Array< OneD, NekDouble > > m_dGR_xi2
virtual void v_NumericalFluxO1(const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, Array< OneD, NekDouble > > > &numericalFluxO1)
Builds the numerical flux for the 1st order derivatives.
Array< OneD, Array< OneD, Array< OneD, NekDouble > > > m_BD1
Array< OneD, Array< OneD, NekDouble > > m_traceNormals
std::string m_ViscosityType
virtual void v_WeakPenaltyO1(const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &penaltyfluxO1)
Imposes appropriate bcs for the 1st order derivatives.
DiffusionFactory & GetDiffusionFactory()
void Vvtvp(int n, const T *w, const int incw, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
vvtvp (vector times vector plus vector): z = w*x + y
Array< OneD, Array< OneD, NekDouble > > m_Q2D_e0
LibUtilities::SessionReaderSharedPtr m_session
DiffusionLFRNS(std::string diffType)
DiffusionLFRNS uses the Flux Reconstruction (FR) approach to compute the diffusion term...
void Vdiv(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Multiply vector z = x/y.
virtual void v_DivCFlux_2D_Gauss(const int nConvectiveFields, const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const Array< OneD, const NekDouble > &fluxX1, const Array< OneD, const NekDouble > &fluxX2, const Array< OneD, const NekDouble > &numericalFlux, Array< OneD, NekDouble > &divCFlux)
Compute the divergence of the corrective flux for 2D problems where POINTSTYPE="GaussGaussLegendre".
DiffusionFluxVecCBNS m_fluxVectorNS
Array< OneD, Array< OneD, NekDouble > > m_dGL_xi1
virtual void v_DerCFlux_1D(const int nConvectiveFields, const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const Array< OneD, const NekDouble > &flux, const Array< OneD, const NekDouble > &iFlux, Array< OneD, NekDouble > &derCFlux)
Compute the derivative of the corrective flux for 1D problems.
boost::shared_ptr< SessionReader > SessionReaderSharedPtr
Array< OneD, Array< OneD, NekDouble > > m_homoDerivs
Array< OneD, NekDouble > m_jac
1D Gauss-Gauss-Legendre quadrature points
virtual void v_WeakPenaltyO2(const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const int var, const int dir, const Array< OneD, const NekDouble > &qfield, Array< OneD, NekDouble > &penaltyflux)
Imposes appropriate bcs for the 2nd order derivatives.
static std::string type[]
Array< OneD, Array< OneD, NekDouble > > m_Q2D_e3
void Reverse(int n, const T *x, const int incx, T *y, const int incy)
void Smul(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Scalar multiply y = alpha*y.
void jacobd(const int np, const double *z, double *polyd, const int n, const double alpha, const double beta)
Calculate the derivative of Jacobi polynomials.
Array< OneD, Array< OneD, Array< OneD, NekDouble > > > m_tmp2
Array< OneD, Array< OneD, NekDouble > > m_dGL_xi3
static DiffusionSharedPtr create(std::string diffType)
Array< OneD, Array< OneD, Array< OneD, NekDouble > > > m_tmp1
Array< OneD, Array< OneD, NekDouble > > m_divFD
void Neg(int n, T *x, const int incx)
Negate x = -x.
Array< OneD, Array< OneD, NekDouble > > m_dGR_xi3
NekDouble m_thermalConductivity
Array< OneD, Array< OneD, NekDouble > > m_dGL_xi2
Array< OneD, Array< OneD, Array< OneD, NekDouble > > > m_IF1
Array< OneD, Array< OneD, Array< OneD, NekDouble > > > m_DD1
void Vsub(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Subtract vector z = x-y.
Array< OneD, Array< OneD, NekDouble > > m_Q2D_e2
Array< OneD, Array< OneD, NekDouble > > m_gmat
Array< OneD, Array< OneD, Array< OneD, NekDouble > > > m_DFC1
const boost::shared_ptr< SpatialDomains::GeomFactors > & GetMetricInfo(void) const
virtual void v_InitObject(LibUtilities::SessionReaderSharedPtr pSession, Array< OneD, MultiRegions::ExpListSharedPtr > pFields)
Initiliase DiffusionLFRNS objects and store them before starting the time-stepping.
Array< OneD, Array< OneD, Array< OneD, NekDouble > > > m_viscTensor
Array< OneD, Array< OneD, Array< OneD, NekDouble > > > m_D1
Array< OneD, Array< OneD, Array< OneD, NekDouble > > > m_DFC2
boost::shared_ptr< Basis > BasisSharedPtr
Array< OneD, Array< OneD, NekDouble > > m_traceVel
void Zero(int n, T *x, const int incx)
Zero vector.
Array< OneD, Array< OneD, NekDouble > > m_viscFlux
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Geometry is curved or has non-constant factors.
void Vadd(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Add vector z = x+y.
void Vmul(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Multiply vector z = x*y.
virtual void v_NumericalFluxO2(const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const Array< OneD, Array< OneD, NekDouble > > &ufield, Array< OneD, Array< OneD, Array< OneD, NekDouble > > > &qfield, Array< OneD, Array< OneD, NekDouble > > &qflux)
Build the numerical flux for the 2nd order derivatives.
Array< OneD, Array< OneD, NekDouble > > m_divFC
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, tDescription pDesc="")
Register a class with the factory.
Array< OneD, Array< OneD, NekDouble > > m_Q2D_e1