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,
55  const NekDouble lhom_y,
56  const NekDouble lhom_z,
57  const bool useFFT,
58  const bool dealiasing,
61 
64  const LibUtilities::BasisKey &HomoBasis_y,
65  const LibUtilities::BasisKey &HomoBasis_z,
66  const NekDouble lhom_y,
67  const NekDouble lhom_z,
68  const bool useFFT,
69  const bool dealiasing,
71  const std::string &variable,
74 
75  /// Copy constructor.
76  MULTI_REGIONS_EXPORT DisContField3DHomogeneous2D(const DisContField3DHomogeneous2D &In,
77  const bool DeclareLinesSetCoeffPhys = true);
78 
79  /// Destructor.
81 
82 
84  const LibUtilities::BasisKey &HomoBasis_z,
85  const NekDouble lhom_y,
86  const NekDouble lhom_z,
88 
90  const NekDouble time = 0.0,
91  const std::string varName = "");
92 
94 
96 
97  inline std::shared_ptr<ExpList> &UpdateBndCondExpansion(int i);
98 
100 
101  /// \brief Set up a list of element ids and edge ids the link to the
102  /// boundary conditions
104 
105  virtual void v_GetBndElmtExpansion(int i,
106  std::shared_ptr<ExpList> &result,
107  const bool DeclareCoeffPhysArrays);
108 
109  /// Storage space for the boundary to element and boundary to trace map.
110  /// This member variable is really allocated just in case a boundary expansion
111  /// recasting is required at the solver level. Otherwise is the 2 vectors are not filled up.
112  /// If is needed all the funcitons whihc require to use this map do not have to recalculate it anymore.
115 
116  protected:
117 
119 
121 
123  Array<OneD,int> &EdgeID)
124  {
125  GetBoundaryToElmtMap(ElmtID,EdgeID);
126  }
127 
128  /// @todo Fix Robin BCs for homogeneous case
129  virtual std::map<int, RobinBCInfoSharedPtr> v_GetRobinBCInfo()
130  {
131  return std::map<int, RobinBCInfoSharedPtr>();
132  }
133 
134  private:
135  // virtual functions
136  virtual void v_HelmSolve(
137  const Array<OneD, const NekDouble> &inarray,
138  Array<OneD, NekDouble> &outarray,
139  const FlagList &flags,
140  const StdRegions::ConstFactorMap &factors,
141  const StdRegions::VarCoeffMap &varcoeff,
142  const MultiRegions::VarFactorsMap &varfactors,
143  const Array<OneD, const NekDouble> &dirForcing,
144  const bool PhysSpaceForcing);
145 
146  virtual void v_EvaluateBoundaryConditions(
147  const NekDouble time = 0.0,
148  const std::string varName = "",
151 
153 
155 
156  virtual std::shared_ptr<ExpList> &v_UpdateBndCondExpansion(int i);
157 
159  };
160 
161  typedef std::shared_ptr<DisContField3DHomogeneous2D>
163 
165  {
166  return m_bndCondExpansions;
167  }
168 
170  {
171  return m_bndConditions;
172  }
173 
175  {
176  return m_bndCondExpansions[i];
177  }
178 
180  {
181  return m_bndConditions;
182  }
183  } //end of namespace
184 } //end of namespace
185 
186 #endif // MULTIERGIONS_DISCONTFIELD3DHOMO2D_H
Array< OneD, SpatialDomains::BoundaryConditionShPtr > m_bndConditions
Array< OneD, SpatialDomains::BoundaryConditionShPtr > & UpdateBndConditions()
std::shared_ptr< MeshGraph > MeshGraphSharedPtr
Definition: MeshGraph.h:163
void EvaluateBoundaryConditions(const NekDouble time=0.0, const std::string varName="")
const Array< OneD, const MultiRegions::ExpListSharedPtr > & GetBndCondExpansions()
std::shared_ptr< ExpList > ExpListSharedPtr
Shared pointer to an ExpList object.
virtual const Array< OneD, const SpatialDomains::BoundaryConditionShPtr > & v_GetBndConditions()
virtual const Array< OneD, const std::shared_ptr< ExpList > > & v_GetBndCondExpansions(void)
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)
#define MULTI_REGIONS_EXPORT
std::map< ConstFactorType, NekDouble > ConstFactorMap
Definition: StdRegions.hpp:294
Array< OneD, MultiRegions::ExpListSharedPtr > m_bndCondExpansions
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_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
Definition: StdRegions.hpp:264
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)
double NekDouble
const Array< OneD, const SpatialDomains::BoundaryConditionShPtr > & GetBndConditions()
Defines a list of flags.
std::shared_ptr< DisContField3DHomogeneous2D > DisContField3DHomogeneous2DSharedPtr
static const NekDouble kNekUnsetDouble
virtual void v_GetBoundaryToElmtMap(Array< OneD, int > &ElmtID, Array< OneD, int > &EdgeID)
virtual std::shared_ptr< ExpList > & v_UpdateBndCondExpansion(int i)
virtual std::map< int, RobinBCInfoSharedPtr > v_GetRobinBCInfo()
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)
Abstraction of a one-dimensional multi-elemental expansion which is merely a collection of local expa...
Describes the specification for a Basis.
Definition: Basis.h:49
std::shared_ptr< SessionReader > SessionReaderSharedPtr
std::map< StdRegions::ConstFactorType, Array< OneD, NekDouble > > VarFactorsMap