44 namespace MultiRegions
49 m_bndCondExpansions(),
59 const bool dealiasing)
61 m_bndCondExpansions(),
68 const bool DeclarePlanesSetCoeffPhys)
70 m_bndCondExpansions (In.m_bndCondExpansions),
71 m_bndConditions (In.m_bndConditions)
73 if (DeclarePlanesSetCoeffPhys)
78 for(
int n = 0; n <
m_planes.num_elements(); ++n)
94 const bool dealiasing,
96 const std::string &variable)
99 m_bndCondExpansions(),
115 for (i = 0; i < nel; ++i)
120 for (n = 1; n <
m_planes.num_elements(); ++n)
124 variable,
true,
false);
125 for(i = 0; i < nel; ++i)
127 (*m_exp).push_back((*
m_exp)[i]);
133 for (n = 0; n <
m_planes.num_elements(); ++n)
139 pSession, HomoBasis, lhom, useFFT, dealiasing, trace);
150 if(variable.compare(
"DefaultVar") != 0)
169 const std::string variable)
179 SpatialDomains::BoundaryRegionCollection::const_iterator it;
183 for (it = bregions.begin(); it != bregions.end(); ++it)
187 if (boundaryCondition->GetBoundaryConditionType()
198 int nplanes =
m_planes.num_elements();
200 PlanesBndCondExp(nplanes);
203 for (it = bregions.begin(); it != bregions.end(); ++it)
207 if(boundaryCondition->GetBoundaryConditionType() !=
210 for (n = 0; n < nplanes; ++n)
228 const std::string varName)
234 for (n = 0; n <
m_planes.num_elements(); n++)
239 for (n = 0; n <
m_planes.num_elements(); ++n)
241 m_planes[n]->EvaluateBoundaryConditions(
242 time, varName, 0.5*
m_lhom*(1.0+local_z[n]));
290 for (n = 0; n <
m_planes.num_elements(); ++n)
295 new_factors = factors;
301 e_out = outarray + cnt1,
302 flags, new_factors, varcoeff, dirForcing);
312 const std::string varName,
341 m_planes[0]->GetBoundaryToElmtMap(ElmtID_tmp, EdgeID_tmp);
342 int nel_per_plane =
m_planes[0]->GetExpSize();
343 int nplanes =
m_planes.num_elements();
345 int MapSize = ElmtID_tmp.num_elements();
353 for(
int i = 0; i < nplanes; i++)
355 for(
int j = 0; j < MapSize; j++)
357 ElmtID[j+i*MapSize] = ElmtID_tmp[j]+i*nel_per_plane;
358 EdgeID[j+i*MapSize] = EdgeID_tmp[j];
393 int exp_size, exp_size_per_plane, elmtID, boundaryID;
396 for (
int k = 0; k <
m_planes.num_elements(); k++)
401 exp_size_per_plane = exp_size/
m_planes.num_elements();
403 for (
int i = 0; i < exp_size_per_plane; i++)
410 GetExp(i+k*exp_size_per_plane)->GetTotPoints();
413 temp_BC_exp = boost::dynamic_pointer_cast<
416 i+k*exp_size_per_plane));
419 tmp_Tot = TotField + offset,
420 tmp_BC = BndVals + pos);
443 int exp_size, exp_size_per_plane, elmtID, Phys_offset, Coef_offset;
445 for(
int k = 0; k <
m_planes.num_elements(); k++)
450 exp_size_per_plane = exp_size/
m_planes.num_elements();
452 for(
int i = 0; i < exp_size_per_plane; i++)
464 temp_BC_exp = boost::dynamic_pointer_cast<
467 i+k*exp_size_per_plane));
470 tmp_V1 = V1 + Phys_offset,
471 tmp_V2 = V2 + Phys_offset,
472 tmp_outarray = outarray + Coef_offset);
484 "Field must be in physical state to extract trace space.");
504 int nPoints_plane =
m_planes[0]->GetTotPoints();
505 int nTracePts =
m_planes[0]->GetTrace()->GetTotPoints();
507 for (
int i = 0; i <
m_planes.num_elements(); ++i)
513 &inarray[i*nPoints_plane], 1,
514 &inarray_plane[0], 1);
516 m_planes[i]->ExtractTracePhys(inarray_plane, outarray_plane);
519 &outarray_plane[0], 1,
520 &outarray[i*nTracePts], 1);
529 const int nPlanes =
m_planes.num_elements();
530 const int nTracePlane =
m_planes[0]->GetTrace()->GetExpSize();
535 = traceMap->GetBndCondTraceToGlobalTraceMap();
536 int mapSize = traceBndMap.num_elements();
541 int i, n, e, cnt = 0, cnt1 = 0;
546 int nPlaneExp = nExp / nPlanes;
548 for (n = 0; n < nPlanes; ++n)
550 const int offset = n * nTracePlane;
551 for (e = 0; e < nPlaneExp; ++e)
boost::shared_ptr< AssemblyMapDG > AssemblyMapDGSharedPtr
const Array< OneD, const NekDouble > & GetCoeffs() const
This function returns (a reference to) the array (implemented as m_coeffs) containing all local expa...
int GetCoeff_Offset(int n) const
Get the start offset position for a global list of m_coeffs correspoinding to element n...
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool.
NekOptimize::GlobalOptParamSharedPtr m_globalOptParam
virtual ~DisContField3DHomogeneous1D()
Destructor.
LibUtilities::TranspositionSharedPtr m_transposition
int GetPhys_Offset(int n) const
Get the start offset position for a global list of m_phys correspoinding to element n...
Array< OneD, int > m_BCtoEdgMap
const BoundaryConditionCollection & GetBoundaryConditions(void) const
Array< OneD, NekDouble > & UpdateCoeffs()
This function returns (a reference to) the array (implemented as m_coeffs) containing all local expa...
void SetUpDG()
Set up all DG member variables and maps.
void NormVectorIProductWRTBase(const Array< OneD, const NekDouble > &Fx, const Array< OneD, const NekDouble > &Fy, Array< OneD, NekDouble > &outarray)
boost::shared_ptr< ExpList > & UpdateBndCondExpansion(int i)
const boost::shared_ptr< LocalRegions::ExpansionVector > GetExp() const
This function returns the vector of elements in the expansion.
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)
Array< OneD, int > m_BCtoElmMap
Storage space for the boundary to element and boundary to trace map. This member variable is really a...
std::map< ConstFactorType, NekDouble > ConstFactorMap
NekDouble m_lhom
Width of homogeneous direction.
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points.
NekDouble GetSpecVanVisc(const int k)
int GetExpSize(void)
This function returns the number of elements in the expansion.
boost::shared_ptr< SessionReader > SessionReaderSharedPtr
virtual void v_ExtractTracePhys(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
This method extracts the trace (edges in 2D) for each plane from the field inarray and puts the value...
Array< OneD, MultiRegions::ExpListSharedPtr > m_bndCondExpansions
An object which contains the discretised boundary conditions.
void SetCoeffPhys(void)
Definition of the total number of degrees of freedom and quadrature points. Sets up the storage for m...
LibUtilities::BasisSharedPtr m_homogeneousBasis
Definition of the total number of degrees of freedom and quadrature points. Sets up the storage for m...
DisContField3DHomogeneous1D()
virtual Array< OneD, SpatialDomains::BoundaryConditionShPtr > & v_UpdateBndConditions()
virtual boost::shared_ptr< ExpList > & v_UpdateBndCondExpansion(int i)
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
std::map< StdRegions::VarCoeffType, Array< OneD, NekDouble > > VarCoeffMap
boost::shared_ptr< ExpList > ExpListSharedPtr
Shared pointer to an ExpList object.
bool m_physState
The state of the array m_phys.
std::map< int, BoundaryRegionShPtr > BoundaryRegionCollection
boost::shared_ptr< DisContField2D > DisContField2DSharedPtr
boost::shared_ptr< StdExpansion1D > StdExpansion1DSharedPtr
LibUtilities::SessionReaderSharedPtr m_session
Session.
Array< OneD, ExpListSharedPtr > m_planes
void HomogeneousFwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate=eLocal, bool Shuff=true, bool UnShuff=true)
std::map< int, BoundaryConditionMapShPtr > BoundaryConditionCollection
Array< OneD, int > m_traceBndMap
void SetupBoundaryConditions(const LibUtilities::BasisKey &HomoBasis, const NekDouble lhom, SpatialDomains::BoundaryConditions &bcs, const std::string variable)
Array< OneD, SpatialDomains::BoundaryConditionShPtr > & UpdateBndConditions()
void GetEdgePhysVals(const int edge, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Extract the physical values along edge edge from inarray into outarray following the local edge orien...
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)
void GetBCValues(Array< OneD, NekDouble > &BndVals, const Array< OneD, NekDouble > &TotField, int BndID)
This funtion extract form a vector containing a full 3D-homogenous-1D field the value associated with...
void NormVectorIProductWRTBase(Array< OneD, const NekDouble > &V1, Array< OneD, const NekDouble > &V2, Array< OneD, NekDouble > &outarray, int BndID)
This function calculate the inner product of two vectors (V1 and V2) respect to the basis along a bou...
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.
bool m_useFFT
FFT variables.
static SpatialDomains::BoundaryConditionShPtr GetBoundaryCondition(const SpatialDomains::BoundaryConditionCollection &collection, unsigned int index, const std::string &variable)
const BoundaryRegionCollection & GetBoundaryRegions(void) const
boost::shared_ptr< BoundaryConditionBase > BoundaryConditionShPtr
boost::shared_ptr< StdExpansion > StdExpansionSharedPtr
void EvaluateBoundaryConditions(const NekDouble time=0.0, const std::string varName="")
This function evaluates the boundary conditions at a certaintime-level.
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
boost::shared_ptr< MeshGraph > MeshGraphSharedPtr
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Abstraction of a two-dimensional multi-elemental expansion which is merely a collection of local expa...
Describes the specification for a Basis.
Array< OneD, SpatialDomains::BoundaryConditionShPtr > m_bndConditions
An array which contains the information about the boundary condition on the different boundary region...