Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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:
Inheritance graph
[legend]
Collaboration diagram for Nektar::ExtrapOrder0BC:
Collaboration graph
[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 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

virtual void v_Apply (Array< OneD, Array< OneD, NekDouble > > &Fwd, Array< OneD, Array< OneD, NekDouble > > &physarray, const NekDouble &time)
 
- 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 int pSpaceDim, const int bcRegion, const int cnt)
 Constructor. More...
 

Private Member Functions

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

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...
 
- Protected Attributes inherited from Nektar::CFSBndCond
LibUtilities::SessionReaderSharedPtr m_session
 Session reader. More...
 
Array< OneD,
MultiRegions::ExpListSharedPtr
m_fields
 Array of fields. More...
 
Array< OneD, Array< OneD,
NekDouble > > 
m_traceNormals
 Trace normals. More...
 
int m_spacedim
 Space dimension. More...
 
VariableConverterSharedPtr m_varConv
 Auxiliary object to convert variables. More...
 
NekDouble m_gamma
 Parameters of the flow. More...
 
NekDouble m_rhoInf
 
NekDouble m_pInf
 
Array< OneD, NekDoublem_velInf
 
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 49 of file ExtrapOrder0BC.h.

Constructor & Destructor Documentation

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

Definition at line 48 of file ExtrapOrder0BC.cpp.

54  : CFSBndCond(pSession, pFields, pTraceNormals, pSpaceDim, bcRegion, cnt)
55 {
56 }
CFSBndCond(const LibUtilities::SessionReaderSharedPtr &pSession, const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields, const Array< OneD, Array< OneD, NekDouble > > &pTraceNormals, const int pSpaceDim, const int bcRegion, const int cnt)
Constructor.
Definition: CFSBndCond.cpp:51
virtual Nektar::ExtrapOrder0BC::~ExtrapOrder0BC ( void  )
inlineprivatevirtual

Definition at line 86 of file ExtrapOrder0BC.h.

86 {};

Member Function Documentation

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

Creates an instance of this class.

Definition at line 56 of file ExtrapOrder0BC.h.

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

61  {
63  AllocateSharedPtr(pSession, pFields,
64  pTraceNormals, pSpaceDim, bcRegion, cnt);
65  return p;
66  }
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool.
boost::shared_ptr< CFSBndCond > CFSBndCondSharedPtr
A shared pointer to a boundary condition object.
Definition: CFSBndCond.h:49
void Nektar::ExtrapOrder0BC::v_Apply ( Array< OneD, Array< OneD, NekDouble > > &  Fwd,
Array< OneD, Array< OneD, NekDouble > > &  physarray,
const NekDouble time 
)
protectedvirtual

Implements Nektar::CFSBndCond.

Definition at line 58 of file ExtrapOrder0BC.cpp.

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

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

Friends And Related Function Documentation

friend class MemoryManager< ExtrapOrder0BC >
friend

Definition at line 53 of file ExtrapOrder0BC.h.

Member Data Documentation

std::string Nektar::ExtrapOrder0BC::className
static
Initial value:
RegisterCreatorFunction("ExtrapOrder0",
"Extrapolation of order 0 boundary condition.")

Name of the class.

Definition at line 69 of file ExtrapOrder0BC.h.