36 #include <boost/core/ignore_unused.hpp> 44 namespace MultiRegions
49 m_bndCondExpansions(),
61 const bool dealiasing,
74 if(DeclareLinesSetCoeffPhys)
78 for(
int n = 0; n <
m_lines.num_elements(); ++n)
94 const bool dealiasing,
96 const std::string &variable,
110 nel =
m_lines[0]->GetExpSize();
112 for(i = 0; i < nel; ++i)
120 for(n = 1; n < nylines*nzlines; ++n)
123 for(i = 0; i < nel; ++i)
125 (*m_exp).push_back((*
m_exp)[i]);
156 int nlines =
m_lines.num_elements();
160 int nbnd = bregions.size();
169 for(i = 0; i < nbnd; ++i)
171 for(n = 0; n < nlines; ++n)
173 LinesBndCondExp[n] =
m_lines[n]->UpdateBndCondExpansion(i);
185 const std::string varName)
191 for (n = 0; n <
m_nz; ++n)
193 for (m = 0; m <
m_ny; ++m)
196 time, varName, 0.5*
m_lhom_y*(1.0+y[m]),
221 const bool PhysSpaceForcing)
246 for(n = 0; n < nhom_modes_z; ++n)
248 for(m = 0; m < nhom_modes_y; ++m)
252 new_factors = factors;
254 beta_y*beta_y + beta_z*beta_z;
256 wfce = (PhysSpaceForcing)? fce+cnt:fce+cnt1;
258 e_out = outarray + cnt1,
260 varcoeff, varfactors,dirForcing,
263 cnt +=
m_lines[n]->GetTotPoints();
264 cnt1 +=
m_lines[n]->GetNcoeffs();
271 const std::string varName,
275 boost::ignore_unused(x2_in, x3_in);
306 m_lines[0]->GetBoundaryToElmtMap(ElmtID_tmp,EdgeID_tmp);
307 int nel_per_lines =
m_lines[0]->GetExpSize();
308 int nlines =
m_lines.num_elements();
310 int MapSize = ElmtID_tmp.num_elements();
321 ->GetBndCondExpansions()[n]
323 for (i = 0; i < lineExpSize ; ++i, ++cntLine)
325 for(j = 0; j < nlines; j++)
328 ElmtID_tmp[cntLine]+j*nel_per_lines;
329 m_BCtoEdgMap[cnt+i+j*lineExpSize] =
342 std::shared_ptr<ExpList> &result,
343 const bool DeclareCoeffPhysArrays)
346 int offsetOld, offsetNew;
348 std::vector<unsigned int> eIDs;
353 for (cnt = n = 0; n < i; ++n)
361 eIDs.push_back(ElmtID[cnt+n]);
370 if ( DeclareCoeffPhysArrays)
373 for (n = 0; n < result->GetExpSize(); ++n)
375 nq =
GetExp(ElmtID[cnt+n])->GetTotPoints();
377 offsetNew = result->GetPhys_Offset(n);
379 tmp2 = result->UpdatePhys()+ offsetNew, 1);
381 nq =
GetExp(ElmtID[cnt+n])->GetNcoeffs();
383 offsetNew = result->GetCoeff_Offset(n);
385 tmp2 = result->UpdateCoeffs()+ offsetNew, 1);
const Array< OneD, const NekDouble > & GetPhys() const
This function returns (a reference to) the array (implemented as m_phys) containing the function ev...
Array< OneD, SpatialDomains::BoundaryConditionShPtr > m_bndConditions
Array< OneD, SpatialDomains::BoundaryConditionShPtr > & UpdateBndConditions()
void HomogeneousFwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate=eLocal, bool Shuff=true, bool UnShuff=true)
std::shared_ptr< MeshGraph > MeshGraphSharedPtr
void EvaluateBoundaryConditions(const NekDouble time=0.0, const std::string varName="")
Array< OneD, int > m_BCtoEdgMap
std::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
const Array< OneD, const MultiRegions::ExpListSharedPtr > & GetBndCondExpansions()
NekOptimize::GlobalOptParamSharedPtr m_globalOptParam
virtual const Array< OneD, const SpatialDomains::BoundaryConditionShPtr > & v_GetBndConditions()
Array< OneD, NekDouble > & UpdateCoeffs()
This function returns (a reference to) the array (implemented as m_coeffs) containing all local expa...
virtual const Array< OneD, const std::shared_ptr< ExpList > > & v_GetBndCondExpansions(void)
const Array< OneD, const NekDouble > & GetCoeffs() const
This function returns (a reference to) the array (implemented as m_coeffs) containing all local expa...
virtual Array< OneD, SpatialDomains::BoundaryConditionShPtr > & v_UpdateBndConditions()
void SetupBoundaryConditions(const LibUtilities::BasisKey &HomoBasis_y, const LibUtilities::BasisKey &HomoBasis_z, const NekDouble lhom_y, const NekDouble lhom_z, SpatialDomains::BoundaryConditions &bcs)
std::map< ConstFactorType, NekDouble > ConstFactorMap
NekDouble m_lhom_z
Width of homogeneous direction z.
Array< OneD, MultiRegions::ExpListSharedPtr > m_bndCondExpansions
int GetExpSize(void)
This function returns the number of elements in the expansion.
const std::shared_ptr< LocalRegions::ExpansionVector > GetExp() const
This function returns the vector of elements in the expansion.
bool GetWaveSpace(void) const
This function returns the third direction expansion condition, which can be in wave space (coefficien...
Array< OneD, ExpListSharedPtr > m_lines
Vector of ExpList, will be filled with ExpList1D.
Array< OneD, int > m_BCtoElmMap
Storage space for the boundary to element and boundary to trace map. This member variable is really a...
std::shared_ptr< ExpList > & UpdateBndCondExpansion(int i)
LibUtilities::BasisSharedPtr m_homogeneousBasis_z
Base expansion in z direction.
virtual void v_EvaluateBoundaryConditions(const NekDouble time=0.0, const std::string varName="", const NekDouble x2_in=NekConstants::kNekUnsetDouble, const NekDouble x3_in=NekConstants::kNekUnsetDouble)
std::map< StdRegions::VarCoeffType, Array< OneD, NekDouble > > VarCoeffMap
void SetCoeffPhys(void)
Definition of the total number of degrees of freedom and quadrature points. Sets up the storage for m...
NekDouble m_lhom_y
Width of homogeneous direction y.
std::map< int, BoundaryRegionShPtr > BoundaryRegionCollection
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
This class is the abstraction of a global discontinuous two- dimensional spectral/hp element expansio...
virtual void v_HelmSolve(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const FlagList &flags, const StdRegions::ConstFactorMap &factors, const StdRegions::VarCoeffMap &varcoeff, const MultiRegions::VarFactorsMap &varfactors, const Array< OneD, const NekDouble > &dirForcing, const bool PhysSpaceForcing)
LibUtilities::SessionReaderSharedPtr m_session
Session.
const Array< OneD, const SpatialDomains::BoundaryConditionShPtr > & GetBndConditions()
int m_ny
Number of modes = number of poitns in y direction.
LibUtilities::BasisSharedPtr m_homogeneousBasis_y
Definition of the total number of degrees of freedom and quadrature points. Sets up the storage for m...
int m_nz
Number of modes = number of poitns in z direction.
std::shared_ptr< DisContField1D > DisContField1DSharedPtr
virtual std::shared_ptr< ExpList > & v_UpdateBndCondExpansion(int i)
void GetBoundaryToElmtMap(Array< OneD, int > &ElmtID, Array< OneD, int > &EdgeID)
Set up a list of element ids and edge ids the link to the boundary conditions.
virtual void v_GetBndElmtExpansion(int i, std::shared_ptr< ExpList > &result, const bool DeclareCoeffPhysArrays)
bool m_useFFT
FFT variables.
int GetCoeff_Offset(int n) const
Get the start offset position for a global list of m_coeffs correspoinding to element n...
int GetPhys_Offset(int n) const
Get the start offset position for a global list of m_phys correspoinding to element n...
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Abstraction of a one-dimensional multi-elemental expansion which is merely a collection of local expa...
Describes the specification for a Basis.
std::shared_ptr< SessionReader > SessionReaderSharedPtr
const BoundaryRegionCollection & GetBoundaryRegions(void) const
DisContField3DHomogeneous2D()
virtual ~DisContField3DHomogeneous2D()
Destructor.
std::map< StdRegions::ConstFactorType, Array< OneD, NekDouble > > VarFactorsMap