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::SubSteppingExtrapolateWeakPressure Class Reference

#include <SubSteppingExtrapolateWeakPressure.h>

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

Public Member Functions

 SubSteppingExtrapolateWeakPressure (const LibUtilities::SessionReaderSharedPtr pSession, Array< OneD, MultiRegions::ExpListSharedPtr > pFields, MultiRegions::ExpListSharedPtr pPressure, const Array< OneD, int > pVel, const SolverUtils::AdvectionSharedPtr advObject)
 
virtual ~SubSteppingExtrapolateWeakPressure ()
 
- Public Member Functions inherited from Nektar::SubSteppingExtrapolate
 SubSteppingExtrapolate (const LibUtilities::SessionReaderSharedPtr pSession, Array< OneD, MultiRegions::ExpListSharedPtr > pFields, MultiRegions::ExpListSharedPtr pPressure, const Array< OneD, int > pVel, const SolverUtils::AdvectionSharedPtr advObject)
 
virtual ~SubSteppingExtrapolate ()
 
- 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 Member Functions inherited from Nektar::SubSteppingExtrapolate
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...
 
- Static Public Attributes inherited from Nektar::SubSteppingExtrapolate
static std::string className
 Name of class. More...
 

Protected Member Functions

virtual void v_SubStepSetPressureBCs (const Array< OneD, const Array< OneD, NekDouble > > &inarray, NekDouble Aii_Dt, NekDouble kinvis)
 
virtual void v_AddNormVelOnOBC (const int nbcoeffs, const int nreg, Array< OneD, Array< OneD, NekDouble > > &u)
 
- Protected Member Functions inherited from Nektar::SubSteppingExtrapolate
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_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)
 
virtual
LibUtilities::TimeIntegrationMethod 
v_GetSubStepIntegrationMethod (void)
 
void SubStepAdvection (const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble time)
 
void SubStepProjection (const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble time)
 
void SubStepExtrapolateField (NekDouble toff, Array< OneD, Array< OneD, NekDouble > > &ExtVel)
 
void AddAdvectionPenaltyFlux (const Array< OneD, const Array< OneD, NekDouble > > &velfield, const Array< OneD, const Array< OneD, NekDouble > > &physfield, Array< OneD, Array< OneD, NekDouble > > &outarray)
 
NekDouble GetSubstepTimeStep ()
 
- Protected Member Functions inherited from Nektar::Extrapolate
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)
 
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::SubSteppingExtrapolate
LibUtilities::TimeIntegrationWrapperSharedPtr m_subStepIntegrationScheme
 
LibUtilities::TimeIntegrationSchemeOperators m_subStepIntegrationOps
 
Array< OneD, Array< OneD,
NekDouble > > 
m_previousVelFields
 
NekDouble m_cflSafetyFactor
 
int m_infosteps
 
int m_minsubsteps
 
int m_maxsubsteps
 
- 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 51 of file SubSteppingExtrapolateWeakPressure.h.

Constructor & Destructor Documentation

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

Definition at line 51 of file SubSteppingExtrapolateWeakPressure.cpp.

57  : SubSteppingExtrapolate(pSession,pFields,pPressure,pVel,advObject)
58  {
59  }
SubSteppingExtrapolate(const LibUtilities::SessionReaderSharedPtr pSession, Array< OneD, MultiRegions::ExpListSharedPtr > pFields, MultiRegions::ExpListSharedPtr pPressure, const Array< OneD, int > pVel, const SolverUtils::AdvectionSharedPtr advObject)
Nektar::SubSteppingExtrapolateWeakPressure::~SubSteppingExtrapolateWeakPressure ( )
virtual

Definition at line 61 of file SubSteppingExtrapolateWeakPressure.cpp.

62  {
63  }

Member Function Documentation

static ExtrapolateSharedPtr Nektar::SubSteppingExtrapolateWeakPressure::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 55 of file SubSteppingExtrapolateWeakPressure.h.

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

