36#include <boost/core/ignore_unused.hpp>
56 const NekDouble lhom_z,
const bool useFFT,
const bool dealiasing,
59 lhom_z, useFFT, dealiasing)
64 "Size of basis number of points and number of lines are "
67 for (n = 0; n < points.size(); ++n)
70 (*m_exp).push_back(points[n]->
GetExp(0));
82 for (
int n = 0; n <
m_lines.size(); ++n)
100 int ncoeffs_per_line =
m_lines[0]->GetNcoeffs();
101 int npoints_per_line =
m_lines[0]->GetTotPoints();
112 int nel =
m_lines[0]->GetExpSize();
117 for (cnt = n = 0; n < nyzlines; ++n)
119 m_lines[n]->SetCoeffsArray(tmparray =
m_coeffs + ncoeffs_per_line * n);
120 m_lines[n]->SetPhysArray(tmparray =
m_phys + npoints_per_line * n);
122 for (i = 0; i < nel; ++i)
125 m_lines[n]->GetCoeff_Offset(i) + n * ncoeffs_per_line;
127 m_lines[n]->GetPhys_Offset(i) + n * npoints_per_line;
137 boost::ignore_unused(eid);
161 for (m = 0; m < nzlines; ++m)
163 for (j = 0; j < nylines; ++j)
165 for (n = 0; n < npoints; ++n)
168 tmp_xc = xc0 + n + (j * npoints) +
169 (m * npoints * nylines),
172 tmp_xc = xc1 + n + (j * npoints) +
173 (m * npoints * nylines),
176 tmp_xc = xc2 + n + (j * npoints) +
177 (m * npoints * nylines),
256 for (m = 0; m < nzlines; ++m)
258 for (j = 0; j < nylines; ++j)
260 for (n = 0; n < npoints; ++n)
263 tmp_xc = xc0 + n + (j * npoints) +
264 (m * npoints * nylines),
267 tmp_xc = xc1 + n + (j * npoints) +
268 (m * npoints * nylines),
271 tmp_xc = xc2 + n + (j * npoints) +
272 (m * npoints * nylines),
296 coords[1] = coords[0] + nquad0 * nquad1 * nquad2;
297 coords[2] = coords[1] + nquad0 * nquad1 * nquad2;
299 GetCoords(expansion, coords[0], coords[1], coords[2]);
301 outfile <<
"Zone, I=" << nquad1 <<
", J=" << nquad0 * nquad2 <<
", F=Block"
304 for (j = 0; j < nquad1; ++j)
306 for (i = 0; i < nquad2 *
GetCoordim(0) + 1; ++i)
308 outfile << coords[j][i] <<
" ";
310 outfile << std::endl;
315 int expansion,
int istrip)
317 boost::ignore_unused(istrip);
325 int ntot = nquad0 * nquad1 * nquad2;
326 int ntotminus = (nquad0) * (nquad1 - 1) * (nquad2 - 1);
332 GetCoords(expansion, coords[0], coords[1], coords[2]);
334 outfile <<
" <Piece NumberOfPoints=\"" << ntot <<
"\" NumberOfCells=\""
335 << ntotminus <<
"\">" << endl;
336 outfile <<
" <Points>" << endl;
337 outfile <<
" <DataArray type=\"Float32\" "
338 <<
"NumberOfComponents=\"3\" format=\"ascii\">" << endl;
340 for (i = 0; i < ntot; ++i)
342 for (j = 0; j < 3; ++j)
344 outfile << coords[j][i] <<
" ";
349 outfile <<
" </DataArray>" << endl;
350 outfile <<
" </Points>" << endl;
351 outfile <<
" <Cells>" << endl;
352 outfile <<
" <DataArray type=\"Int32\" "
353 <<
"Name=\"connectivity\" format=\"ascii\">" << endl;
354 for (i = 0; i < nquad0; ++i)
356 for (j = 0; j < nquad1 - 1; ++j)
358 outfile << j * nquad0 + i <<
" " << j * nquad0 + i + 1 <<
" "
359 << (j + 1) * nquad0 + i + 1 <<
" " << (j + 1) * nquad0 + i
364 outfile <<
" </DataArray>" << endl;
365 outfile <<
" <DataArray type=\"Int32\" "
366 <<
"Name=\"offsets\" format=\"ascii\">" << endl;
367 for (i = 0; i < ntotminus; ++i)
369 outfile << i * 4 + 4 <<
" ";
372 outfile <<
" </DataArray>" << endl;
373 outfile <<
" <DataArray type=\"UInt8\" "
374 <<
"Name=\"types\" format=\"ascii\">" << endl;
375 for (i = 0; i < ntotminus; ++i)
380 outfile <<
" </DataArray>" << endl;
381 outfile <<
" </Cells>" << endl;
382 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...
void SetCoeffPhys(void)
Definition of the total number of degrees of freedom and quadrature points. Sets up the storage for m...
virtual ~ExpList2DHomogeneous2D()
Destructor.
virtual void v_FwdTransBndConstrained(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
virtual void v_WriteTecplotZone(std::ostream &outfile, int expansion) override
virtual void v_FwdTransLocalElmt(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
virtual void v_GetCoords(Array< OneD, NekDouble > &coord_0, Array< OneD, NekDouble > &coord_1, Array< OneD, NekDouble > &coord_2) override
virtual void v_WriteVtkPieceHeader(std::ostream &outfile, int expansion, int istrip) override
ExpList2DHomogeneous2D()
Default constructor.
virtual void v_FwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
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.
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 .
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.
void HomogeneousFwdTrans(const int npts, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool Shuff=true, bool UnShuff=true)
int GetCoordim(int eid)
This function returns the dimension of the coordinates of the element eid.
std::shared_ptr< SessionReader > SessionReaderSharedPtr
std::vector< double > z(NPUPPER)
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 scalar y = alpha + x.
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)