Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
Nektar::StandardExtrapolate Class Reference

#include <StandardExtrapolate.h>

Inheritance diagram for Nektar::StandardExtrapolate:
Inheritance graph
[legend]
Collaboration diagram for Nektar::StandardExtrapolate:
Collaboration graph
[legend]

Public Member Functions

 StandardExtrapolate (const LibUtilities::SessionReaderSharedPtr pSession, Array< OneD, MultiRegions::ExpListSharedPtr > pFields, MultiRegions::ExpListSharedPtr pPressure, const Array< OneD, int > pVel, const SolverUtils::AdvectionSharedPtr advObject)
 
virtual ~StandardExtrapolate ()
 
- Public Member Functions inherited from Nektar::Extrapolate
 Extrapolate (const LibUtilities::SessionReaderSharedPtr pSession, Array< OneD, MultiRegions::ExpListSharedPtr > pFields, MultiRegions::ExpListSharedPtr pPressure, const Array< OneD, int > pVel, const SolverUtils::AdvectionSharedPtr advObject)
 
virtual ~Extrapolate ()
 
void GenerateHOPBCMap (const LibUtilities::SessionReaderSharedPtr &pSsession)
 
void UpdateRobinPrimCoeff (void)
 
void SubSteppingTimeIntegration (const int intMethod, const LibUtilities::TimeIntegrationWrapperSharedPtr &IntegrationScheme)
 
void SubStepSaveFields (const int nstep)
 
void SubStepSetPressureBCs (const Array< OneD, const Array< OneD, NekDouble > > &inarray, const NekDouble Aii_DT, NekDouble kinvis)
 
void SubStepAdvance (const LibUtilities::TimeIntegrationSolutionSharedPtr &integrationSoln, const int nstep, NekDouble time)
 
void MountHOPBCs (int HBCdata, NekDouble kinvis, Array< OneD, NekDouble > &Q, Array< OneD, const NekDouble > &Advection)
 
void EvaluatePressureBCs (const Array< OneD, const Array< OneD, NekDouble > > &fields, const Array< OneD, const Array< OneD, NekDouble > > &N, NekDouble kinvis)
 
void AddDuDt (void)
 
void AddVelBC (void)
 
void ExtrapolatePressureHBCs (void)
 
void CopyPressureHBCsToPbndExp (void)
 
Array< OneD, NekDoubleGetMaxStdVelocity (const Array< OneD, Array< OneD, NekDouble > > inarray)
 
void CorrectPressureBCs (const Array< OneD, NekDouble > &pressure)
 
void IProductNormVelocityOnHBC (const Array< OneD, const Array< OneD, NekDouble > > &Vel, Array< OneD, NekDouble > &IprodVn)
 
void IProductNormVelocityBCOnHBC (Array< OneD, NekDouble > &IprodVn)
 
LibUtilities::TimeIntegrationMethod GetSubStepIntegrationMethod (void)
 
void ExtrapolateArray (Array< OneD, Array< OneD, NekDouble > > &array)
 
void EvaluateBDFArray (Array< OneD, Array< OneD, NekDouble > > &array)
 
void AccelerationBDF (Array< OneD, Array< OneD, NekDouble > > &array)
 
void ExtrapolateArray (Array< OneD, Array< OneD, NekDouble > > &oldarrays, Array< OneD, NekDouble > &newarray, Array< OneD, NekDouble > &outarray)
 
void AddNormVelOnOBC (const int nbcoeffs, const int nreg, Array< OneD, Array< OneD, NekDouble > > &u)
 
void AddPressureToOutflowBCs (NekDouble kinvis)
 

Static Public Member Functions

static ExtrapolateSharedPtr create (const LibUtilities::SessionReaderSharedPtr &pSession, Array< OneD, MultiRegions::ExpListSharedPtr > &pFields, MultiRegions::ExpListSharedPtr &pPressure, const Array< OneD, int > &pVel, const SolverUtils::AdvectionSharedPtr &advObject)
 Creates an instance of this class. More...
 

