Nektar++
DisContField3DHomogeneous2D.h
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 // File DisContField3DHomogeneous2D.h
4 //
5 // For more information, please see: http://www.nektar.info
6 //
7 // The MIT License
8 //
9 // Copyright (c) 2006 Division of Applied Mathematics, Brown University (USA),
10 // Department of Aeronautics, Imperial College London (UK), and Scientific
11 // Computing and Imaging Institute, University of Utah (USA).
12 //
13 // Permission is hereby granted, free of charge, to any person obtaining a
14 // copy of this software and associated documentation files (the "Software"),
15 // to deal in the Software without restriction, including without limitation
16 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
17 // and/or sell copies of the Software, and to permit persons to whom the
18 // Software is furnished to do so, subject to the following conditions:
19 //
20 // The above copyright notice and this permission notice shall be included
21 // in all copies or substantial portions of the Software.
22 //
23 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
24 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
26 // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
28 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
29 // DEALINGS IN THE SOFTWARE.
30 //
31 // Description: Field definition in three-dimensions for a discontinuous
32 // LDG-H expansion with 2 homogeneous directions in 2D
33 //
34 ///////////////////////////////////////////////////////////////////////////////
35 
36 #ifndef NEKTAR_LIBS_MULTIREGIONS_DISCONTFIELD3DHOMO2D_H
37 #define NEKTAR_LIBS_MULTIREGIONS_DISCONTFIELD3DHOMO2D_H
38 
41 
42 namespace Nektar
43 {
44 namespace MultiRegions
45 {
47 {
48 public:
50 
53  const LibUtilities::BasisKey &HomoBasis_y,
54  const LibUtilities::BasisKey &HomoBasis_z, const NekDouble lhom_y,
55  const NekDouble lhom_z, const bool useFFT, const bool dealiasing,
56  const Collections::ImplementationType ImpType =
58 
61  const LibUtilities::BasisKey &HomoBasis_y,
62  const LibUtilities::BasisKey &HomoBasis_z, const NekDouble lhom_y,
63  const NekDouble lhom_z, const bool useFFT, const bool dealiasing,
65  const std::string &variable,
66  const Collections::ImplementationType ImpType =
68 
69  /// Copy constructor.
72  const bool DeclareLinesSetCoeffPhys = true);
73 
74  /// Destructor.
76 
78  const LibUtilities::BasisKey &HomoBasis_y,
79  const LibUtilities::BasisKey &HomoBasis_z, const NekDouble lhom_y,
81 
83  const NekDouble time = 0.0, const std::string varName = "");
84 
87 
90 
91  inline std::shared_ptr<ExpList> &UpdateBndCondExpansion(int i);
92 
95 
96  /// \brief Set up a list of element ids and edge ids the link to the
97  /// boundary conditions
99  Array<OneD, int> &EdgeID);
100 
101  virtual void v_GetBndElmtExpansion(int i, std::shared_ptr<ExpList> &result,
102  const bool DeclareCoeffPhysArrays);
103 
104  /// Storage space for the boundary to element and boundary to trace map.
105  /// This member variable is really allocated just in case a boundary
106  /// expansion recasting is required at the solver level. Otherwise is the 2
107  /// vectors are not filled up. If is needed all the funcitons whihc require
108  /// to use this map do not have to recalculate it anymore.
111 
112 protected:
114 
116 
118 
120  Array<OneD, int> &EdgeID)
121  {
122  GetBoundaryToElmtMap(ElmtID, EdgeID);
123  }
124 
125  /// @todo Fix Robin BCs for homogeneous case
126  virtual std::map<int, RobinBCInfoSharedPtr> v_GetRobinBCInfo()
127  {
128  return std::map<int, RobinBCInfoSharedPtr>();
129  }
130 
131 private:
132  // virtual functions
133  virtual void v_HelmSolve(const Array<OneD, const NekDouble> &inarray,
134  Array<OneD, NekDouble> &outarray,
135  const StdRegions::ConstFactorMap &factors,
136  const StdRegions::VarCoeffMap &varcoeff,
137  const MultiRegions::VarFactorsMap &varfactors,
138  const Array<OneD, const NekDouble> &dirForcing,
139  const bool PhysSpaceForcing);
140 
141  virtual void v_EvaluateBoundaryConditions(
142  const NekDouble time = 0.0, const std::string varName = "",
145 
147  &v_GetBndCondExpansions(void);
148 
151 
152  virtual std::shared_ptr<ExpList> &v_UpdateBndCondExpansion(int i);
153 
156 
157  inline virtual void v_SetBndCondBwdWeight(const int index,
158  const NekDouble value);
159 };
160 
161 typedef std::shared_ptr<DisContField3DHomogeneous2D>
163 
166 {
167  return m_bndCondExpansions;
168 }
169 
172 {
173  return m_bndConditions;
174 }
175 
178 {
179  return m_bndCondExpansions[i];
180 }
181 
184 {
185  return m_bndConditions;
186 }
187 
189  const int index, const NekDouble value)
190 {
191  m_bndCondBndWeight[index] = value;
192 }
193 } // namespace MultiRegions
194 } // namespace Nektar
195 
196 #endif // MULTIERGIONS_DISCONTFIELD3DHOMO2D_H
#define MULTI_REGIONS_EXPORT
Describes the specification for a Basis.
Definition: Basis.h:50
void EvaluateBoundaryConditions(const NekDouble time=0.0, const std::string varName="")
Array< OneD, int > m_BCtoElmMap
Storage space for the boundary to element and boundary to trace map. This member variable is really a...
virtual void v_SetBndCondBwdWeight(const int index, const NekDouble value)
virtual Array< OneD, SpatialDomains::BoundaryConditionShPtr > & v_UpdateBndConditions()
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 const Array< OneD, const SpatialDomains::BoundaryConditionShPtr > & v_GetBndConditions()
virtual void v_GetBndElmtExpansion(int i, std::shared_ptr< ExpList > &result, const bool DeclareCoeffPhysArrays)
virtual std::map< int, RobinBCInfoSharedPtr > v_GetRobinBCInfo()
virtual const Array< OneD, const std::shared_ptr< ExpList > > & v_GetBndCondExpansions(void)
virtual void v_HelmSolve(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::ConstFactorMap &factors, const StdRegions::VarCoeffMap &varcoeff, const MultiRegions::VarFactorsMap &varfactors, const Array< OneD, const NekDouble > &dirForcing, const bool PhysSpaceForcing)
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)
const Array< OneD, const MultiRegions::ExpListSharedPtr > & GetBndCondExpansions()
virtual void v_GetBoundaryToElmtMap(Array< OneD, int > &ElmtID, Array< OneD, int > &EdgeID)
const Array< OneD, const SpatialDomains::BoundaryConditionShPtr > & GetBndConditions()
Array< OneD, SpatialDomains::BoundaryConditionShPtr > & UpdateBndConditions()
void SetupBoundaryConditions(const LibUtilities::BasisKey &HomoBasis_y, const LibUtilities::BasisKey &HomoBasis_z, const NekDouble lhom_y, const NekDouble lhom_z, SpatialDomains::BoundaryConditions &bcs)
virtual std::shared_ptr< ExpList > & v_UpdateBndCondExpansion(int i)
Array< OneD, MultiRegions::ExpListSharedPtr > m_bndCondExpansions
Array< OneD, SpatialDomains::BoundaryConditionShPtr > m_bndConditions
Abstraction of a one-dimensional multi-elemental expansion which is merely a collection of local expa...
std::shared_ptr< SessionReader > SessionReaderSharedPtr
std::shared_ptr< DisContField3DHomogeneous2D > DisContField3DHomogeneous2DSharedPtr
std::shared_ptr< ExpList > ExpListSharedPtr
Shared pointer to an ExpList object.
std::map< StdRegions::ConstFactorType, Array< OneD, NekDouble > > VarFactorsMap
static const NekDouble kNekUnsetDouble
std::shared_ptr< MeshGraph > MeshGraphSharedPtr
Definition: MeshGraph.h:172
std::map< StdRegions::VarCoeffType, Array< OneD, NekDouble > > VarCoeffMap
Definition: StdRegions.hpp:240
std::map< ConstFactorType, NekDouble > ConstFactorMap
Definition: StdRegions.hpp:282
The above copyright notice and this permission notice shall be included.
Definition: CoupledSolver.h:1
double NekDouble