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

Extrapolation of order 0 for all the variables such that, at the boundaries, a trivial Riemann problem is solved. More...

#include <ExtrapOrder0BC.h>

Inheritance diagram for Nektar::ExtrapOrder0BC:
[legend]

Static Public Member Functions

static CFSBndCondSharedPtr create (const LibUtilities::SessionReaderSharedPtr &pSession, const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields, const Array< OneD, Array< OneD, NekDouble > > &pTraceNormals, const Array< OneD, Array< OneD, NekDouble > > &pGridVelocity, const int pSpaceDim, const int bcRegion, const int cnt)
 Creates an instance of this class. More...
 

Static Public Attributes

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

Protected Member Functions

void v_Apply (Array< OneD, Array< OneD, NekDouble > > &Fwd, Array< OneD, Array< OneD, NekDouble > > &physarray, const NekDouble &time) override
 
- Protected Member Functions inherited from Nektar::CFSBndCond
 CFSBndCond (const LibUtilities::SessionReaderSharedPtr &pSession, const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields, const Array< OneD, Array< OneD, NekDouble > > &pTraceNormals, const Array< OneD, Array< OneD, NekDouble > > &pGridVelocity, const int pSpaceDim, const int bcRegion, const int cnt)
 Constructor. More...
 
virtual void v_Apply (Array< OneD, Array< OneD, NekDouble > > &Fwd, Array< OneD, Array< OneD, NekDouble > > &physarray, const NekDouble &time)=0
 
virtual void v_ApplyBwdWeight ()
 

Private Member Functions

 ExtrapOrder0BC (const LibUtilities::SessionReaderSharedPtr &pSession, const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields, const Array< OneD, Array< OneD, NekDouble > > &pTraceNormals, const Array< OneD, Array< OneD, NekDouble > > &pGridVelocity, const int pSpaceDim, const int bcRegion, const int cnt)
 
 ~ExtrapOrder0BC (void) override
 

Friends

class MemoryManager< ExtrapOrder0BC >
 

Additional Inherited Members

- Public Member Functions inherited from Nektar::CFSBndCond
virtual ~CFSBndCond ()
 
void Apply (Array< OneD, Array< OneD, NekDouble > > &Fwd, Array< OneD, Array< OneD, NekDouble > > &physarray, const NekDouble &time=0)
 Apply the boundary condition. More...
 
void ApplyBwdWeight ()
 Apply the Weight of boundary condition. More...
 
- Protected Attributes inherited from Nektar::CFSBndCond
LibUtilities::SessionReaderSharedPtr m_session
 Session reader. More...
 
Array< OneD, MultiRegions::ExpListSharedPtrm_fields
 Array of fields. More...
 
Array< OneD, Array< OneD, NekDouble > > m_traceNormals
 Trace normals. More...
 
Array< OneD, Array< OneD, NekDouble > > m_gridVelocityTrace
 Grid Velocity. More...
 
int m_spacedim
 Space dimension. More...
 
VariableConverterSharedPtr m_varConv
 Auxiliary object to convert variables. More...
 
NekDouble m_diffusionAveWeight
 Weight for average calculation of diffusion term. More...
 
NekDouble m_gamma
 Parameters of the flow. More...
 
NekDouble m_rhoInf
 
NekDouble m_pInf
 
NekDouble m_pOut
 
Array< OneD, NekDoublem_velInf
 
NekDouble m_angVel
 
int m_bcRegion
 Id of the boundary region. More...
 
int m_offset
 Offset. More...
 

Detailed Description

Extrapolation of order 0 for all the variables such that, at the boundaries, a trivial Riemann problem is solved.

Definition at line 47 of file ExtrapOrder0BC.h.

Constructor & Destructor Documentation

◆ ExtrapOrder0BC()

Nektar::ExtrapOrder0BC::ExtrapOrder0BC ( const LibUtilities::SessionReaderSharedPtr pSession,
const Array< OneD, MultiRegions::ExpListSharedPtr > &  pFields,
const Array< OneD, Array< OneD, NekDouble > > &  pTraceNormals,
const Array< OneD, Array< OneD, NekDouble > > &  pGridVelocity,
const int  pSpaceDim,
const int  bcRegion,
const int  cnt 
)
private

Definition at line 47 of file ExtrapOrder0BC.cpp.

53 : CFSBndCond(pSession, pFields, pTraceNormals, pGridVelocity, pSpaceDim,
54 bcRegion, cnt)
55{
56}
CFSBndCond(const LibUtilities::SessionReaderSharedPtr &pSession, const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields, const Array< OneD, Array< OneD, NekDouble > > &pTraceNormals, const Array< OneD, Array< OneD, NekDouble > > &pGridVelocity, const int pSpaceDim, const int bcRegion, const int cnt)
Constructor.
Definition: CFSBndCond.cpp:47

