35 #include <boost/core/ignore_unused.hpp> 43 namespace MultiRegions
50 ExpList0D::ExpList0D():
60 ExpList(In,DeclareCoeffPhysArrays)
77 (*m_exp).push_back(Point);
105 const bool DeclareCoeffPhysArrays)
108 boost::ignore_unused(graph1D, periodicVerts);
112 int i, j, id, elmtid=0;
113 map<int,int> EdgeDone;
114 map<int,int> NormalSet;
121 for(i = 0; i < bndCond.num_elements(); ++i)
125 for(j = 0; j < bndConstraint[i]->GetExpSize(); ++j)
127 PointGeom = bndConstraint[i]->GetExp(0)->GetGeom()->GetVertex(0);
130 EdgeDone[PointGeom->GetVid()] = elmtid;
132 Point->SetElmtId(elmtid++);
133 (*m_exp).push_back(Point);
139 for(i = 0; i < locexp.size(); ++i)
141 for(j = 0; j < 2; ++j)
144 PointGeom = (exp->GetGeom1D())->GetVertex(j);
145 id = PointGeom->GetVid();
147 if(EdgeDone.count(
id)==0)
150 EdgeDone[id] = elmtid;
157 Point->SetElmtId(elmtid++);
158 (*m_exp).push_back(Point);
197 if(DeclareCoeffPhysArrays)
220 int i,j,k,e_npoints,offset;
224 int coordim = (*m_exp)[0]->GetGeom()->GetCoordim();
226 ASSERTL1(normals.num_elements() >= coordim,
227 "Output vector does not have sufficient dimensions to " 231 for(i = 0; i <
m_exp->size(); ++i)
239 locnormals = loc_elmt->GetVertexNormal(loc_exp->GetLeftAdjacentElementVertex());
245 for(j = 0; j < e_npoints; ++j)
249 for(k = 0; k < coordim; ++k)
251 normals[k][offset] = locnormals[k][0];
272 for(
int j = 0; j < Fwd.num_elements(); ++j)
virtual void v_Upwind(const Array< OneD, const NekDouble > &Vn, const Array< OneD, const NekDouble > &Fwd, const Array< OneD, const NekDouble > &Bwd, Array< OneD, NekDouble > &Upwind)
std::shared_ptr< MeshGraph > MeshGraphSharedPtr
virtual void v_GetNormals(Array< OneD, Array< OneD, NekDouble > > &normals)
ExpList()
The default constructor.
std::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
NekOptimize::GlobalOptParamSharedPtr m_globalOptParam
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points.
Array< OneD, NekDouble > m_coeffs
Concatenation of all local expansion coefficients.
int GetExpSize(void)
This function returns the number of elements in the expansion.
std::vector< ExpansionSharedPtr > ExpansionVector
void Upwind(const Array< OneD, const Array< OneD, NekDouble > > &Vec, const Array< OneD, const NekDouble > &Fwd, const Array< OneD, const NekDouble > &Bwd, Array< OneD, NekDouble > &Upwind)
Base class for all multi-elemental spectral/hp expansions.
Expansion1DSharedPtr GetLeftAdjacentElementExp() const
std::shared_ptr< Expansion0D > Expansion0DSharedPtr
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
int m_ncoeffs
The total number of local degrees of freedom. m_ncoeffs .
void SetCoeffPhysOffsets()
Definition of the total number of degrees of freedom and quadrature points and offsets to access data...
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
std::shared_ptr< PointGeom > PointGeomSharedPtr
std::map< int, std::vector< PeriodicEntity > > PeriodicMap
ExpList0D()
The defualt constructor.
std::shared_ptr< PointExp > PointExpSharedPtr
This class is the abstraction of a collection of zero-dimensional expansions which is merely a collec...
virtual ~ExpList0D()
Destructor.
void SetExpType(ExpansionType Type)
Returns the type of the expansion.
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
std::shared_ptr< Expansion1D > Expansion1DSharedPtr