Static Public Attributes

static std::string className
 Name of class. More...
 

Protected Member Functions

virtual void v_EvaluatePressureBCs (const Array< OneD, const Array< OneD, NekDouble > > &fields, const Array< OneD, const Array< OneD, NekDouble > > &N, NekDouble kinvis)
 
virtual void v_SubSteppingTimeIntegration (int intMethod, const LibUtilities::TimeIntegrationWrapperSharedPtr &IntegrationScheme)
 
virtual void v_SubStepSaveFields (int nstep)
 
virtual void v_SubStepSetPressureBCs (const Array< OneD, const Array< OneD, NekDouble > > &inarray, NekDouble Aii_DT, NekDouble kinvis)
 
virtual void v_SubStepAdvance (const LibUtilities::TimeIntegrationSolutionSharedPtr &integrationSoln, int nstep, NekDouble time)
 
virtual void v_MountHOPBCs (int HBCdata, NekDouble kinvis, Array< OneD, NekDouble > &Q, Array< OneD, const NekDouble > &Advection)
 
- Protected Member Functions inherited from Nektar::Extrapolate
virtual
LibUtilities::TimeIntegrationMethod 
v_GetSubStepIntegrationMethod (void)
 
void CalcNeumannPressureBCs (const Array< OneD, const Array< OneD, NekDouble > > &fields, const Array< OneD, const Array< OneD, NekDouble > > &N, NekDouble kinvis)
 
virtual void v_CalcNeumannPressureBCs (const Array< OneD, const Array< OneD, NekDouble > > &fields, const Array< OneD, const Array< OneD, NekDouble > > &N, NekDouble kinvis)
 
virtual void v_CorrectPressureBCs (const Array< OneD, NekDouble > &pressure)
 
virtual void v_AddNormVelOnOBC (const int nbcoeffs, const int nreg, Array< OneD, Array< OneD, NekDouble > > &u)
 
void CalcOutflowBCs (const Array< OneD, const Array< OneD, NekDouble > > &fields, NekDouble kinvis)
 
void RollOver (Array< OneD, Array< OneD, NekDouble > > &input)
 

Additional Inherited Members

- Protected Attributes inherited from Nektar::Extrapolate
LibUtilities::SessionReaderSharedPtr m_session
 
LibUtilities::CommSharedPtr m_comm
 
Array< OneD, HBCTypem_hbcType
 Array of type of high order BCs for splitting shemes. More...
 
Array< OneD,
MultiRegions::ExpListSharedPtr
m_fields
 Velocity fields. More...
 
MultiRegions::ExpListSharedPtr m_pressure
 Pointer to field holding pressure field. More...
 
Array< OneD, int > m_velocity
 int which identifies which components of m_fields contains the velocity (u,v,w); More...
 
SolverUtils::AdvectionSharedPtr m_advObject
 
Array< OneD, Array< OneD,
NekDouble > > 
m_previousVelFields
 
int m_curl_dim
 Curl-curl dimensionality. More...
 
int m_bnd_dim
 bounday dimensionality More...
 
Array< OneD, const
SpatialDomains::BoundaryConditionShPtr
m_PBndConds
 pressure boundary conditions container More...
 
Array< OneD,
MultiRegions::ExpListSharedPtr
m_PBndExp
 pressure boundary conditions expansion container More...
 
int m_pressureCalls
 number of times the high-order pressure BCs have been called More...
 
int m_numHBCDof
 
int m_HBCnumber
 
int m_intSteps
 Maximum points used in pressure BC evaluation. More...
 
NekDouble m_timestep
 
Array< OneD, Array< OneD,
NekDouble > > 
m_pressureHBCs
 Storage for current and previous levels of high order pressure boundary conditions. More...
 
Array< OneD, Array< OneD,
NekDouble > > 
m_iprodnormvel
 Storage for current and previous levels of the inner product of normal velocity. More...
 
Array< OneD, Array< OneD,
NekDouble > > 
m_traceNormals
 
