Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 // 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: A 3D field which is homogeneous in 2 directions and so
33 // uses much of the functionality from a ExpList1D and its daughters
34 //
35 ///////////////////////////////////////////////////////////////////////////////
36 
37 #ifndef EXPLIST3DHOMO2D_H
38 #define EXPLIST3DHOMO2D_H
39 
41 #include <vector>
43 
44 namespace Nektar
45 {
46  namespace MultiRegions
47  {
48 
49  // Forward declaration for typedefs
51 
52  /// Shared pointer to an ExpList3DHomogeneous2D object.
53  typedef boost::shared_ptr<ExpList3DHomogeneous2D> ExpList3DHomogeneous2DSharedPtr;
54  /// Vector of pointers to ExpList3DHomogeneous2D objects.
55  typedef std::vector< ExpList3DHomogeneous2DSharedPtr > ExpList3DHomogeneous2DVector;
56  /// Iterator for the vector of ExpList3DHomogeneous2D pointers.
58 
59  /// Abstraction of a one-dimensional multi-elemental expansion which
60  /// is merely a collection of local expansions.
62  {
63  public:
64  /// Default constructor.
66 
69  const LibUtilities::BasisKey &HomoBasis_y,
70  const LibUtilities::BasisKey &HomoBasis_z,
71  const NekDouble lhom_y,
72  const NekDouble lhom_z,
73  const bool useFFT,
74  const bool dealiasing,
77 
78  /// Sets up a list of local expansions based on an input mesh.
81  const LibUtilities::BasisKey &HomoBasis_y,
82  const LibUtilities::BasisKey &HomoBasis_z,
83  const NekDouble lhom_y,
84  const NekDouble lhom_z,
85  const bool useFFT,
86  const bool dealiasing,
90 
91 
92  /// Copy constructor.
94  const ExpList3DHomogeneous2D &In,
95  const bool DeclareLinesSetCoeffPhys = true);
96 
97  ///
99  const ExpList3DHomogeneous2D &In,
100  const std::vector<unsigned int> &eIDs,
101  const bool DeclareLinesSetCoeffPhys = true,
102  const Collections::ImplementationType ImpType
104 
105  /// Destructor.
107 
108  /// This function calculates the coordinates of all the elemental
109  /// quadrature points \f$\boldsymbol{x}_i\f$.
110  inline void GetCoords(Array<OneD, NekDouble> &coord_0,
113 
114  MULTI_REGIONS_EXPORT void GetCoords(const int eid,
118 
119  protected:
120 
121  /// Definition of the total number of degrees of freedom and
122  /// quadrature points. Sets up the storage for \a m_coeff and \a
123  /// m_phys.
124  void SetCoeffPhys(void);
125 
126  // virtual functions
127  virtual void v_GetCoords(Array<OneD, NekDouble> &coord_0,
128  Array<OneD, NekDouble> &coord_1,
129  Array<OneD, NekDouble> &coord_2);
130 
131  virtual void v_WriteTecplotZone(std::ostream &outfile,
132  int expansion);
133 
134 
135  virtual void v_WriteVtkPieceHeader(std::ostream &outfile, int expansion, int istrip);
136 
137  virtual NekDouble v_L2(
138  const Array<OneD, const NekDouble> &inarray,
140 
141  private:
142  };
143 
145  Array<OneD, NekDouble> &coord_1,
146  Array<OneD, NekDouble> &coord_2)
147 
148  {
149  v_GetCoords(coord_0,coord_1,coord_2);
150  }
151  } //end of namespace
152 } //end of namespace
153 
154 #endif//EXPLIST3DHOMO2D_H
155 
Abstraction of a two-dimensional multi-elemental expansion which is merely a collection of local expa...
std::vector< ExpList3DHomogeneous2DSharedPtr >::iterator ExpList3DHomogeneous2DVectorIter
Iterator for the vector of ExpList3DHomogeneous2D pointers.
virtual void v_WriteTecplotZone(std::ostream &outfile, int expansion)
static Array< OneD, NekDouble > NullNekDouble1DArray
#define MULTI_REGIONS_EXPORT
boost::shared_ptr< SessionReader > SessionReaderSharedPtr
Definition: MeshPartition.h:51
boost::shared_ptr< ExpList3DHomogeneous2D > ExpList3DHomogeneous2DSharedPtr
Shared pointer to an ExpList3DHomogeneous2D object.
virtual void v_WriteVtkPieceHeader(std::ostream &outfile, int expansion, int istrip)
virtual NekDouble v_L2(const Array< OneD, const NekDouble > &inarray, const Array< OneD, const NekDouble > &soln=NullNekDouble1DArray)
void SetCoeffPhys(void)
Definition of the total number of degrees of freedom and quadrature points. Sets up the storage for m...
virtual void v_GetCoords(Array< OneD, NekDouble > &coord_0, Array< OneD, NekDouble > &coord_1, Array< OneD, NekDouble > &coord_2)
double NekDouble
std::vector< ExpList3DHomogeneous2DSharedPtr > ExpList3DHomogeneous2DVector
Vector of pointers to ExpList3DHomogeneous2D objects.
StandardMatrixTag boost::call_traits< LhsDataType >::const_reference rhs typedef NekMatrix< LhsDataType, StandardMatrixTag >::iterator iterator
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 . ...
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