41 namespace MultiRegions
56 const bool dealiasing,
57 const Array<OneD, ExpListSharedPtr> &points):
64 ASSERTL1(nyz == points.num_elements(),
"Size of basis number of points and number of lines are not the same");
66 for(n = 0; n < points.num_elements(); ++n)
85 for(
int n = 0; n <
m_lines.num_elements(); ++n)
103 int ncoeffs_per_line =
m_lines[0]->GetNcoeffs();
104 int npoints_per_line =
m_lines[0]->GetTotPoints();
106 int nyzlines =
m_lines.num_elements();
115 int nel =
m_lines[0]->GetExpSize();
119 Array<OneD, NekDouble> tmparray;
121 for(cnt = n = 0; n < nyzlines; ++n)
124 m_lines[n]->SetPhysArray(tmparray = m_phys + npoints_per_line*n);
126 for(i = 0; i < nel; ++i)
129 m_phys_offset[cnt] =
m_lines[n]->GetPhys_Offset(i) + n*npoints_per_line;
130 m_offset_elmt_id[cnt++] =
m_lines[n]->GetOffset_Elmt_Id(i) + n*nel;
136 Array<OneD, NekDouble> &xc0,
137 Array<OneD, NekDouble> &xc1,
138 Array<OneD, NekDouble> &xc2)
141 Array<OneD, NekDouble> tmp_xc;
150 Array<OneD, NekDouble> x(npoints);
151 Array<OneD, NekDouble> y(nylines);
152 Array<OneD, NekDouble> z(nzlines);
163 for(m = 0; m < nzlines; ++m)
165 for(j = 0; j < nylines; ++j)
167 for(n = 0; n < npoints; ++n)
169 Vmath::Fill(1,x[n],tmp_xc = xc0 + n +(j*npoints) + (m*npoints*nylines), 1);
170 Vmath::Fill(1,y[j],tmp_xc = xc1 + n +(j*npoints) + (m*npoints*nylines), 1);
171 Vmath::Fill(1,z[m],tmp_xc = xc2 + n +(j*npoints) + (m*npoints*nylines), 1);
196 Array<OneD, NekDouble> &xc1,
197 Array<OneD, NekDouble> &xc2)
200 Array<OneD, NekDouble> tmp_xc;
210 Array<OneD, NekDouble> x(npoints);
211 Array<OneD, NekDouble> y(nylines);
212 Array<OneD, NekDouble> z(nzlines);
222 for(m = 0; m < nzlines; ++m)
224 for(j = 0; j < nylines; ++j)
226 for(n = 0; n < npoints; ++n)
228 Vmath::Fill(1,x[n],tmp_xc = xc0 + n +(j*npoints) + (m*npoints*nylines), 1);
229 Vmath::Fill(1,y[j],tmp_xc = xc1 + n +(j*npoints) + (m*npoints*nylines), 1);
230 Vmath::Fill(1,z[m],tmp_xc = xc2 + n +(j*npoints) + (m*npoints*nylines), 1);
263 Array<OneD,NekDouble> coords[3];
265 coords[0] = Array<OneD,NekDouble>(3*nquad0*nquad1*nquad2);
266 coords[1] = coords[0] + nquad0*nquad1*nquad2;
267 coords[2] = coords[1] + nquad0*nquad1*nquad2;
269 GetCoords(expansion,coords[0],coords[1],coords[2]);
271 outfile <<
"Zone, I=" << nquad1 <<
", J=" << nquad0*nquad2
272 <<
", F=Block" << std::endl;
274 for(j = 0; j < nquad1; ++j)
278 outfile << coords[j][i] <<
" ";
280 outfile << std::endl;
293 int ntot = nquad0*nquad1*nquad2;
294 int ntotminus = (nquad0)*(nquad1-1)*(nquad2-1);
296 Array<OneD,NekDouble> coords[3];
297 coords[0] = Array<OneD,NekDouble>(ntot);
298 coords[1] = Array<OneD,NekDouble>(ntot);
299 coords[2] = Array<OneD,NekDouble>(ntot);
300 GetCoords(expansion,coords[0],coords[1],coords[2]);
302 outfile <<
" <Piece NumberOfPoints=\""
303 << ntot <<
"\" NumberOfCells=\""
304 << ntotminus <<
"\">" << endl;
305 outfile <<
" <Points>" << endl;
306 outfile <<
" <DataArray type=\"Float32\" "
307 <<
"NumberOfComponents=\"3\" format=\"ascii\">" << endl;
309 for (i = 0; i < ntot; ++i)
311 for (j = 0; j < 3; ++j)
313 outfile << coords[j][i] <<
" ";
318 outfile <<
" </DataArray>" << endl;
319 outfile <<
" </Points>" << endl;
320 outfile <<
" <Cells>" << endl;
321 outfile <<
" <DataArray type=\"Int32\" "
322 <<
"Name=\"connectivity\" format=\"ascii\">" << endl;
323 for (i = 0; i < nquad0; ++i)
325 for (j = 0; j < nquad1-1; ++j)
327 outfile << j*nquad0 + i <<
" "
328 << j*nquad0 + i + 1 <<
" "
329 << (j+1)*nquad0 + i + 1 <<
" "
330 << (j+1)*nquad0 + i << endl;
334 outfile <<
" </DataArray>" << endl;
335 outfile <<
" <DataArray type=\"Int32\" "
336 <<
"Name=\"offsets\" format=\"ascii\">" << endl;
337 for (i = 0; i < ntotminus; ++i)
339 outfile << i*4+4 <<
" ";
342 outfile <<
" </DataArray>" << endl;
343 outfile <<
" <DataArray type=\"UInt8\" "
344 <<
"Name=\"types\" format=\"ascii\">" << endl;
345 for (i = 0; i < ntotminus; ++i)
350 outfile <<
" </DataArray>" << endl;
351 outfile <<
" </Cells>" << endl;
352 outfile <<
" <PointData>" << endl;