42 namespace MultiRegions
49 ExpList0D::ExpList0D():
59 ExpList(In,DeclareCoeffPhysArrays)
76 (*m_exp).push_back(Point);
104 const bool DeclareCoeffPhysArrays)
109 int i, j, id, elmtid=0;
110 map<int,int> EdgeDone;
111 map<int,int> NormalSet;
118 for(i = 0; i < bndCond.num_elements(); ++i)
122 for(j = 0; j < bndConstraint[i]->GetExpSize(); ++j)
124 PointGeom = bndConstraint[i]->GetExp(0)->GetGeom()->GetVertex(0);
127 EdgeDone[PointGeom->GetVid()] = elmtid;
129 Point->SetElmtId(elmtid++);
130 (*m_exp).push_back(Point);
136 for(i = 0; i < locexp.size(); ++i)
138 for(j = 0; j < 2; ++j)
141 PointGeom = (exp->GetGeom1D())->GetVertex(j);
142 id = PointGeom->GetVid();
144 if(EdgeDone.count(
id)==0)
147 EdgeDone[id] = elmtid;
154 Point->SetElmtId(elmtid++);
155 (*m_exp).push_back(Point);
194 if(DeclareCoeffPhysArrays)
213 for(i = 0; i <
m_exp->size(); ++i)
217 m_offset_elmt_id[i] = i;
218 m_ncoeffs += (*m_exp)[i]->GetNcoeffs();
219 m_npoints += (*m_exp)[i]->GetTotPoints();
238 int i,j,k,e_npoints,offset;
242 int coordim = (*m_exp)[0]->GetGeom()->GetCoordim();
244 ASSERTL1(normals.num_elements() >= coordim,
245 "Output vector does not have sufficient dimensions to "
249 for(i = 0; i <
m_exp->size(); ++i)
257 locnormals = loc_elmt->GetVertexNormal(loc_exp->GetLeftAdjacentElementVertex());
263 for(j = 0; j < e_npoints; ++j)
267 for(k = 0; k < coordim; ++k)
269 normals[k][offset] = locnormals[k][0];
290 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)
virtual void v_GetNormals(Array< OneD, Array< OneD, NekDouble > > &normals)
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool.
NekOptimize::GlobalOptParamSharedPtr m_globalOptParam
Expansion1DSharedPtr GetLeftAdjacentElementExp() const
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.
boost::shared_ptr< Expansion0D > Expansion0DSharedPtr
void SetCoeffPhysOffsets(void)
std::vector< ExpansionSharedPtr > ExpansionVector
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs.
Base class for all multi-elemental spectral/hp expansions.
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
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 .
Array< OneD, int > m_offset_elmt_id
Array containing the element id m_offset_elmt_id[n] that the n^th consecutive block of data in m_coef...
boost::shared_ptr< PointExp > PointExpSharedPtr
std::map< int, std::vector< PeriodicEntity > > PeriodicMap
ExpList0D()
The defualt constructor.
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...
boost::shared_ptr< MeshGraph > MeshGraphSharedPtr
boost::shared_ptr< Expansion1D > Expansion1DSharedPtr
boost::shared_ptr< PointGeom > PointGeomSharedPtr