Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties 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 
54  const LibUtilities::BasisKey &HomoBasis_y,
55  const LibUtilities::BasisKey &HomoBasis_z,
56  const NekDouble lhom_y,
57  const NekDouble lhom_z,
58  const bool useFFT,
59  const bool dealiasing,
62 
65  const LibUtilities::BasisKey &HomoBasis_y,
66  const LibUtilities::BasisKey &HomoBasis_z,
67  const NekDouble lhom_y,
68  const NekDouble lhom_z,
69  const bool useFFT,
70  const bool dealiasing,
72  const std::string &variable,
75 
76  /// Copy constructor.
77  MULTI_REGIONS_EXPORT DisContField3DHomogeneous2D(const DisContField3DHomogeneous2D &In,
78  const bool DeclareLinesSetCoeffPhys = true);
79 
80  /// Destructor.
82 
83 
85  const LibUtilities::BasisKey &HomoBasis_z,
86  const NekDouble lhom_y,
87  const NekDouble lhom_z,
89 
91  const NekDouble time = 0.0,
92  const std::string varName = "");
93 
95 
97 
98  inline boost::shared_ptr<ExpList> &UpdateBndCondExpansion(int i);
99 
101 
102  /// \brief Set up a list of element ids and edge ids the link to the
103  /// boundary conditions
105 
106  virtual void v_GetBndElmtExpansion(int i,
107  boost::shared_ptr<ExpList> &result,
108  const bool DeclareCoeffPhysArrays);
109 
110  /// Storage space for the boundary to element and boundary to trace map.
111  /// This member variable is really allocated just in case a boundary expansion
112  /// recasting is required at the solver level. Otherwise is the 2 vectors are not filled up.
113  /// If is needed all the funcitons whihc require to use this map do not have to recalculate it anymore.
116 
117  protected:
118 
120 
122 
124  Array<OneD,int> &EdgeID)
125  {
126  GetBoundaryToElmtMap(ElmtID,EdgeID);
127  }
128 
129  /// @todo Fix Robin BCs for homogeneous case
130  virtual std::map<int, RobinBCInfoSharedPtr> v_GetRobinBCInfo()
131  {
132  return std::map<int, RobinBCInfoSharedPtr>();
133  }
134 
135  private:
136  // virtual functions
137  virtual void v_HelmSolve(
138  const Array<OneD, const NekDouble> &inarray,
139  Array<OneD, NekDouble> &outarray,
140  const FlagList &flags,
141  const StdRegions::ConstFactorMap &factors,
142  const StdRegions::VarCoeffMap &varcoeff,
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 boost::shared_ptr<ExpList> &v_UpdateBndCondExpansion(int i);
157 
159  };
160 
161  typedef boost::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()
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:252
Array< OneD, MultiRegions::ExpListSharedPtr > m_bndCondExpansions
boost::shared_ptr< SessionReader > SessionReaderSharedPtr
Definition: MeshPartition.h:51
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, const bool PhysSpaceForcing)
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:227
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)
virtual void v_GetBndElmtExpansion(int i, boost::shared_ptr< ExpList > &result, const bool DeclareCoeffPhysArrays)
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.
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