Nektar++
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Friends | List of all members
Nektar::StaticWall Class Reference

#include <StaticWall.h>

Inheritance diagram for Nektar::StaticWall:
[legend]

Public Member Functions

 ~StaticWall () override
 
- Public Member Functions inherited from Nektar::IncBaseCondition
virtual ~IncBaseCondition ()
 
void Update (const Array< OneD, const Array< OneD, NekDouble > > &fields, const Array< OneD, const Array< OneD, NekDouble > > &Adv, std::map< std::string, NekDouble > &params)
 
void Initialise (const LibUtilities::SessionReaderSharedPtr &pSession)
 

Static Public Member Functions

static IncBaseConditionSharedPtr create (const LibUtilities::SessionReaderSharedPtr pSession, Array< OneD, MultiRegions::ExpListSharedPtr > pFields, Array< OneD, SpatialDomains::BoundaryConditionShPtr > cond, Array< OneD, MultiRegions::ExpListSharedPtr > exp, int nbnd, int spacedim, int bnddim)
 

Static Public Attributes

static std::string className
 

Protected Member Functions

void v_Initialise (const LibUtilities::SessionReaderSharedPtr &pSession) override
 
void v_Update (const Array< OneD, const Array< OneD, NekDouble > > &fields, const Array< OneD, const Array< OneD, NekDouble > > &Adv, std::map< std::string, NekDouble > &params) override
 
 StaticWall (const LibUtilities::SessionReaderSharedPtr pSession, Array< OneD, MultiRegions::ExpListSharedPtr > pFields, Array< OneD, SpatialDomains::BoundaryConditionShPtr > cond, Array< OneD, MultiRegions::ExpListSharedPtr > exp, int nbnd, int spacedim, int bnddim)
 
- Protected Member Functions inherited from Nektar::IncBaseCondition
 IncBaseCondition (const LibUtilities::SessionReaderSharedPtr pSession, Array< OneD, MultiRegions::ExpListSharedPtr > pFields, Array< OneD, SpatialDomains::BoundaryConditionShPtr > cond, Array< OneD, MultiRegions::ExpListSharedPtr > exp, int nbnd, int spacedim, int bnddim)
 
virtual void v_Initialise (const LibUtilities::SessionReaderSharedPtr &pSession)
 
virtual void v_Update (const Array< OneD, const Array< OneD, NekDouble > > &fields, const Array< OneD, const Array< OneD, NekDouble > > &Adv, std::map< std::string, NekDouble > &params)
 
void ExtrapolateArray (const int numCalls, Array< OneD, Array< OneD, Array< OneD, NekDouble > > > &array)
 
void RollOver (Array< OneD, Array< OneD, Array< OneD, NekDouble > > > &input)
 
void AddVisPressureBCs (const Array< OneD, const Array< OneD, NekDouble > > &fields, Array< OneD, Array< OneD, NekDouble > > &N, std::map< std::string, NekDouble > &params)
 
void AddRigidBodyAcc (Array< OneD, Array< OneD, NekDouble > > &N, std::map< std::string, NekDouble > &params, int npts0)
 
void RigidBodyVelocity (Array< OneD, Array< OneD, NekDouble > > &velocities, std::map< std::string, NekDouble > &params, int npts0)
 
void InitialiseCoords (std::map< std::string, NekDouble > &params)
 
void SetNumPointsOnPlane0 (int &npointsPlane0)
 

Friends

class MemoryManager< StaticWall >
 

Additional Inherited Members

- Protected Attributes inherited from Nektar::IncBaseCondition
int m_spacedim
 
int m_bnddim
 bounday dimensionality More...
 
int m_nbnd
 
int m_numCalls
 
int m_intSteps
 
std::map< int, SpatialDomains::BoundaryConditionShPtrm_BndConds
 
std::map< int, MultiRegions::ExpListSharedPtrm_BndExp
 
int m_npoints
 
Array< OneD, Array< OneD, NekDouble > > m_coords
 
MultiRegions::ExpListSharedPtr m_bndElmtExps
 
MultiRegions::ExpListSharedPtr m_field
 
Array< OneD, Array< OneD, Array< OneD, NekDouble > > > m_viscous
 
int m_pressure
 
std::string classname
 
- Static Protected Attributes inherited from Nektar::IncBaseCondition
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 48 of file StaticWall.h.

Constructor & Destructor Documentation

◆ ~StaticWall()

Nektar::StaticWall::~StaticWall ( )
override

Definition at line 61 of file StaticWall.cpp.

62{
63}

◆ StaticWall()

Nektar::StaticWall::StaticWall ( const LibUtilities::SessionReaderSharedPtr  pSession,
Array< OneD, MultiRegions::ExpListSharedPtr pFields,
Array< OneD, SpatialDomains::BoundaryConditionShPtr cond,
Array< OneD, MultiRegions::ExpListSharedPtr exp,
int  nbnd,
int  spacedim,
int  bnddim 
)
protected

Definition at line 44 of file StaticWall.cpp.

51 : IncBaseCondition(pSession, pFields, cond, exp, nbnd, spacedim, bnddim)
52{
53 classname = "StaticWall";
54 m_pressure = cond.size() - 1;
55 if (cond[m_pressure]->GetUserDefined() == classname)
56 {
58 }
59}
std::map< int, MultiRegions::ExpListSharedPtr > m_BndExp
IncBaseCondition(const LibUtilities::SessionReaderSharedPtr pSession, Array< OneD, MultiRegions::ExpListSharedPtr > pFields, Array< OneD, SpatialDomains::BoundaryConditionShPtr > cond, Array< OneD, MultiRegions::ExpListSharedPtr > exp, int nbnd, int spacedim, int bnddim)