61  {
64  ::AllocateSharedPtr(pSession,pFields,pPressure,pVel,advObject);
65  return p;
66  }
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::SubSteppingExtrapolateWeakPressure::v_AddNormVelOnOBC ( const int  nbcoeffs,
const int  nreg,
Array< OneD, Array< OneD, NekDouble > > &  u 
)
protectedvirtual

Reimplemented from Nektar::Extrapolate.

Definition at line 93 of file SubSteppingExtrapolateWeakPressure.cpp.

References Nektar::Extrapolate::EvaluateBDFArray(), Nektar::Extrapolate::m_curl_dim, Nektar::Extrapolate::m_houtflow, Nektar::Extrapolate::m_intSteps, Nektar::Extrapolate::m_PBndExp, Nektar::Extrapolate::m_timestep, and Vmath::Svtvp().

95  {
96  if(!m_houtflow.get()) // no outflow on partition so just return
97  {
98  return;
99  }
100 
101  int nbcoeffs = m_PBndExp[nreg]->GetNcoeffs();
102  //int nqb = m_PBndExp[nreg]->GetTotPoints();
103 
104  Array<OneD, NekDouble> IProdVnTmp(nbcoeffs);
105 
106  Array<OneD, Array<OneD, NekDouble> > ubnd(m_curl_dim);
107 
108 
109  for(int i = 0; i < m_curl_dim; ++i)
110  {
111  EvaluateBDFArray(m_houtflow->m_outflowVelBnd[cnt][i]);
112 
113  ubnd[i] = m_houtflow->m_outflowVelBnd[cnt][i][m_intSteps-1];
114 
115  // point input u to the first part of the array for later uee.
116  u[i] = m_houtflow->m_outflowVelBnd[cnt][i][0];
117  }
118 
119  m_PBndExp[nreg]->NormVectorIProductWRTBase(ubnd,IProdVnTmp);
120 
121  Vmath::Svtvp(nbcoeffs,-1.0/m_timestep,IProdVnTmp,1,m_PBndExp[nreg]->UpdateCoeffs(),1,
122  m_PBndExp[nreg]->UpdateCoeffs(),1);
123  }
Array< OneD, MultiRegions::ExpListSharedPtr > m_PBndExp
pressure boundary conditions expansion container
Definition: Extrapolate.h:242
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
HighOrderOutflowSharedPtr m_houtflow
Definition: Extrapolate.h:272
void EvaluateBDFArray(Array< OneD, Array< OneD, NekDouble > > &array)
int m_intSteps
Maximum points used in pressure BC evaluation.
Definition: Extrapolate.h:254
int m_curl_dim
Curl-curl dimensionality.
Definition: Extrapolate.h:233
NekDouble m_timestep
Definition: Extrapolate.h:256
void Nektar::SubSteppingExtrapolateWeakPressure::v_SubStepSetPressureBCs ( const Array< OneD, const Array< OneD, NekDouble > > &  inarray,
NekDouble  Aii_Dt,
NekDouble  kinvis 
)
protectedvirtual

Reimplemented from Nektar::SubSteppingExtrapolate.

Definition at line 65 of file SubSteppingExtrapolateWeakPressure.cpp.

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

69  {
70  Array<OneD, Array<OneD, NekDouble> > nullvelfields;
71 
73 
74  // Calculate non-linear and viscous BCs at current level and
75  // put in m_pressureHBCs[0]
76  CalcNeumannPressureBCs(inarray,nullvelfields,kinvis);
77 
78  // Extrapolate to m_pressureHBCs to n+1
80 
81  // Add (phi,gamma0 u^{n+1}/Dt) term to m_presureHBC
82  AddVelBC();
83 
84  // Copy m_pressureHBCs to m_PbndExp
86 
87  // Evaluate High order outflow conditiosn if required.
88  CalcOutflowBCs(inarray, kinvis);
89  }
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

Member Data Documentation

std::string Nektar::SubSteppingExtrapolateWeakPressure::className
static
Initial value:
"SubSteppingWeakPressure",
"SubSteppingWeakPressure")

Name of class.

Registers the class with the Factory.

Definition at line 69 of file SubSteppingExtrapolateWeakPressure.h.