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 |
Static Public Attributes | |
static std::string | type [] |
Protected Member Functions | |
DiffusionLFR (std::string diffType) | |
DiffusionLFR uses the Flux Reconstruction (FR) approach to compute the diffusion term. The implementation is only for segments, quadrilaterals and hexahedra at the moment. | |
virtual void | v_InitObject (LibUtilities::SessionReaderSharedPtr pSession, Array< OneD, MultiRegions::ExpListSharedPtr > pFields) |
Initiliase DiffusionLFR objects and store them before starting the time-stepping. | |
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 the fluxes at the interfaces of each element from the physical space to the standard space). | |
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–72. | |
virtual void | v_Diffuse (const int nConvectiveFields, const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray) |
Calculate FR Diffusion for the linear problems using an LDG interface flux. | |
virtual void | v_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. | |
virtual void | v_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. | |
virtual void | v_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. | |
virtual void | v_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. | |
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. | |
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_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_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". | |
Protected Member Functions inherited from Nektar::SolverUtils::Diffusion | |
virtual void | v_SetHomoDerivs (Array< OneD, Array< OneD, NekDouble > > &deriv) |
virtual Array< OneD, Array < OneD, Array< OneD, NekDouble > > > & | v_GetFluxTensor () |
Additional Inherited Members | |
Public Member Functions inherited from Nektar::SolverUtils::Diffusion | |
SOLVER_UTILS_EXPORT void | InitObject (LibUtilities::SessionReaderSharedPtr pSession, Array< OneD, MultiRegions::ExpListSharedPtr > pFields) |
SOLVER_UTILS_EXPORT void | Diffuse (const int nConvectiveFields, const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray) |
SOLVER_UTILS_EXPORT void | FluxVec (Array< OneD, Array< OneD, Array< OneD, NekDouble > > > &fluxvector) |
template<typename FuncPointerT , typename ObjectPointerT > | |
void | SetFluxVector (FuncPointerT func, ObjectPointerT obj) |
void | SetFluxVectorVec (DiffusionFluxVecCB fluxVector) |
template<typename FuncPointerT , typename ObjectPointerT > | |
void | SetFluxVectorNS (FuncPointerT func, ObjectPointerT obj) |
template<typename FuncPointerT , typename ObjectPointerT > | |
void | SetArtificialDiffusionVector (FuncPointerT func, ObjectPointerT obj) |
void | SetFluxVectorNS (DiffusionFluxVecCBNS fluxVector) |
void | SetRiemannSolver (RiemannSolverSharedPtr riemann) |
void | SetHomoDerivs (Array< OneD, Array< OneD, NekDouble > > &deriv) |
virtual Array< OneD, Array < OneD, Array< OneD, NekDouble > > > & | GetFluxTensor () |
Definition at line 45 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 69 of file DiffusionLFR.cpp.
Referenced by create().
|
inlinestatic |
Definition at line 48 of file DiffusionLFR.h.
References DiffusionLFR().
|
protectedvirtual |
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 1458 of file DiffusionLFR.cpp.
References Nektar::StdRegions::StdExpansion::GetMetricInfo(), m_dGL_xi1, m_dGR_xi1, Vmath::Smul(), Vmath::Vadd(), and Vmath::Vcopy().
Referenced by v_Diffuse().
|
protectedvirtual |
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 1574 of file DiffusionLFR.cpp.
References ASSERTL0, Nektar::StdRegions::eBackwards, Nektar::SpatialDomains::eDeformed, Nektar::StdRegions::StdExpansion::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().
|
protectedvirtual |
Calculate FR Diffusion for the linear problems using an LDG interface flux.
Implements Nektar::SolverUtils::Diffusion.
Definition at line 845 of file DiffusionLFR.cpp.
References ASSERTL0, 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, v_DerCFlux_1D(), v_DerCFlux_2D(), v_DivCFlux_2D(), v_DivCFlux_2D_Gauss(), v_NumFluxforScalar(), v_NumFluxforVector(), Vmath::Vadd(), Vmath::Vcopy(), Vmath::Vdiv(), and Vmath::Vmul().
|
protectedvirtual |
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 1789 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().
|
protectedvirtual |
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 1985 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().
|
protectedvirtual |
Initiliase DiffusionLFR objects and store them before starting the time-stepping.
This routine calls the virtual functions v_SetupMetrics and v_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 83 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, v_SetupCFunctions(), and v_SetupMetrics().
|
protectedvirtual |
Builds the numerical flux for the 1st order derivatives.
Definition at line 1154 of file DiffusionLFR.cpp.
References m_traceNormals, Vmath::Svtvp(), v_WeakPenaltyforScalar(), and Vmath::Vcopy().
Referenced by v_Diffuse().
|
protectedvirtual |
Build the numerical flux for the 2nd order derivatives.
Definition at line 1295 of file DiffusionLFR.cpp.
References m_traceNormals, Vmath::Svtvp(), v_WeakPenaltyforVector(), Vmath::Vadd(), and Vmath::Vmul().
Referenced by v_Diffuse().
|
protectedvirtual |
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 virtual functions #v_DivCFlux_1D, v_DivCFlux_2D, #v_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 322 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().
|
protectedvirtual |
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 #GetEdgeQFactors 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 172 of file DiffusionLFR.cpp.
References ASSERTL0, Nektar::SpatialDomains::eDeformed, Nektar::StdRegions::StdExpansion::GetMetricInfo(), m_gmat, m_jac, m_Q2D_e0, m_Q2D_e1, m_Q2D_e2, m_Q2D_e3, and m_traceNormals.
Referenced by v_InitObject().
|
protectedvirtual |
Imposes appropriate bcs for the 1st order derivatives.
Definition at line 1229 of file DiffusionLFR.cpp.
References Nektar::SpatialDomains::eDirichlet, Nektar::SpatialDomains::eNeumann, and Vmath::Vcopy().
Referenced by v_NumFluxforScalar().
|
protectedvirtual |
Imposes appropriate bcs for the 2nd order derivatives.
Definition at line 1391 of file DiffusionLFR.cpp.
References Nektar::SpatialDomains::eDirichlet, Nektar::SpatialDomains::eNeumann, m_traceNormals, and Vmath::Vmul().
Referenced by v_NumFluxforVector().
|
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 83 of file DiffusionLFR.h.
Referenced by v_Diffuse(), and v_InitObject().
|
protected |
Definition at line 80 of file DiffusionLFR.h.
Referenced by v_Diffuse(), and v_InitObject().
|
protected |
Definition at line 85 of file DiffusionLFR.h.
Referenced by v_Diffuse(), and v_InitObject().
Definition at line 63 of file DiffusionLFR.h.
Referenced by v_DerCFlux_1D(), v_DerCFlux_2D(), v_DivCFlux_2D(), v_DivCFlux_2D_Gauss(), and v_SetupCFunctions().
Definition at line 65 of file DiffusionLFR.h.
Referenced by v_DerCFlux_2D(), v_DivCFlux_2D(), v_DivCFlux_2D_Gauss(), and v_SetupCFunctions().
Definition at line 67 of file DiffusionLFR.h.
Referenced by v_SetupCFunctions().
Definition at line 64 of file DiffusionLFR.h.
Referenced by v_DerCFlux_1D(), v_DerCFlux_2D(), v_DivCFlux_2D(), v_DivCFlux_2D_Gauss(), and v_SetupCFunctions().
Definition at line 66 of file DiffusionLFR.h.
Referenced by v_DerCFlux_2D(), v_DivCFlux_2D(), v_DivCFlux_2D_Gauss(), and v_SetupCFunctions().
Definition at line 68 of file DiffusionLFR.h.
Referenced by v_SetupCFunctions().
|
protected |
Definition at line 92 of file DiffusionLFR.h.
Referenced by v_SetupCFunctions().
Definition at line 87 of file DiffusionLFR.h.
Referenced by v_Diffuse(), and v_InitObject().
Definition at line 86 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().
Definition at line 56 of file DiffusionLFR.h.
Referenced by v_Diffuse(), and v_SetupMetrics().
|
protected |
Definition at line 78 of file DiffusionLFR.h.
Referenced by v_Diffuse(), and v_InitObject().
Definition at line 84 of file DiffusionLFR.h.
Referenced by v_Diffuse(), and v_InitObject().
DNekMatSharedPtr Nektar::SolverUtils::DiffusionLFR::m_Ixm |
Definition at line 69 of file DiffusionLFR.h.
DNekMatSharedPtr Nektar::SolverUtils::DiffusionLFR::m_Ixp |
Definition at line 70 of file DiffusionLFR.h.
Definition at line 55 of file DiffusionLFR.h.
Referenced by v_Diffuse(), and v_SetupMetrics().
Definition at line 58 of file DiffusionLFR.h.
Referenced by v_DivCFlux_2D(), v_DivCFlux_2D_Gauss(), and v_SetupMetrics().
Definition at line 59 of file DiffusionLFR.h.
Referenced by v_DivCFlux_2D(), v_DivCFlux_2D_Gauss(), and v_SetupMetrics().
Definition at line 60 of file DiffusionLFR.h.
Referenced by v_DivCFlux_2D(), v_DivCFlux_2D_Gauss(), and v_SetupMetrics().
Definition at line 61 of file DiffusionLFR.h.
Referenced by v_DivCFlux_2D(), v_DivCFlux_2D_Gauss(), and v_SetupMetrics().
|
protected |
Definition at line 76 of file DiffusionLFR.h.
Referenced by v_InitObject().
|
protected |
Definition at line 89 of file DiffusionLFR.h.
Referenced by v_Diffuse(), and v_InitObject().
|
protected |
Definition at line 90 of file DiffusionLFR.h.
Referenced by v_Diffuse(), and v_InitObject().
Definition at line 75 of file DiffusionLFR.h.
Referenced by v_DivCFlux_2D(), v_DivCFlux_2D_Gauss(), v_NumFluxforScalar(), v_NumFluxforVector(), v_SetupMetrics(), and v_WeakPenaltyforVector().
|
static |
Definition at line 53 of file DiffusionLFR.h.