Nektar++
ExpList3DHomogeneous2D.h
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 // File ExpList3DHomogeneous2D.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: A 3D field which is homogeneous in 2 directions and so
32 // uses much of the functionality from a ExpList1D and its daughters
33 //
34 ///////////////////////////////////////////////////////////////////////////////
35 
36 #ifndef EXPLIST3DHOMO2D_H
37 #define EXPLIST3DHOMO2D_H
38 
40 #include <vector>
42 
43 namespace Nektar
44 {
45  namespace MultiRegions
46  {
47 
48  // Forward declaration for typedefs
49  class ExpList3DHomogeneous2D;
50 
51  /// Shared pointer to an ExpList3DHomogeneous2D object.
52  typedef std::shared_ptr<ExpList3DHomogeneous2D> ExpList3DHomogeneous2DSharedPtr;
53  /// Vector of pointers to ExpList3DHomogeneous2D objects.
54  typedef std::vector< ExpList3DHomogeneous2DSharedPtr > ExpList3DHomogeneous2DVector;
55 
56  /// Abstraction of a one-dimensional multi-elemental expansion which
57  /// is merely a collection of local expansions.
59  {
60  public:
61  /// Default constructor.
63 
66  const LibUtilities::BasisKey &HomoBasis_y,
67  const LibUtilities::BasisKey &HomoBasis_z,
68  const NekDouble lhom_y,
69  const NekDouble lhom_z,
70  const bool useFFT,
71  const bool dealiasing,
74 
75  /// Sets up a list of local expansions based on an input mesh.
78  const LibUtilities::BasisKey &HomoBasis_y,
79  const LibUtilities::BasisKey &HomoBasis_z,
80  const NekDouble lhom_y,
81  const NekDouble lhom_z,
82  const bool useFFT,
83  const bool dealiasing,
87 
88 
89  /// Copy constructor.
91  const ExpList3DHomogeneous2D &In,
92  const bool DeclareLinesSetCoeffPhys = true);
93 
94  ///
96  const ExpList3DHomogeneous2D &In,
97  const std::vector<unsigned int> &eIDs,
98  const bool DeclareLinesSetCoeffPhys = true,
101 
102  /// Destructor.
104 
105  /// This function calculates the coordinates of all the elemental
106  /// quadrature points \f$\boldsymbol{x}_i\f$.
107  inline void GetCoords(Array<OneD, NekDouble> &coord_0,
110 
111  MULTI_REGIONS_EXPORT void GetCoords(const int eid,
115 
116  protected:
117 
118  /// Definition of the total number of degrees of freedom and
119  /// quadrature points. Sets up the storage for \a m_coeff and \a
120  /// m_phys.
121  void SetCoeffPhys(void);
122 
123  // virtual functions
124  virtual void v_GetCoords(Array<OneD, NekDouble> &coord_0,
125  Array<OneD, NekDouble> &coord_1,
126  Array<OneD, NekDouble> &coord_2);
127 
128  virtual void v_WriteTecplotZone(std::ostream &outfile,
129  int expansion);
130 
131 
132  virtual void v_WriteVtkPieceHeader(std::ostream &outfile, int expansion, int istrip);
133 
134  virtual NekDouble v_L2(
135  const Array<OneD, const NekDouble> &inarray,
137 
138  private:
139  };
140 
142  Array<OneD, NekDouble> &coord_1,
143  Array<OneD, NekDouble> &coord_2)
144 
145  {
146  v_GetCoords(coord_0,coord_1,coord_2);
147  }
148  } //end of namespace
149 } //end of namespace
150 
151 #endif//EXPLIST3DHOMO2D_H
152 
#define MULTI_REGIONS_EXPORT
Describes the specification for a Basis.
Definition: Basis.h:50
Abstraction of a one-dimensional multi-elemental expansion which is merely a collection of local expa...
virtual void v_WriteVtkPieceHeader(std::ostream &outfile, int expansion, int istrip)
void SetCoeffPhys(void)
Definition of the total number of degrees of freedom and quadrature points. Sets up the storage for m...
void GetCoords(Array< OneD, NekDouble > &coord_0, Array< OneD, NekDouble > &coord_1=NullNekDouble1DArray, Array< OneD, NekDouble > &coord_2=NullNekDouble1DArray)
This function calculates the coordinates of all the elemental quadrature points .
virtual void v_GetCoords(Array< OneD, NekDouble > &coord_0, Array< OneD, NekDouble > &coord_1, Array< OneD, NekDouble > &coord_2)
virtual NekDouble v_L2(const Array< OneD, const NekDouble > &inarray, const Array< OneD, const NekDouble > &soln=NullNekDouble1DArray)
virtual void v_WriteTecplotZone(std::ostream &outfile, int expansion)
Abstraction of a two-dimensional multi-elemental expansion which is merely a collection of local expa...
std::shared_ptr< SessionReader > SessionReaderSharedPtr
std::vector< ExpList3DHomogeneous2DSharedPtr > ExpList3DHomogeneous2DVector
Vector of pointers to ExpList3DHomogeneous2D objects.
std::shared_ptr< ExpList3DHomogeneous2D > ExpList3DHomogeneous2DSharedPtr
Shared pointer to an ExpList3DHomogeneous2D object.
std::shared_ptr< MeshGraph > MeshGraphSharedPtr
Definition: MeshGraph.h:174
The above copyright notice and this permission notice shall be included.
Definition: CoupledSolver.h:1
static Array< OneD, NekDouble > NullNekDouble1DArray
double NekDouble