52 const NekDouble lhom_z,
const bool useFFT,
const bool dealiasing,
55 lhom_z, useFFT, dealiasing)
60 "Size of basis number of points and number of lines are "
63 for (n = 0; n < points.size(); ++n)
66 (*m_exp).push_back(points[n]->
GetExp(0));
78 for (
int n = 0; n <
m_lines.size(); ++n)
96 int ncoeffs_per_line =
m_lines[0]->GetNcoeffs();
97 int npoints_per_line =
m_lines[0]->GetTotPoints();
108 int nel =
m_lines[0]->GetExpSize();
113 for (cnt = n = 0; n < nyzlines; ++n)
115 m_lines[n]->SetCoeffsArray(tmparray =
m_coeffs + ncoeffs_per_line * n);
116 m_lines[n]->SetPhysArray(tmparray =
m_phys + npoints_per_line * n);
118 for (i = 0; i < nel; ++i)
121 m_lines[n]->GetCoeff_Offset(i) + n * ncoeffs_per_line;
123 m_lines[n]->GetPhys_Offset(i) + n * npoints_per_line;
155 for (m = 0; m < nzlines; ++m)
157 for (j = 0; j < nylines; ++j)
159 for (n = 0; n < npoints; ++n)
162 tmp_xc = xc0 + n + (j * npoints) +
163 (m * npoints * nylines),
166 tmp_xc = xc1 + n + (j * npoints) +
167 (m * npoints * nylines),
170 tmp_xc = xc2 + n + (j * npoints) +
171 (m * npoints * nylines),
250 for (m = 0; m < nzlines; ++m)
252 for (j = 0; j < nylines; ++j)
254 for (n = 0; n < npoints; ++n)
257 tmp_xc = xc0 + n + (j * npoints) +
258 (m * npoints * nylines),
261 tmp_xc = xc1 + n + (j * npoints) +
262 (m * npoints * nylines),
265 tmp_xc = xc2 + n + (j * npoints) +
266 (m * npoints * nylines),
290 coords[1] = coords[0] + nquad0 * nquad1 * nquad2;
291 coords[2] = coords[1] + nquad0 * nquad1 * nquad2;
293 GetCoords(expansion, coords[0], coords[1], coords[2]);
295 outfile <<
"Zone, I=" << nquad1 <<
", J=" << nquad0 * nquad2 <<
", F=Block"
298 for (j = 0; j < nquad1; ++j)
300 for (i = 0; i < nquad2 *
GetCoordim(0) + 1; ++i)
302 outfile << coords[j][i] <<
" ";
304 outfile << std::endl;
310 [[maybe_unused]]
int istrip)
318 int ntot = nquad0 * nquad1 * nquad2;
319 int ntotminus = (nquad0) * (nquad1 - 1) * (nquad2 - 1);
325 GetCoords(expansion, coords[0], coords[1], coords[2]);
327 outfile <<
" <Piece NumberOfPoints=\"" << ntot <<
"\" NumberOfCells=\""
328 << ntotminus <<
"\">" << endl;
329 outfile <<
" <Points>" << endl;
330 outfile <<
" <DataArray type=\"Float32\" "
331 << R
"(NumberOfComponents="3" format="ascii">)" << endl;
333 for (i = 0; i < ntot; ++i)
335 for (j = 0; j < 3; ++j)
337 outfile << coords[j][i] <<
" ";
342 outfile <<
" </DataArray>" << endl;
343 outfile <<
" </Points>" << endl;
344 outfile <<
" <Cells>" << endl;
345 outfile <<
" <DataArray type=\"Int32\" "
346 << R
"(Name="connectivity" format="ascii">)" << endl;
347 for (i = 0; i < nquad0; ++i)
349 for (j = 0; j < nquad1 - 1; ++j)
351 outfile << j * nquad0 + i <<
" " << j * nquad0 + i + 1 <<
" "
352 << (j + 1) * nquad0 + i + 1 <<
" " << (j + 1) * nquad0 + i
357 outfile <<
" </DataArray>" << endl;
358 outfile <<
" <DataArray type=\"Int32\" "
359 << R
"(Name="offsets" format="ascii">)" << endl;
360 for (i = 0; i < ntotminus; ++i)
362 outfile << i * 4 + 4 <<
" ";
365 outfile <<
" </DataArray>" << endl;
366 outfile <<
" <DataArray type=\"UInt8\" "
367 << R
"(Name="types" format="ascii">)" << endl;
368 for (i = 0; i < ntotminus; ++i)
373 outfile <<
" </DataArray>" << endl;
374 outfile <<
" </Cells>" << endl;
375 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...
void v_FwdTransBndConstrained(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
void v_WriteTecplotZone(std::ostream &outfile, int expansion) override
void v_FwdTransLocalElmt(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
void v_GetCoords(Array< OneD, NekDouble > &coord_0, Array< OneD, NekDouble > &coord_1, Array< OneD, NekDouble > &coord_2) override
void v_WriteVtkPieceHeader(std::ostream &outfile, int expansion, int istrip) override
ExpList2DHomogeneous2D()
Default constructor.
~ExpList2DHomogeneous2D() override
Destructor.
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)
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.
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)