Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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  virtual void v_GetBndElmtExpansion(int i,
101  boost::shared_ptr<ExpList> &result);
102 
103  /// Storage space for the boundary to element and boundary to trace map.
104  /// This member variable is really allocated just in case a boundary expansion
105  /// recasting is required at the solver level. Otherwise is the 2 vectors are not filled up.
106  /// If is needed all the funcitons whihc require to use this map do not have to recalculate it anymore.
109 
110  protected:
111 
113 
115 
117  Array<OneD,int> &EdgeID)
118  {
119  GetBoundaryToElmtMap(ElmtID,EdgeID);
120  }
121 
122  /// @todo Fix Robin BCs for homogeneous case
123  virtual map<int, RobinBCInfoSharedPtr> v_GetRobinBCInfo()
124  {
125  return map<int, RobinBCInfoSharedPtr>();
126  }
127 
128  private:
129  // virtual functions
130  virtual void v_HelmSolve(
131  const Array<OneD, const NekDouble> &inarray,
132  Array<OneD, NekDouble> &outarray,
133  const FlagList &flags,
134  const StdRegions::ConstFactorMap &factors,
135  const StdRegions::VarCoeffMap &varcoeff,
136  const Array<OneD, const NekDouble> &dirForcing);
137 
138  virtual void v_EvaluateBoundaryConditions(
139  const NekDouble time = 0.0,
140  const std::string varName = "",
143 
145 
147 
148  virtual boost::shared_ptr<ExpList> &v_UpdateBndCondExpansion(int i);
149 
151  };
152 
153  typedef boost::shared_ptr<DisContField3DHomogeneous2D>
155 
157  {
158  return m_bndCondExpansions;
159  }
160 
162  {
163  return m_bndConditions;
164  }
165 
167  {
168  return m_bndCondExpansions[i];
169  }
170 
172  {
173  return m_bndConditions;
174  }
175  } //end of namespace
176 } //end of namespace
177 
178 #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:251
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:51
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:226
virtual void v_GetBndElmtExpansion(int i, boost::shared_ptr< ExpList > &result)
boost::shared_ptr< ExpList > ExpListSharedPtr
Shared pointer to an ExpList object.
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:442
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