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 // License for the specific language governing rights and limitations under
14 // Permission is hereby granted, free of charge, to any person obtaining a
15 // copy of this software and associated documentation files (the "Software"),
16 // to deal in the Software without restriction, including without limitation
17 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
18 // and/or sell copies of the Software, and to permit persons to whom the
19 // Software is furnished to do so, subject to the following conditions:
20 //
21 // The above copyright notice and this permission notice shall be included
22 // in all copies or substantial portions of the Software.
23 //
24 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
25 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
27 // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
29 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
30 // DEALINGS IN THE SOFTWARE.
31 //
32 // Description: Field definition in three-dimensions for a discontinuous
33 // LDG-H expansion with 2 homogeneous directions in 2D
34 //
35 ///////////////////////////////////////////////////////////////////////////////
36 
37 #ifndef NEKTAR_LIBS_MULTIREGIONS_DISCONTFIELD3DHOMO2D_H
38 #define NEKTAR_LIBS_MULTIREGIONS_DISCONTFIELD3DHOMO2D_H
39 
42 
43 namespace Nektar
44 {
45  namespace MultiRegions
46  {
48  {
49  public:
51 
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);
59 
61  const LibUtilities::BasisKey &HomoBasis_y,
62  const LibUtilities::BasisKey &HomoBasis_z,
63  const NekDouble lhom_y,
64  const NekDouble lhom_z,
65  const bool useFFT,
66  const bool dealiasing,
68  const std::string &variable);
69 
70  /// Copy constructor.
71  MULTI_REGIONS_EXPORT DisContField3DHomogeneous2D(const DisContField3DHomogeneous2D &In,
72  const bool DeclareLinesSetCoeffPhys = true);
73 
74  /// Destructor.
76 
77 
79  const LibUtilities::BasisKey &HomoBasis_z,
80  const NekDouble lhom_y,
81  const NekDouble lhom_z,
83 
85  const NekDouble time = 0.0,
86  const std::string varName = "");
87 
89 
91 
92  inline boost::shared_ptr<ExpList> &UpdateBndCondExpansion(int i);
93 
95 
96  /// \brief Set up a list of element ids and edge ids the link to the
97  /// boundary conditions
99 
100  /// Storage space for the boundary to element and boundary to trace map.
101  /// This member variable is really allocated just in case a boundary expansion
102  /// recasting is required at the solver level. Otherwise is the 2 vectors are not filled up.
103  /// If is needed all the funcitons whihc require to use this map do not have to recalculate it anymore.
106 
107  protected:
108 
110 
112 
114  Array<OneD,int> &EdgeID)
115  {
116  GetBoundaryToElmtMap(ElmtID,EdgeID);
117  }
118 
119  /// @todo Fix Robin BCs for homogeneous case
120  virtual map<int, RobinBCInfoSharedPtr> v_GetRobinBCInfo()
121  {
122  return map<int, RobinBCInfoSharedPtr>();
123  }
124 
125  private:
126  // virtual functions
127  virtual void v_HelmSolve(
128  const Array<OneD, const NekDouble> &inarray,
129  Array<OneD, NekDouble> &outarray,
130  const FlagList &flags,
131  const StdRegions::ConstFactorMap &factors,
132  const StdRegions::VarCoeffMap &varcoeff,
133  const Array<OneD, const NekDouble> &dirForcing);
134 
135  virtual void v_EvaluateBoundaryConditions(
136  const NekDouble time = 0.0,
137  const std::string varName = "",
140 
142 
144 
145  virtual boost::shared_ptr<ExpList> &v_UpdateBndCondExpansion(int i);
146 
148  };
149 
150  typedef boost::shared_ptr<DisContField3DHomogeneous2D>
152 
154  {
155  return m_bndCondExpansions;
156  }
157 
159  {
160  return m_bndConditions;
161  }
162 
164  {
165  return m_bndCondExpansions[i];
166  }
167 
169  {
170  return m_bndConditions;
171  }
172  } //end of namespace
173 } //end of namespace
174 
175 #endif // MULTIERGIONS_DISCONTFIELD3DHOMO2D_H
Array< OneD, SpatialDomains::BoundaryConditionShPtr > m_bndConditions
Array< OneD, SpatialDomains::BoundaryConditionShPtr > & UpdateBndConditions()
void EvaluateBoundaryConditions(const NekDouble time=0.0, const std::string varName="")
const Array< OneD, const MultiRegions::ExpListSharedPtr > & GetBndCondExpansions()
virtual const Array< OneD, const SpatialDomains::BoundaryConditionShPtr > & v_GetBndConditions()
virtual Array< OneD, SpatialDomains::BoundaryConditionShPtr > & v_UpdateBndConditions()
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)
#define MULTI_REGIONS_EXPORT
std::map< ConstFactorType, NekDouble > ConstFactorMap
Definition: StdRegions.hpp:248
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, MultiRegions::ExpListSharedPtr > m_bndCondExpansions
boost::shared_ptr< SessionReader > SessionReaderSharedPtr
Definition: MeshPartition.h:50
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< DisContField3DHomogeneous2D > DisContField3DHomogeneous2DSharedPtr
boost::shared_ptr< ExpList > & UpdateBndCondExpansion(int i)
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:225
boost::shared_ptr< ExpList > ExpListSharedPtr
Shared pointer to an ExpList object.
Definition: ExpList.h:1340
double NekDouble
const Array< OneD, const SpatialDomains::BoundaryConditionShPtr > & GetBndConditions()
Defines a list of flags.
static const NekDouble kNekUnsetDouble
virtual void v_GetBoundaryToElmtMap(Array< OneD, int > &ElmtID, Array< OneD, int > &EdgeID)
virtual const Array< OneD, const boost::shared_ptr< ExpList > > & v_GetBndCondExpansions(void)
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 map< int, RobinBCInfoSharedPtr > v_GetRobinBCInfo()
boost::shared_ptr< MeshGraph > MeshGraphSharedPtr
Definition: MeshGraph.h:432
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:50