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 
88  inline const Array<OneD,const MultiRegions::ExpListSharedPtr> &GetBndCondExpansions();
89 
90  inline const Array<OneD,const SpatialDomains::BoundaryConditionShPtr> &GetBndConditions();
91 
92  inline boost::shared_ptr<ExpList> &UpdateBndCondExpansion(int i);
93 
94  inline Array<OneD, SpatialDomains::BoundaryConditionShPtr>& UpdateBndConditions();
95 
96  /// \brief Set up a list of element ids and edge ids the link to the
97  /// boundary conditions
98  MULTI_REGIONS_EXPORT void GetBoundaryToElmtMap(Array<OneD, int> &ElmtID,Array<OneD,int> &EdgeID);
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.
104  Array<OneD, int> m_BCtoElmMap;
105  Array<OneD, int> m_BCtoEdgMap;
106 
107  protected:
108 
109  Array<OneD,MultiRegions::ExpListSharedPtr> m_bndCondExpansions;
110 
111  Array<OneD,SpatialDomains::BoundaryConditionShPtr> m_bndConditions;
112 
113  virtual void v_GetBoundaryToElmtMap(Array<OneD,int> &ElmtID,
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 
141  virtual const Array<OneD,const boost::shared_ptr<ExpList> > &v_GetBndCondExpansions(void);
142 
143  virtual const Array<OneD,const SpatialDomains::BoundaryConditionShPtr> &v_GetBndConditions();
144 
145  virtual boost::shared_ptr<ExpList> &v_UpdateBndCondExpansion(int i);
146 
147  virtual Array<OneD, SpatialDomains::BoundaryConditionShPtr>& v_UpdateBndConditions();
148  };
149 
150  typedef boost::shared_ptr<DisContField3DHomogeneous2D>
152 
153  inline const Array<OneD,const MultiRegions::ExpListSharedPtr> &DisContField3DHomogeneous2D::GetBndCondExpansions()
154  {
155  return m_bndCondExpansions;
156  }
157 
158  inline const Array<OneD,const SpatialDomains::BoundaryConditionShPtr> &DisContField3DHomogeneous2D::GetBndConditions()
159  {
160  return m_bndConditions;
161  }
162 
164  {
165  return m_bndCondExpansions[i];
166  }
167 
168  inline Array<OneD, SpatialDomains::BoundaryConditionShPtr>&DisContField3DHomogeneous2D::UpdateBndConditions()
169  {
170  return m_bndConditions;
171  }
172  } //end of namespace
173 } //end of namespace
174 
175 #endif // MULTIERGIONS_DISCONTFIELD3DHOMO2D_H