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){
113 const Array<OneD, const NekDouble>& yia,
114 Array<OneD, NekDouble>& interp)
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]);
227 Array<OneD,NekDouble> points[2];
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]];