Nektar++
|
#include <DiffusionLFR.h>
Static Public Member Functions | |
static DiffusionSharedPtr | create (std::string diffType) |
Public Attributes | |
Array< OneD, NekDouble > | m_jac |
Array< OneD, Array< OneD, NekDouble > > | m_gmat |
Array< OneD, Array< OneD, NekDouble > > | m_Q2D_e0 |
Array< OneD, Array< OneD, NekDouble > > | m_Q2D_e1 |
Array< OneD, Array< OneD, NekDouble > > | m_Q2D_e2 |
Array< OneD, Array< OneD, NekDouble > > | m_Q2D_e3 |
Array< OneD, Array< OneD, NekDouble > > | m_dGL_xi1 |
Array< OneD, Array< OneD, NekDouble > > | m_dGR_xi1 |
Array< OneD, Array< OneD, NekDouble > > | m_dGL_xi2 |
Array< OneD, Array< OneD, NekDouble > > | m_dGR_xi2 |
Array< OneD, Array< OneD, NekDouble > > | m_dGL_xi3 |
Array< OneD, Array< OneD, NekDouble > > | m_dGR_xi3 |
DNekMatSharedPtr | m_Ixm |
DNekMatSharedPtr | m_Ixp |
![]() | |
Array< OneD, NekDouble > | m_divVel |
Params for Ducros sensor. More... | |
Array< OneD, NekDouble > | m_divVelSquare |
Array< OneD, NekDouble > | m_curlVelSquare |
Static Public Attributes | |
static std::string | type [] |
Private Member Functions | |
void | 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 the fluxes at the interfaces of each element from the physical space to the standard space). More... | |
void | 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–72. More... | |
void | NumFluxforScalar (const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const Array< OneD, Array< OneD, NekDouble >> &ufield, Array< OneD, Array< OneD, Array< OneD, NekDouble >>> &uflux) |
Builds the numerical flux for the 1st order derivatives. More... | |
void | WeakPenaltyforScalar (const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const int var, const Array< OneD, const NekDouble > &ufield, Array< OneD, NekDouble > &penaltyflux) |
Imposes appropriate bcs for the 1st order derivatives. More... | |
void | NumFluxforVector (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. More... | |
void | WeakPenaltyforVector (const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const int var, const int dir, const Array< OneD, const NekDouble > &qfield, Array< OneD, NekDouble > &penaltyflux, NekDouble C11) |
Imposes appropriate bcs for the 2nd order derivatives. More... | |
void | 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. More... | |
void | 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. More... | |
void | 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. More... | |
void | 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". More... | |
Definition at line 44 of file DiffusionLFR.h.
|
protected |
DiffusionLFR uses the Flux Reconstruction (FR) approach to compute the diffusion term. The implementation is only for segments, quadrilaterals and hexahedra at the moment.
Definition at line 71 of file DiffusionLFR.cpp.
Referenced by create().
|
inlinestatic |
Definition at line 47 of file DiffusionLFR.h.
References DiffusionLFR().
|
private |
Compute the derivative of the corrective flux for 1D problems.
nConvectiveFields | Number of fields. |
fields | Pointer to fields. |
flux | Volumetric flux in the physical space. |
iFlux | Numerical interface flux in physical space. |
derCFlux | Derivative of the corrective flux. |
Definition at line 1477 of file DiffusionLFR.cpp.
References Nektar::LocalRegions::Expansion::GetMetricInfo(), m_dGL_xi1, m_dGR_xi1, Vmath::Smul(), Vmath::Vadd(), and Vmath::Vcopy().
Referenced by v_Diffuse().
|
private |
Compute the derivative of the corrective flux wrt a given coordinate for 2D problems.
There could be a bug for deformed elements since first derivatives are not exactly the same results of DiffusionLDG as expected
nConvectiveFields | Number of fields. |
fields | Pointer to fields. |
flux | Volumetric flux in the physical space. |
numericalFlux | Numerical interface flux in physical space. |
derCFlux | Derivative of the corrective flux. |
Definition at line 1598 of file DiffusionLFR.cpp.
References ASSERTL0, Nektar::StdRegions::eBackwards, Nektar::SpatialDomains::eDeformed, Nektar::LocalRegions::Expansion::GetMetricInfo(), m_dGL_xi1, m_dGL_xi2, m_dGR_xi1, m_dGR_xi2, Vmath::Reverse(), Vmath::Smul(), Vmath::Vadd(), and Vmath::Vsub().
Referenced by v_Diffuse().
|
private |
Compute the divergence of the corrective flux for 2D problems.
nConvectiveFields | Number of fields. |
fields | Pointer to fields. |
fluxX1 | X1 - volumetric flux in physical space. |
fluxX2 | X2 - volumetric flux in physical space. |
numericalFlux | Interface flux in physical space. |
divCFlux | Divergence of the corrective flux for 2D problems. |
Definition at line 1813 of file DiffusionLFR.cpp.
References ASSERTL0, Nektar::StdRegions::eBackwards, m_dGL_xi1, m_dGL_xi2, m_dGR_xi1, m_dGR_xi2, m_Q2D_e0, m_Q2D_e1, m_Q2D_e2, m_Q2D_e3, m_traceNormals, Vmath::Reverse(), Vmath::Vadd(), and Vmath::Vsub().
Referenced by v_Diffuse().
|
private |
Compute the divergence of the corrective flux for 2D problems where POINTSTYPE="GaussGaussLegendre".
nConvectiveFields | Number of fields. |
fields | Pointer to fields. |
fluxX1 | X1-volumetric flux in physical space. |
fluxX2 | X2-volumetric flux in physical space. |
numericalFlux | Interface flux in physical space. |
divCFlux | Divergence of the corrective flux. |
Definition at line 2003 of file DiffusionLFR.cpp.
References ASSERTL0, Nektar::StdRegions::eBackwards, m_dGL_xi1, m_dGL_xi2, m_dGR_xi1, m_dGR_xi2, m_Q2D_e0, m_Q2D_e1, m_Q2D_e2, m_Q2D_e3, m_traceNormals, Vmath::Neg(), Vmath::Reverse(), Vmath::Vadd(), Vmath::Vcopy(), and Vmath::Vsub().
Referenced by v_Diffuse().
|
private |
Builds the numerical flux for the 1st order derivatives.
Definition at line 1178 of file DiffusionLFR.cpp.
References m_traceNormals, Vmath::Svtvp(), Vmath::Vcopy(), and WeakPenaltyforScalar().
Referenced by v_Diffuse().
|
private |
Build the numerical flux for the 2nd order derivatives.
Definition at line 1315 of file DiffusionLFR.cpp.
References m_traceNormals, Vmath::Svtvp(), Vmath::Vadd(), Vmath::Vmul(), and WeakPenaltyforVector().
Referenced by v_Diffuse().
|
private |
Setup the derivatives of the correction functions. For more details see J Sci Comput (2011) 47: 50–72.
This routine calls 3 different bases: #eDG_DG_Left - #eDG_DG_Left which recovers a nodal DG scheme, #eDG_SD_Left - #eDG_SD_Left which recovers the SD scheme, #eDG_HU_Left - #eDG_HU_Left which recovers the Huynh scheme. The values of the derivatives of the correction function are then stored into global variables and reused into the Functions #DivCFlux_1D, DivCFlux_2D, #DivCFlux_3D to compute the the divergence of the correction flux for 1D, 2D or 3D problems.
pSession | Pointer to session reader. |
pFields | Pointer to fields. |
Definition at line 329 of file DiffusionLFR.cpp.
References ASSERTL0, Polylib::jacobd(), m_dGL_xi1, m_dGL_xi2, m_dGL_xi3, m_dGR_xi1, m_dGR_xi2, m_dGR_xi3, and m_diffType.
Referenced by v_InitObject().
|
private |
Setup the metric terms to compute the contravariant fluxes. (i.e. this special metric terms transform the fluxes at the interfaces of each element from the physical space to the standard space).
This routine calls the function #GetTraceQFactors to compute and store the metric factors following an anticlockwise conventions along the edges/faces of each element. Note: for 1D problem the transformation is not needed.
pSession | Pointer to session reader. |
pFields | Pointer to fields. |
Definition at line 166 of file DiffusionLFR.cpp.
References ASSERTL0, Nektar::SpatialDomains::eDeformed, Nektar::LocalRegions::Expansion::GetMetricInfo(), m_gmat, m_jac, m_Q2D_e0, m_Q2D_e1, m_Q2D_e2, m_Q2D_e3, and m_traceNormals.
Referenced by v_InitObject().
|
overrideprotectedvirtual |
Calculate FR Diffusion for the linear problems using an LDG interface flux.
Reimplemented from Nektar::SolverUtils::Diffusion.
Definition at line 874 of file DiffusionLFR.cpp.
References ASSERTL0, DerCFlux_1D(), DerCFlux_2D(), DivCFlux_2D(), DivCFlux_2D_Gauss(), Nektar::LibUtilities::eGaussGaussLegendre, m_BD1, m_D1, m_DD1, m_DFC1, m_DFC2, m_divFC, m_divFD, m_DU1, m_gmat, m_IF1, m_IF2, m_jac, m_tmp1, m_tmp2, NumFluxforScalar(), NumFluxforVector(), Vmath::Vadd(), Vmath::Vcopy(), Vmath::Vdiv(), and Vmath::Vmul().
|
overrideprotectedvirtual |
Initiliase DiffusionLFR objects and store them before starting the time-stepping.
This routine calls the functions SetupMetrics and SetupCFunctions to initialise the objects needed by DiffusionLFR.
pSession | Pointer to session reader. |
pFields | Pointer to fields. |
Reimplemented from Nektar::SolverUtils::Diffusion.
Definition at line 85 of file DiffusionLFR.cpp.
References m_BD1, m_D1, m_DD1, m_DFC1, m_DFC2, m_divFC, m_divFD, m_DU1, m_IF1, m_IF2, m_session, m_tmp1, m_tmp2, SetupCFunctions(), and SetupMetrics().
|
private |
Imposes appropriate bcs for the 1st order derivatives.
Definition at line 1252 of file DiffusionLFR.cpp.
References Nektar::SpatialDomains::eDirichlet, Nektar::SpatialDomains::eNeumann, and Vmath::Vcopy().
Referenced by NumFluxforScalar().
|
private |
Imposes appropriate bcs for the 2nd order derivatives.
Definition at line 1409 of file DiffusionLFR.cpp.
References Nektar::SpatialDomains::eDirichlet, Nektar::SpatialDomains::eNeumann, m_traceNormals, and Vmath::Vmul().
Referenced by NumFluxforVector().
|
protected |
Definition at line 80 of file DiffusionLFR.h.
Referenced by v_Diffuse(), and v_InitObject().
|
protected |
Definition at line 81 of file DiffusionLFR.h.
Referenced by v_Diffuse(), and v_InitObject().
|
protected |
Definition at line 82 of file DiffusionLFR.h.
Referenced by v_Diffuse(), and v_InitObject().
|
protected |
Definition at line 79 of file DiffusionLFR.h.
Referenced by v_Diffuse(), and v_InitObject().
|
protected |
Definition at line 84 of file DiffusionLFR.h.
Referenced by v_Diffuse(), and v_InitObject().
Definition at line 62 of file DiffusionLFR.h.
Referenced by DerCFlux_1D(), DerCFlux_2D(), DivCFlux_2D(), DivCFlux_2D_Gauss(), and SetupCFunctions().
Definition at line 64 of file DiffusionLFR.h.
Referenced by DerCFlux_2D(), DivCFlux_2D(), DivCFlux_2D_Gauss(), and SetupCFunctions().
Definition at line 66 of file DiffusionLFR.h.
Referenced by SetupCFunctions().
Definition at line 63 of file DiffusionLFR.h.
Referenced by DerCFlux_1D(), DerCFlux_2D(), DivCFlux_2D(), DivCFlux_2D_Gauss(), and SetupCFunctions().
Definition at line 65 of file DiffusionLFR.h.
Referenced by DerCFlux_2D(), DivCFlux_2D(), DivCFlux_2D_Gauss(), and SetupCFunctions().
Definition at line 67 of file DiffusionLFR.h.
Referenced by SetupCFunctions().
|
protected |
Definition at line 91 of file DiffusionLFR.h.
Referenced by SetupCFunctions().
Definition at line 86 of file DiffusionLFR.h.
Referenced by v_Diffuse(), and v_InitObject().
Definition at line 85 of file DiffusionLFR.h.
Referenced by v_Diffuse(), and v_InitObject().
|
protected |
Definition at line 78 of file DiffusionLFR.h.
Referenced by v_Diffuse(), and v_InitObject().
Definition at line 55 of file DiffusionLFR.h.
Referenced by SetupMetrics(), and v_Diffuse().
|
protected |
Definition at line 77 of file DiffusionLFR.h.
Referenced by v_Diffuse(), and v_InitObject().
Definition at line 83 of file DiffusionLFR.h.
Referenced by v_Diffuse(), and v_InitObject().
DNekMatSharedPtr Nektar::SolverUtils::DiffusionLFR::m_Ixm |
Definition at line 68 of file DiffusionLFR.h.
DNekMatSharedPtr Nektar::SolverUtils::DiffusionLFR::m_Ixp |
Definition at line 69 of file DiffusionLFR.h.
Definition at line 54 of file DiffusionLFR.h.
Referenced by SetupMetrics(), and v_Diffuse().
Definition at line 57 of file DiffusionLFR.h.
Referenced by DivCFlux_2D(), DivCFlux_2D_Gauss(), and SetupMetrics().
Definition at line 58 of file DiffusionLFR.h.
Referenced by DivCFlux_2D(), DivCFlux_2D_Gauss(), and SetupMetrics().
Definition at line 59 of file DiffusionLFR.h.
Referenced by DivCFlux_2D(), DivCFlux_2D_Gauss(), and SetupMetrics().
Definition at line 60 of file DiffusionLFR.h.
Referenced by DivCFlux_2D(), DivCFlux_2D_Gauss(), and SetupMetrics().
|
protected |
Definition at line 75 of file DiffusionLFR.h.
Referenced by v_InitObject().
|
protected |
Definition at line 88 of file DiffusionLFR.h.
Referenced by v_Diffuse(), and v_InitObject().
|
protected |
Definition at line 89 of file DiffusionLFR.h.
Referenced by v_Diffuse(), and v_InitObject().
Definition at line 74 of file DiffusionLFR.h.
Referenced by DivCFlux_2D(), DivCFlux_2D_Gauss(), NumFluxforScalar(), NumFluxforVector(), SetupMetrics(), and WeakPenaltyforVector().
|
static |
Definition at line 52 of file DiffusionLFR.h.