References Nektar::IncBaseCondition::classname, Nektar::IncBaseCondition::m_BndExp, and Nektar::IncBaseCondition::m_pressure.

Member Function Documentation

◆ create()

static IncBaseConditionSharedPtr Nektar::StaticWall::create ( const LibUtilities::SessionReaderSharedPtr  pSession,
Array< OneD, MultiRegions::ExpListSharedPtr pFields,
Array< OneD, SpatialDomains::BoundaryConditionShPtr cond,
Array< OneD, MultiRegions::ExpListSharedPtr exp,
int  nbnd,
int  spacedim,
int  bnddim 
)
inlinestatic

Definition at line 53 of file StaticWall.h.

59 {
62 pSession, pFields, cond, exp, nbnd, spacedim, bnddim);
63 p->Initialise(pSession);
64 return p;
65 }
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
std::shared_ptr< IncBaseCondition > IncBaseConditionSharedPtr

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

◆ v_Initialise()

void Nektar::StaticWall::v_Initialise ( const LibUtilities::SessionReaderSharedPtr pSession)
overrideprotectedvirtual

Reimplemented from Nektar::IncBaseCondition.

Reimplemented in Nektar::TransMovingWall.

Definition at line 65 of file StaticWall.cpp.

67{
68 if (m_BndExp.empty())
69 {
70 return;
71 }
73 m_field->GetBndElmtExpansion(m_nbnd, m_bndElmtExps, false);
74 m_bndElmtExps->SetWaveSpace(m_field->GetWaveSpace());
75 m_viscous = Array<OneD, Array<OneD, Array<OneD, NekDouble>>>(m_intSteps);
76 for (int n = 0; n < m_intSteps; ++n)
77 {
78 m_viscous[n] = Array<OneD, Array<OneD, NekDouble>>(m_bnddim);
79 for (int i = 0; i < m_bnddim; ++i)
80 {
81 m_viscous[n][i] = Array<OneD, NekDouble>(m_npoints, 0.0);
82 }
83 }
84}
Array< OneD, Array< OneD, Array< OneD, NekDouble > > > m_viscous
MultiRegions::ExpListSharedPtr m_field
int m_bnddim
bounday dimensionality
MultiRegions::ExpListSharedPtr m_bndElmtExps
virtual void v_Initialise(const LibUtilities::SessionReaderSharedPtr &pSession)

References Nektar::IncBaseCondition::m_bnddim, Nektar::IncBaseCondition::m_bndElmtExps, Nektar::IncBaseCondition::m_BndExp, Nektar::IncBaseCondition::m_field, Nektar::IncBaseCondition::m_intSteps, Nektar::IncBaseCondition::m_nbnd, Nektar::IncBaseCondition::m_npoints, Nektar::IncBaseCondition::m_viscous, and Nektar::IncBaseCondition::v_Initialise().

Referenced by Nektar::TransMovingWall::v_Initialise().

◆ v_Update()

void Nektar::StaticWall::v_Update ( const Array< OneD, const Array< OneD, NekDouble > > &  fields,
const Array< OneD, const Array< OneD, NekDouble > > &  Adv,
std::map< std::string, NekDouble > &  params 
)
overrideprotectedvirtual

Reimplemented from Nektar::IncBaseCondition.

Reimplemented in Nektar::TransMovingWall.

Definition at line 86 of file StaticWall.cpp.

90{
91 if (m_BndExp.empty() || fields.size() == 0)
92 {
93 return;
94 }
95 ++m_numCalls;
96 // pressure
97 Array<OneD, Array<OneD, NekDouble>> rhs(m_bnddim);
98 for (int i = 0; i < m_bnddim; ++i)
99 {
100 rhs[i] = Array<OneD, NekDouble>(m_npoints, 0.);
101 }
102 AddVisPressureBCs(fields, rhs, params);
103 m_BndExp[m_pressure]->NormVectorIProductWRTBase(
104 rhs, m_BndExp[m_pressure]->UpdateCoeffs());
105}
void AddVisPressureBCs(const Array< OneD, const Array< OneD, NekDouble > > &fields, Array< OneD, Array< OneD, NekDouble > > &N, std::map< std::string, NekDouble > &params)

References Nektar::IncBaseCondition::AddVisPressureBCs(), Nektar::IncBaseCondition::m_bnddim, Nektar::IncBaseCondition::m_BndExp, Nektar::IncBaseCondition::m_npoints, Nektar::IncBaseCondition::m_numCalls, and Nektar::IncBaseCondition::m_pressure.

Friends And Related Function Documentation

◆ MemoryManager< StaticWall >

friend class MemoryManager< StaticWall >
friend

Definition at line 1 of file StaticWall.h.

Member Data Documentation

◆ className

std::string Nektar::StaticWall::className
static
Initial value:
"StaticWall", StaticWall::create,
"Far field boundary condition of moving reference frame")
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, std::string pDesc="")
Register a class with the factory.
static IncBaseConditionSharedPtr create(const LibUtilities::SessionReaderSharedPtr pSession, Array< OneD, MultiRegions::ExpListSharedPtr > pFields, Array< OneD, SpatialDomains::BoundaryConditionShPtr > cond, Array< OneD, MultiRegions::ExpListSharedPtr > exp, int nbnd, int spacedim, int bnddim)
Definition: StaticWall.h:53
IncBCFactory & GetIncBCFactory()

Definition at line 67 of file StaticWall.h.