HighOrderOutflowSharedPtr m_houtflow
 
- Static Protected Attributes inherited from Nektar::Extrapolate
static NekDouble StifflyStable_Betaq_Coeffs [3][3]
 
static NekDouble StifflyStable_Alpha_Coeffs [3][3]
 
static NekDouble StifflyStable_Gamma0_Coeffs [3]
 

Detailed Description

Definition at line 58 of file StandardExtrapolate.h.

Constructor & Destructor Documentation

Nektar::StandardExtrapolate::StandardExtrapolate ( const LibUtilities::SessionReaderSharedPtr  pSession,
Array< OneD, MultiRegions::ExpListSharedPtr pFields,
MultiRegions::ExpListSharedPtr  pPressure,
const Array< OneD, int >  pVel,
const SolverUtils::AdvectionSharedPtr  advObject 
)

Definition at line 49 of file StandardExtrapolate.cpp.

55  : Extrapolate(pSession,pFields,pPressure,pVel,advObject)
56  {
57  }
Extrapolate(const LibUtilities::SessionReaderSharedPtr pSession, Array< OneD, MultiRegions::ExpListSharedPtr > pFields, MultiRegions::ExpListSharedPtr pPressure, const Array< OneD, int > pVel, const SolverUtils::AdvectionSharedPtr advObject)
Definition: Extrapolate.cpp:59
Nektar::StandardExtrapolate::~StandardExtrapolate ( )
virtual

Definition at line 59 of file StandardExtrapolate.cpp.

60  {
61  }

Member Function Documentation

static ExtrapolateSharedPtr Nektar::StandardExtrapolate::create ( const LibUtilities::SessionReaderSharedPtr pSession,
Array< OneD, MultiRegions::ExpListSharedPtr > &  pFields,
MultiRegions::ExpListSharedPtr pPressure,
const Array< OneD, int > &  pVel,
const SolverUtils::AdvectionSharedPtr advObject 
)
inlinestatic

Creates an instance of this class.

Definition at line 63 of file StandardExtrapolate.h.

References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), and CellMLToNektar.cellml_metadata::p.

69  {
71  ::AllocateSharedPtr(pSession,pFields,pPressure,pVel,advObject);
72  return p;
73  }
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool.
boost::shared_ptr< Extrapolate > ExtrapolateSharedPtr
Definition: Extrapolate.h:60
void Nektar::StandardExtrapolate::v_EvaluatePressureBCs ( const Array< OneD, const Array< OneD, NekDouble > > &  fields,
const Array< OneD, const Array< OneD, NekDouble > > &  N,
NekDouble  kinvis 
)
protectedvirtual

Function to extrapolate the new pressure boundary condition. Based on the velocity field and on the advection term. Acceleration term is also computed. This routine is a general one for 2d and 3D application and it can be called directly from velocity correction scheme. Specialisation on dimensionality is redirected to the CalcNeumannPressureBCs method.

Implements Nektar::Extrapolate.

Reimplemented in Nektar::WeakPressureExtrapolate.

Definition at line 73 of file StandardExtrapolate.cpp.

References Nektar::Extrapolate::AddDuDt(), Nektar::Extrapolate::CalcNeumannPressureBCs(), Nektar::Extrapolate::CalcOutflowBCs(), Nektar::Extrapolate::CopyPressureHBCsToPbndExp(), Nektar::Extrapolate::ExtrapolateArray(), Nektar::Extrapolate::m_HBCnumber, Nektar::Extrapolate::m_pressureCalls, and Nektar::Extrapolate::m_pressureHBCs.

