48 namespace LibUtilities
54 bool isVertex(
int i,
int j,
int npts){
55 return (i==0 && j==0) || (i==(npts-1) && j==0) || (i==0 && j==(npts-1));
58 bool isEdge(
int i,
int j,
int npts){
59 return i==0 || j==0 || i+j==npts-1;
62 bool isEdge_1(
int i,
int j,
int npts){
66 bool isEdge_2(
int i,
int j,
int npts){
80 for(
int i=0, index=0; i<
npts; ++i){
81 for(
int j=0; j<npts-i; ++j,++index){
123 for(
int i = 0; i < rows; ++i ) {
124 for(
int j = 0; j < cols; ++j ) {
125 interp[j + i*cols] = interMat(i,j);
152 returnval->Initialize();
165 vector<int> interiorPoints;
169 for(
int i=0, index=0; i<
npts; ++i){
170 for(
int j=0; j<npts-i; ++j,++index){
172 if( isVertex(i,j,npts) ) {
174 vertex.push_back(index);
176 }
else if( isEdge(i,j,npts) ) {
178 if(isEdge_1(i,j,npts)){
180 iEdge_1.push_back(index);
182 }
else if(isEdge_2(i,j,npts)){
184 iEdge_2.push_back(index);
189 iEdge_3.insert(iEdge_3.begin(), index);
194 interiorPoints.push_back(index);
201 for(
unsigned int k=0; k<vertex.size(); ++k){
203 map.push_back(vertex[k]);
206 for(
unsigned int k=0; k<iEdge_1.size(); ++k){
208 map.push_back(iEdge_1[k]);
211 for(
unsigned int k=0; k<iEdge_2.size(); ++k){
213 map.push_back(iEdge_2[k]);
216 for(
unsigned int k=0; k<iEdge_3.size(); ++k){
218 map.push_back(iEdge_3[k]);
221 for(
unsigned int k=0; k<interiorPoints.size(); ++k){
223 map.push_back(interiorPoints[k]);
230 for(
unsigned int index=0; index<map.size(); ++index){
231 points[0][index] =
m_points[0][index];
232 points[1][index] =
m_points[1][index];
235 for(
unsigned int index=0; index<map.size(); ++index){
236 m_points[0][index] = points[0][map[index]];
237 m_points[1][index] = points[1][map[index]];
virtual void CalculatePoints()
General purpose memory allocation routines with the ability to allocate from thread specific memory p...
MatrixSharedPtrType m_derivmatrix[3]
Array< OneD, DataType > m_points[3]
void CalculateInterpMatrix(const Array< OneD, const NekDouble > &xi, const Array< OneD, const NekDouble > &yi, Array< OneD, NekDouble > &interp)
NekVector< NekDouble > MakeQuadratureWeights(const NekVector< NekDouble > &x, const NekVector< NekDouble > &y)
unsigned int GetNumPoints() const
Points< NekDouble >::MatrixSharedPtrType GetXDerivativeMatrix(const NekVector< NekDouble > &x, const NekVector< NekDouble > &y, const NekVector< NekDouble > &xi, const NekVector< NekDouble > &yi)
Array< OneD, DataType > m_weights
Defines a specification for a set of points.
virtual void CalculateDerivMatrix()
unsigned int GetRows() const
void CalculateDerivMatrix()
NekMatrix< NekDouble > GetInterpolationMatrix(const NekVector< NekDouble > &x, const NekVector< NekDouble > &y, const NekVector< NekDouble > &xi, const NekVector< NekDouble > &yi)
void NodalPointReorder2d()
unsigned int GetTotNumPoints() const
Points< NekDouble >::MatrixSharedPtrType GetYDerivativeMatrix(const NekVector< NekDouble > &x, const NekVector< NekDouble > &y, const NekVector< NekDouble > &xi, const NekVector< NekDouble > &yi)
static boost::shared_ptr< PointsBaseType > Create(const PointsKey &key)
Array< OneD, DataType > & GetPtr()
virtual void CalculateWeights()