◆ ~ExtrapOrder0BC()

Nektar::ExtrapOrder0BC::~ExtrapOrder0BC ( void  )
inlineoverrideprivate

Definition at line 82 of file ExtrapOrder0BC.h.

82{};

Member Function Documentation

◆ create()

static CFSBndCondSharedPtr Nektar::ExtrapOrder0BC::create ( const LibUtilities::SessionReaderSharedPtr pSession,
const Array< OneD, MultiRegions::ExpListSharedPtr > &  pFields,
const Array< OneD, Array< OneD, NekDouble > > &  pTraceNormals,
const Array< OneD, Array< OneD, NekDouble > > &  pGridVelocity,
const int  pSpaceDim,
const int  bcRegion,
const int  cnt 
)
inlinestatic

Creates an instance of this class.

Definition at line 53 of file ExtrapOrder0BC.h.

59 {
62 pSession, pFields, pTraceNormals, pGridVelocity, pSpaceDim,
63 bcRegion, cnt);
64 return p;
65 }
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
std::shared_ptr< CFSBndCond > CFSBndCondSharedPtr
A shared pointer to a boundary condition object.
Definition: CFSBndCond.h:51

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

◆ v_Apply()

void Nektar::ExtrapOrder0BC::v_Apply ( Array< OneD, Array< OneD, NekDouble > > &  Fwd,
Array< OneD, Array< OneD, NekDouble > > &  physarray,
const NekDouble time 
)
overrideprotectedvirtual

Implements Nektar::CFSBndCond.

Definition at line 58 of file ExtrapOrder0BC.cpp.

61{
62 int i, j;
63 int e, pnt;
64 int id1, id2, nBCEdgePts;
65 int nVariables = physarray.size();
66 int nDimensions = m_spacedim;
67
68 const Array<OneD, const int> &traceBndMap = m_fields[0]->GetTraceBndMap();
69
70 int eMax;
71
72 eMax = m_fields[0]->GetBndCondExpansions()[m_bcRegion]->GetExpSize();
73
74 // Loop on m_bcRegions
75 for (e = 0; e < eMax; ++e)
76 {
77 nBCEdgePts = m_fields[0]
78 ->GetBndCondExpansions()[m_bcRegion]
79 ->GetExp(e)
80 ->GetTotPoints();
81 id1 =
82 m_fields[0]->GetBndCondExpansions()[m_bcRegion]->GetPhys_Offset(e);
83 id2 =
84 m_fields[0]->GetTrace()->GetPhys_Offset(traceBndMap[m_offset + e]);
85
86 // Loop on points of m_bcRegion 'e'
87 for (i = 0; i < nBCEdgePts; i++)
88 {
89 pnt = id2 + i;
90
91 // Setting up bcs for density and velocities
92 for (j = 0; j <= nDimensions; ++j)
93 {
94 (m_fields[j]
95 ->GetBndCondExpansions()[m_bcRegion]
96 ->UpdatePhys())[id1 + i] = Fwd[j][pnt];
97 }
98
99 // Setting up bcs for energy
100 (m_fields[nVariables - 1]
101 ->GetBndCondExpansions()[m_bcRegion]
102 ->UpdatePhys())[id1 + i] = Fwd[nVariables - 1][pnt];
103 }
104 }
105}
int m_spacedim
Space dimension.
Definition: CFSBndCond.h:98
int m_bcRegion
Id of the boundary region.
Definition: CFSBndCond.h:113
int m_offset
Offset.
Definition: CFSBndCond.h:115
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array of fields.
Definition: CFSBndCond.h:92

References Nektar::CFSBndCond::m_bcRegion, Nektar::CFSBndCond::m_fields, Nektar::CFSBndCond::m_offset, and Nektar::CFSBndCond::m_spacedim.

Friends And Related Function Documentation

◆ MemoryManager< ExtrapOrder0BC >

friend class MemoryManager< ExtrapOrder0BC >
friend

Definition at line 1 of file ExtrapOrder0BC.h.

Member Data Documentation

◆ className

std::string Nektar::ExtrapOrder0BC::className
static
Initial value:
=
"ExtrapOrder0", ExtrapOrder0BC::create,
"Extrapolation of order 0 boundary condition.")
static CFSBndCondSharedPtr create(const LibUtilities::SessionReaderSharedPtr &pSession, const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields, const Array< OneD, Array< OneD, NekDouble > > &pTraceNormals, const Array< OneD, Array< OneD, NekDouble > > &pGridVelocity, const int pSpaceDim, const int bcRegion, const int cnt)
Creates an instance of this class.
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, std::string pDesc="")
Register a class with the factory.
CFSBndCondFactory & GetCFSBndCondFactory()
Declaration of the boundary condition factory singleton.
Definition: CFSBndCond.cpp:41

Name of the class.

Definition at line 68 of file ExtrapOrder0BC.h.