77  {
79  if(m_HBCnumber>0)
80  {
81  // Calculate non-linear and viscous BCs at current level
82  // and put in m_pressureHBCs[0]
83  CalcNeumannPressureBCs(fields,N,kinvis);
84 
85  // Extrapolate to n+1
87 
88  // Add (phi,Du/Dt) term to m_presureHBC
89  AddDuDt();
90 
91  // Copy m_pressureHBCs to m_PbndExp
93  }
94 
95  CalcOutflowBCs(fields, kinvis);
96  }
void ExtrapolateArray(Array< OneD, Array< OneD, NekDouble > > &array)
void CopyPressureHBCsToPbndExp(void)
int m_pressureCalls
number of times the high-order pressure BCs have been called
Definition: Extrapolate.h:245
Array< OneD, Array< OneD, NekDouble > > m_pressureHBCs
Storage for current and previous levels of high order pressure boundary conditions.
Definition: Extrapolate.h:259
void CalcOutflowBCs(const Array< OneD, const Array< OneD, NekDouble > > &fields, NekDouble kinvis)
void CalcNeumannPressureBCs(const Array< OneD, const Array< OneD, NekDouble > > &fields, const Array< OneD, const Array< OneD, NekDouble > > &N, NekDouble kinvis)
Definition: Extrapolate.h:188
void Nektar::StandardExtrapolate::v_MountHOPBCs ( int  HBCdata,
NekDouble  kinvis,
Array< OneD, NekDouble > &  Q,
Array< OneD, const NekDouble > &  Advection 
)
protectedvirtual

Implements Nektar::Extrapolate.

Reimplemented in Nektar::WeakPressureExtrapolate.

Definition at line 159 of file StandardExtrapolate.cpp.

References Vmath::Svtvp().

164  {
165  Vmath::Svtvp(HBCdata,-kinvis,Q,1,Advection,1,Q,1);
166  }
void Svtvp(int n, const T alpha, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
svtvp (scalar times vector plus vector): z = alpha*x + y
Definition: Vmath.cpp:485
void Nektar::StandardExtrapolate::v_SubStepAdvance ( const LibUtilities::TimeIntegrationSolutionSharedPtr integrationSoln,
int  nstep,
NekDouble  time 
)
protectedvirtual

Implements Nektar::Extrapolate.

Definition at line 140 of file StandardExtrapolate.cpp.

144  {
145  }
void Nektar::StandardExtrapolate::v_SubSteppingTimeIntegration ( int  intMethod,
const LibUtilities::TimeIntegrationWrapperSharedPtr IntegrationScheme 
)
protectedvirtual

Implements Nektar::Extrapolate.

Definition at line 102 of file StandardExtrapolate.cpp.

References Nektar::LibUtilities::eIMEXOrder1, Nektar::LibUtilities::eIMEXOrder2, Nektar::LibUtilities::eIMEXOrder3, and Nektar::Extrapolate::m_intSteps.

105  {
106  switch(intMethod)
107  {
109  {
110  m_intSteps = 1;
111  }
112  break;
114  {
115  m_intSteps = 2;
116  }
117  break;
119  {
120  m_intSteps = 3;
121  }
122  break;
123  }
124  }
IMEX 2nd order scheme using Backward Different Formula & Extrapolation.
int m_intSteps
Maximum points used in pressure BC evaluation.
Definition: Extrapolate.h:254
IMEX 3rd order scheme using Backward Different Formula & Extrapolation.
IMEX 1st order scheme using Euler Backwards/Euler Forwards.
void Nektar::StandardExtrapolate::v_SubStepSaveFields ( int  nstep)
protectedvirtual

Implements Nektar::Extrapolate.

Definition at line 151 of file StandardExtrapolate.cpp.

153  {
154  }
void Nektar::StandardExtrapolate::v_SubStepSetPressureBCs ( const Array< OneD, const Array< OneD, NekDouble > > &  inarray,
NekDouble  Aii_DT,
NekDouble  kinvis 
)
protectedvirtual

Implements Nektar::Extrapolate.

Definition at line 129 of file StandardExtrapolate.cpp.

133  {
134  }

Member Data Documentation

std::string Nektar::StandardExtrapolate::className
static
Initial value:

Name of class.

Registers the class with the Factory.

Definition at line 76 of file StandardExtrapolate.h.