43 namespace MultiRegions
48 m_bndCondExpansions(),
59 const bool dealiasing):
61 m_bndCondExpansions(),
68 m_bndCondExpansions (In.m_bndCondExpansions),
69 m_bndConditions (In.m_bndConditions)
71 if(DeclareLinesSetCoeffPhys)
75 for(
int n = 0; n <
m_lines.num_elements(); ++n)
90 const bool dealiasing,
92 const std::string &variable):
94 m_bndCondExpansions(),
105 nel =
m_lines[0]->GetExpSize();
107 for(i = 0; i < nel; ++i)
115 for(n = 1; n < nylines*nzlines; ++n)
118 for(i = 0; i < nel; ++i)
120 (*m_exp).push_back((*
m_exp)[i]);
151 int nlines =
m_lines.num_elements();
155 int nbnd = bregions.size();
164 for(i = 0; i < nbnd; ++i)
166 for(n = 0; n < nlines; ++n)
168 LinesBndCondExp[n] =
m_lines[n]->UpdateBndCondExpansion(i);
180 const std::string varName)
186 for (n = 0; n <
m_nz; ++n)
188 for (m = 0; m <
m_ny; ++m)
191 time, varName, 0.5*
m_lhom_y*(1.0+y[m]),
215 const bool PhysSpaceForcing)
240 for(n = 0; n < nhom_modes_z; ++n)
242 for(m = 0; m < nhom_modes_y; ++m)
246 new_factors = factors;
248 beta_y*beta_y + beta_z*beta_z;
250 wfce = (PhysSpaceForcing)? fce+cnt:fce+cnt1;
252 e_out = outarray + cnt1,
254 varcoeff, dirForcing,
257 cnt +=
m_lines[n]->GetTotPoints();
258 cnt1 +=
m_lines[n]->GetNcoeffs();
265 const std::string varName,
299 m_lines[0]->GetBoundaryToElmtMap(ElmtID_tmp,EdgeID_tmp);
300 int nel_per_lines =
m_lines[0]->GetExpSize();
301 int nlines =
m_lines.num_elements();
303 int MapSize = ElmtID_tmp.num_elements();
314 ->GetBndCondExpansions()[n]
316 for (i = 0; i < lineExpSize ; ++i, ++cntLine)
318 for(j = 0; j < nlines; j++)
321 ElmtID_tmp[cntLine]+j*nel_per_lines;
322 m_BCtoEdgMap[cnt+i+j*lineExpSize] =
335 boost::shared_ptr<ExpList> &result,
336 const bool DeclareCoeffPhysArrays)
339 int offsetOld, offsetNew;
341 std::vector<unsigned int> eIDs;
346 for (cnt = n = 0; n < i; ++n)
354 eIDs.push_back(ElmtID[cnt+n]);
363 if ( DeclareCoeffPhysArrays)
366 for (n = 0; n < result->GetExpSize(); ++n)
368 nq =
GetExp(ElmtID[cnt+n])->GetTotPoints();
370 offsetNew = result->GetPhys_Offset(n);
372 tmp2 = result->UpdatePhys()+ offsetNew, 1);
374 nq =
GetExp(ElmtID[cnt+n])->GetNcoeffs();
376 offsetNew = result->GetCoeff_Offset(n);
378 tmp2 = result->UpdateCoeffs()+ offsetNew, 1);
Array< OneD, SpatialDomains::BoundaryConditionShPtr > m_bndConditions
const Array< OneD, const NekDouble > & GetCoeffs() const
This function returns (a reference to) the array (implemented as m_coeffs) containing all local expa...
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)
void EvaluateBoundaryConditions(const NekDouble time=0.0, const std::string varName="")
Array< OneD, int > m_BCtoEdgMap
int GetCoeff_Offset(int n) const
Get the start offset position for a global list of m_coeffs correspoinding to element n...
const Array< OneD, const MultiRegions::ExpListSharedPtr > & GetBndCondExpansions()
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool.
NekOptimize::GlobalOptParamSharedPtr m_globalOptParam
virtual const Array< OneD, const SpatialDomains::BoundaryConditionShPtr > & v_GetBndConditions()
int GetPhys_Offset(int n) const
Get the start offset position for a global list of m_phys correspoinding to element n...
Array< OneD, NekDouble > & UpdateCoeffs()
This function returns (a reference to) the array (implemented as m_coeffs) containing all local expa...
virtual Array< OneD, SpatialDomains::BoundaryConditionShPtr > & v_UpdateBndConditions()
const boost::shared_ptr< LocalRegions::ExpansionVector > GetExp() const
This function returns the vector of elements in the expansion.
virtual boost::shared_ptr< ExpList > & v_UpdateBndCondExpansion(int i)
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.
boost::shared_ptr< SessionReader > SessionReaderSharedPtr
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 Array< OneD, const NekDouble > &dirForcing, const bool PhysSpaceForcing)
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...
boost::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)
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
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
This class is the abstraction of a global discontinuous two- dimensional spectral/hp element expansio...
LibUtilities::SessionReaderSharedPtr m_session
Session.
const Array< OneD, const SpatialDomains::BoundaryConditionShPtr > & GetBndConditions()
boost::shared_ptr< DisContField1D > DisContField1DSharedPtr
int m_ny
Number of modes = number of poitns in y direction.
virtual const Array< OneD, const boost::shared_ptr< ExpList > > & v_GetBndCondExpansions(void)
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.
const Array< OneD, const NekDouble > & GetPhys() const
This function returns (a reference to) the array (implemented as m_phys) containing the function ev...
virtual void v_GetBndElmtExpansion(int i, boost::shared_ptr< ExpList > &result, const bool DeclareCoeffPhysArrays)
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.
const BoundaryRegionCollection & GetBoundaryRegions(void) const
bool GetWaveSpace(void) const
This function returns the third direction expansion condition, which can be in wave space (coefficien...
bool m_useFFT
FFT variables.
boost::shared_ptr< MeshGraph > MeshGraphSharedPtr
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.
DisContField3DHomogeneous2D()
virtual ~DisContField3DHomogeneous2D()
Destructor.