Nektar++
ExpList2DHomogeneous1D.h
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 // File ExpList2DHomogeneous1D.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 2D field which is homogeneous in 1 direction and so
33 // uses much of the functionality from a ExpList1D and its daughters
34 //
35 ///////////////////////////////////////////////////////////////////////////////
36 
37 #ifndef EXPLIST2DHOMO1D_H
38 #define EXPLIST2DHOMO1D_H
39 
42 #include <vector>
43 
44 namespace Nektar
45 {
46  namespace MultiRegions
47  {
48 
49  // Forward declaration for typedefs
51 
52  /// Shared pointer to an ExpList2DHomogeneous1D object.
53  typedef boost::shared_ptr<ExpList2DHomogeneous1D>
55  /// Vector of pointers to ExpList2DHomogeneous1D objects.
56  typedef std::vector< ExpList2DHomogeneous1DSharedPtr >
58  /// Iterator for the vector of ExpList2DHomogeneous1D pointers.
61 
62  /// Abstraction of a two-dimensional multi-elemental expansion which
63  /// is merely a collection of local expansions.
65  {
66  public:
67  /// Default constructor.
69 
70  /// Sets up a list of local expansions based on an input mesh.
73  const LibUtilities::BasisKey &HomoBasis,
74  const NekDouble lz,
75  const bool useFFT,
76  const bool dealiasing,
77  const SpatialDomains::MeshGraphSharedPtr &graph1D);
78 
81  const LibUtilities::BasisKey &HomoBasis,
82  const NekDouble lhom,
83  const bool useFFT,
84  const bool dealiasing,
85  const Array<OneD, ExpListSharedPtr> &planes);
86 
87  /// Copy constructor.
89  const ExpList2DHomogeneous1D &In);
90 
91  /// Destructor.
93 
94  /// This function calculates the coordinates of all the elemental
95  /// quadrature points \f$\boldsymbol{x}_i\f$.
96  inline void GetCoords(
97  Array<OneD, NekDouble> &coord_0,
100 
101  MULTI_REGIONS_EXPORT void GetCoords(const int eid,
105 
106  protected:
107 
108  /// Definition of the total number of degrees of freedom and
109  /// quadrature points. Sets up the storage for \a m_coeff and \a
110  /// m_phys.
111  void SetCoeffPhys(void);
112 
113  // virtual functions
114 
115  virtual void v_GetCoords(
116  Array<OneD, NekDouble> &coord_0,
117  Array<OneD, NekDouble> &coord_1,
118  Array<OneD, NekDouble> &coord_2);
119 
120  virtual void v_WriteTecplotZone(
121  std::ostream &outfile,
122  int expansion);
123 
124 
125  virtual void v_WriteVtkPieceHeader(
126  std::ostream &outfile,
127  int expansion,
128  int istrip);
129 
130  virtual void v_GetNormals(
131  Array<OneD, Array<OneD, NekDouble> > &normals);
132 
133  private:
134  };
135 
137  Array<OneD, NekDouble> &coord_0,
138  Array<OneD, NekDouble> &coord_1,
139  Array<OneD, NekDouble> &coord_2)
140 
141  {
142  v_GetCoords(coord_0,coord_1,coord_2);
143  }
144 
145  } //end of namespace
146 } //end of namespace
147 
148 #endif//EXPLIST3DHOMO1D_H
149 
Abstraction of a two-dimensional multi-elemental expansion which is merely a collection of local expa...
static Array< OneD, NekDouble > NullNekDouble1DArray
#define MULTI_REGIONS_EXPORT
virtual void v_WriteTecplotZone(std::ostream &outfile, int expansion)
boost::shared_ptr< SessionReader > SessionReaderSharedPtr
Definition: MeshPartition.h:50
Abstraction of a two-dimensional multi-elemental expansion which is merely a collection of local expa...
std::vector< ExpList2DHomogeneous1DSharedPtr > ExpList2DHomogeneous1DVector
Vector of pointers to ExpList2DHomogeneous1D objects.
std::vector< ExpList2DHomogeneous1DSharedPtr >::iterator ExpList2DHomogeneous1DVectorIter
Iterator for the vector of ExpList2DHomogeneous1D pointers.
virtual void v_GetCoords(Array< OneD, NekDouble > &coord_0, Array< OneD, NekDouble > &coord_1, Array< OneD, NekDouble > &coord_2)
double NekDouble
virtual void v_GetNormals(Array< OneD, Array< OneD, NekDouble > > &normals)
void SetCoeffPhys(void)
Definition of the total number of degrees of freedom and quadrature points. Sets up the storage for m...
boost::shared_ptr< ExpList2DHomogeneous1D > ExpList2DHomogeneous1DSharedPtr
Shared pointer to an ExpList2DHomogeneous1D object.
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:432
virtual void v_WriteVtkPieceHeader(std::ostream &outfile, int expansion, int istrip)
Describes the specification for a Basis.
Definition: Basis.h:50