Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ExpList1DHomogeneous2D.h
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 // File ExpList1DHomogeneous2D.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 1D field which is homogeneous in 2 directions and so
33 // uses much of the functionality from a ExpList2D and its daughters
34 //
35 ///////////////////////////////////////////////////////////////////////////////
36 
37 #ifndef EXPLIST1DHOMO2D_H
38 #define EXPLIST1DHOMO2D_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 ExpList1DHomogeneous2D object.
53  typedef boost::shared_ptr<ExpList1DHomogeneous2D> ExpList1DHomogeneous2DSharedPtr;
54  /// Vector of pointers to ExpList1DHomogeneous2D objects.
55  typedef std::vector< ExpList1DHomogeneous2DSharedPtr > ExpList1DHomogeneous2DVector;
56  /// Iterator for the vector of ExpList1DHomogeneous2D 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 
68  const LibUtilities::BasisKey &HomoBasis_y,
69  const LibUtilities::BasisKey &HomoBasis_z,
70  const NekDouble lhom_y,
71  const NekDouble lhom_z,
72  const bool useFFT,
73  const bool dealiasing,
74  const Array<OneD, ExpListSharedPtr> &points);
75 
76  /// Copy constructor.
77  MULTI_REGIONS_EXPORT ExpList1DHomogeneous2D(const ExpList1DHomogeneous2D &In);
78 
79  /// Destructor.
81 
82  /// This function calculates the coordinates of all the elemental
83  /// quadrature points \f$\boldsymbol{x}_i\f$.
84  inline void GetCoords(Array<OneD, NekDouble> &coord_0,
85  Array<OneD, NekDouble> &coord_1 = NullNekDouble1DArray,
86  Array<OneD, NekDouble> &coord_2 = NullNekDouble1DArray);
87 
88  MULTI_REGIONS_EXPORT void GetCoords(const int eid,
89  Array<OneD, NekDouble> &xc0,
90  Array<OneD, NekDouble> &xc1,
91  Array<OneD, NekDouble> &xc2);
92 
93  //MULTI_REGIONS_EXPORT void HomoFwdTrans2D(const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray);
94 
95  protected:
96 
97  /// Definition of the total number of degrees of freedom and
98  /// quadrature points. Sets up the storage for \a m_coeff and \a
99  /// m_phys.
100  void SetCoeffPhys(void);
101 
102  // virtual functions
103 
104  virtual void v_GetCoords(Array<OneD, NekDouble> &coord_0,
105  Array<OneD, NekDouble> &coord_1,
106  Array<OneD, NekDouble> &coord_2);
107 
108  virtual void v_WriteTecplotZone(std::ostream &outfile,
109  int expansion);
110 
111 
112  virtual void v_WriteVtkPieceHeader(std::ostream &outfile, int expansion);
113 
114  private:
115  };
116 
117  inline void ExpList1DHomogeneous2D::GetCoords(Array<OneD, NekDouble> &coord_0,
118  Array<OneD, NekDouble> &coord_1,
119  Array<OneD, NekDouble> &coord_2)
120 
121  {
122  v_GetCoords(coord_0,coord_1,coord_2);
123  }
124 
125  } //end of namespace
126 } //end of namespace
127 
128 #endif//EXPLIST3DHOMO1D_H
129