36 #include <boost/core/ignore_unused.hpp>
44 namespace MultiRegions
47 ExpList1DHomogeneous2D::ExpList1DHomogeneous2D():
59 const bool dealiasing,
66 "Size of basis number of points and number of lines are "
69 for(n = 0; n < points.size(); ++n)
72 (*m_exp).push_back(points[n]->
GetExp(0));
84 for(
int n = 0; n <
m_lines.size(); ++n)
102 int ncoeffs_per_line =
m_lines[0]->GetNcoeffs();
103 int npoints_per_line =
m_lines[0]->GetTotPoints();
114 int nel =
m_lines[0]->GetExpSize();
119 for(cnt = n = 0; n < nyzlines; ++n)
122 m_lines[n]->SetPhysArray(tmparray =
m_phys + npoints_per_line*n);
124 for(i = 0; i < nel; ++i)
137 boost::ignore_unused(eid);
162 for(m = 0; m < nzlines; ++m)
164 for(j = 0; j < nylines; ++j)
166 for(n = 0; n < npoints; ++n)
168 Vmath::Fill(1,x[n],tmp_xc = xc0 + n +(j*npoints) + (m*npoints*nylines), 1);
169 Vmath::Fill(1,y[j],tmp_xc = xc1 + n +(j*npoints) + (m*npoints*nylines), 1);
170 Vmath::Fill(1,z[m],tmp_xc = xc2 + n +(j*npoints) + (m*npoints*nylines), 1);
221 for(m = 0; m < nzlines; ++m)
223 for(j = 0; j < nylines; ++j)
225 for(n = 0; n < npoints; ++n)
227 Vmath::Fill(1,x[n],tmp_xc = xc0 + n +(j*npoints) + (m*npoints*nylines), 1);
228 Vmath::Fill(1,y[j],tmp_xc = xc1 + n +(j*npoints) + (m*npoints*nylines), 1);
229 Vmath::Fill(1,z[m],tmp_xc = xc2 + n +(j*npoints) + (m*npoints*nylines), 1);
265 coords[1] = coords[0] + nquad0*nquad1*nquad2;
266 coords[2] = coords[1] + nquad0*nquad1*nquad2;
268 GetCoords(expansion,coords[0],coords[1],coords[2]);
270 outfile <<
"Zone, I=" << nquad1 <<
", J=" << nquad0*nquad2
271 <<
", F=Block" << std::endl;
273 for(j = 0; j < nquad1; ++j)
277 outfile << coords[j][i] <<
" ";
279 outfile << std::endl;
286 boost::ignore_unused(istrip);
294 int ntot = nquad0*nquad1*nquad2;
295 int ntotminus = (nquad0)*(nquad1-1)*(nquad2-1);
301 GetCoords(expansion,coords[0],coords[1],coords[2]);
303 outfile <<
" <Piece NumberOfPoints=\""
304 << ntot <<
"\" NumberOfCells=\""
305 << ntotminus <<
"\">" << endl;
306 outfile <<
" <Points>" << endl;
307 outfile <<
" <DataArray type=\"Float32\" "
308 <<
"NumberOfComponents=\"3\" format=\"ascii\">" << endl;
310 for (i = 0; i < ntot; ++i)
312 for (j = 0; j < 3; ++j)
314 outfile << coords[j][i] <<
" ";
319 outfile <<
" </DataArray>" << endl;
320 outfile <<
" </Points>" << endl;
321 outfile <<
" <Cells>" << endl;
322 outfile <<
" <DataArray type=\"Int32\" "
323 <<
"Name=\"connectivity\" format=\"ascii\">" << endl;
324 for (i = 0; i < nquad0; ++i)
326 for (j = 0; j < nquad1-1; ++j)
328 outfile << j*nquad0 + i <<
" "
329 << j*nquad0 + i + 1 <<
" "
330 << (j+1)*nquad0 + i + 1 <<
" "
331 << (j+1)*nquad0 + i << endl;
335 outfile <<
" </DataArray>" << endl;
336 outfile <<
" <DataArray type=\"Int32\" "
337 <<
"Name=\"offsets\" format=\"ascii\">" << endl;
338 for (i = 0; i < ntotminus; ++i)
340 outfile << i*4+4 <<
" ";
343 outfile <<
" </DataArray>" << endl;
344 outfile <<
" <DataArray type=\"UInt8\" "
345 <<
"Name=\"types\" format=\"ascii\">" << endl;
346 for (i = 0; i < ntotminus; ++i)
351 outfile <<
" </DataArray>" << endl;
352 outfile <<
" </Cells>" << endl;
353 outfile <<
" <PointData>" << endl;
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode....
Describes the specification for a Basis.
Abstraction of a one-dimensional multi-elemental expansion which is merely a collection of local expa...
virtual void v_WriteTecplotZone(std::ostream &outfile, int expansion)
ExpList1DHomogeneous2D()
Default constructor.
void GetCoords(Array< OneD, NekDouble > &coord_0, Array< OneD, NekDouble > &coord_1=NullNekDouble1DArray, Array< OneD, NekDouble > &coord_2=NullNekDouble1DArray)
This function calculates the coordinates of all the elemental quadrature points .
virtual ~ExpList1DHomogeneous2D()
Destructor.
virtual void v_WriteVtkPieceHeader(std::ostream &outfile, int expansion, int istrip)
virtual void v_GetCoords(Array< OneD, NekDouble > &coord_0, Array< OneD, NekDouble > &coord_1, Array< OneD, NekDouble > &coord_2)
void SetCoeffPhys(void)
Definition of the total number of degrees of freedom and quadrature points. Sets up the storage for m...
Abstraction of a two-dimensional multi-elemental expansion which is merely a collection of local expa...
int m_nz
Number of modes = number of poitns in z direction.
LibUtilities::BasisSharedPtr m_homogeneousBasis_y
Definition of the total number of degrees of freedom and quadrature points. Sets up the storage for m...
NekDouble m_lhom_z
Width of homogeneous direction z.
int m_ny
Number of modes = number of poitns in y direction.
Array< OneD, ExpListSharedPtr > m_lines
Vector of ExpList, will be filled with ExpList1D.
LibUtilities::BasisSharedPtr m_homogeneousBasis_z
Base expansion in z direction.
NekDouble m_lhom_y
Width of homogeneous direction y.
Array< OneD, NekDouble > m_coeffs
Concatenation of all local expansion coefficients.
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs.
int m_ncoeffs
The total number of local degrees of freedom. m_ncoeffs .
const std::shared_ptr< LocalRegions::ExpansionVector > GetExp() const
This function returns the vector of elements in the expansion.
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points.
int GetCoordim(int eid)
This function returns the dimension of the coordinates of the element eid.
std::shared_ptr< SessionReader > SessionReaderSharedPtr
The above copyright notice and this permission notice shall be included.
void Smul(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Scalar multiply y = alpha*x.
void Fill(int n, const T alpha, T *x, const int incx)
Fill a vector with a constant value.
void Sadd(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Add vector y = alpha - x.