Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ExpList3DHomogeneous1D.h
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 // File ExpList3DHomogeneous1D.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 1 direction and so
33 // uses much of the functionality from a ExpList2D and its daughters
34 //
35 ///////////////////////////////////////////////////////////////////////////////
36 
37 #ifndef EXPLIST3DHOMO1D_H
38 #define EXPLIST3DHOMO1D_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 ExpList3DHomogeneous1D object.
53  typedef boost::shared_ptr<ExpList3DHomogeneous1D> ExpList3DHomogeneous1DSharedPtr;
54  /// Vector of pointers to ExpList3DHomogeneous1D objects.
55  typedef std::vector< ExpList3DHomogeneous1DSharedPtr > ExpList3DHomogeneous1DVector;
56  /// Iterator for the vector of ExpList3DHomogeneous1D pointers.
58 
59  /// Abstraction of a two-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,
70  const NekDouble lhom,
71  const bool useFFT,
72  const bool dealiasing);
73 
74  /// Sets up a list of local expansions based on an input mesh.
77  const LibUtilities::BasisKey &HomoBasis,
78  const NekDouble lhom,
79  const bool useFFT,
80  const bool dealiasing,
82  const std::string &var = "DefaultVar");
83 
84  /// Sets up a list of local expansions based on an mesh expansion
87  const LibUtilities::BasisKey &HomoBasis,
88  const NekDouble lhom,
89  const bool useFFT,
90  const bool dealiasing,
91  const SpatialDomains::ExpansionMap &expansions);
92 
93  /// Copy constructor.
95  const ExpList3DHomogeneous1D &In,
96  const bool DeclarePlanesSetCoeffPhys = true);
97 
98  /// Constructor copying only elements defined in eIds.
100  const ExpList3DHomogeneous1D &In,
101  const std::vector<unsigned int> &eIDs,
102  const bool DeclarePlanesSetCoeffPhys = true);
103 
104  /// Destructor.
106 
107  /// This function calculates the coordinates of all the elemental
108  /// quadrature points \f$\boldsymbol{x}_i\f$.
109  inline void GetCoords(Array<OneD, NekDouble> &coord_0,
112 
113  MULTI_REGIONS_EXPORT void GetCoords(const int eid,
117 
118  protected:
119 
120  /// Definition of the total number of degrees of freedom and
121  /// quadrature points. Sets up the storage for \a m_coeff and \a
122  /// m_phys.
123  void SetCoeffPhys(void);
124 
125  // virtual functions
126  virtual void v_GetCoords(Array<OneD, NekDouble> &coord_0,
127  Array<OneD, NekDouble> &coord_1,
128  Array<OneD, NekDouble> &coord_2);
129 
130  virtual void v_WriteTecplotConnectivity(std::ostream &outfile,
131  int expansion);
132 
133  virtual void v_WriteVtkPieceHeader(std::ostream &outfile,
134  int expansion, int istrip);
135 
136  virtual NekDouble v_L2(
137  const Array<OneD, const NekDouble> &inarray,
139 
141 
142  virtual void v_GetPeriodicEntities(
143  PeriodicMap &periodicVerts,
144  PeriodicMap &periodicEdges,
145  PeriodicMap &periodicFaces)// default argument for dimension compatibility
146 
147  {
148  m_planes[0]->GetPeriodicEntities(periodicVerts,periodicEdges);
149  }
150 
151  private:
152 
154 
155 
156  };
157 
159  Array<OneD, NekDouble> &coord_1,
160  Array<OneD, NekDouble> &coord_2)
161 
162  {
163  v_GetCoords(coord_0,coord_1,coord_2);
164  }
165  } //end of namespace
166 } //end of namespace
167 
168 #endif//EXPLIST3DHOMO1D_H
169 
Abstraction of a two-dimensional multi-elemental expansion which is merely a collection of local expa...
virtual void v_WriteTecplotConnectivity(std::ostream &outfile, int expansion)
virtual void v_GetPeriodicEntities(PeriodicMap &periodicVerts, PeriodicMap &periodicEdges, PeriodicMap &periodicFaces)
virtual Array< OneD, const NekDouble > v_HomogeneousEnergy(void)
static Array< OneD, NekDouble > NullNekDouble1DArray
std::vector< ExpList3DHomogeneous1DSharedPtr > ExpList3DHomogeneous1DVector
Vector of pointers to ExpList3DHomogeneous1D objects.
#define MULTI_REGIONS_EXPORT
void GenExpList3DHomogeneous1D(const SpatialDomains::ExpansionMap &expansions)
boost::shared_ptr< SessionReader > SessionReaderSharedPtr
Definition: MeshPartition.h:51
virtual void v_GetCoords(Array< OneD, NekDouble > &coord_0, Array< OneD, NekDouble > &coord_1, Array< OneD, NekDouble > &coord_2)
void SetCoeffPhys(void)
Definition of the total number of degrees of freedom and quadrature points. Sets up the storage for m...
Array< OneD, ExpListSharedPtr > m_planes
double NekDouble
std::map< int, std::vector< PeriodicEntity > > PeriodicMap
virtual void v_WriteVtkPieceHeader(std::ostream &outfile, int expansion, int istrip)
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 . ...
virtual NekDouble v_L2(const Array< OneD, const NekDouble > &inarray, const Array< OneD, const NekDouble > &soln=NullNekDouble1DArray)
std::vector< ExpList3DHomogeneous1DSharedPtr >::iterator ExpList3DHomogeneous1DVectorIter
Iterator for the vector of ExpList3DHomogeneous1D pointers.
boost::shared_ptr< ExpList3DHomogeneous1D > ExpList3DHomogeneous1DSharedPtr
Shared pointer to an ExpList3DHomogeneous1D object.
boost::shared_ptr< MeshGraph > MeshGraphSharedPtr
Definition: MeshGraph.h:442
Abstraction of a two-dimensional multi-elemental expansion which is merely a collection of local expa...
Describes the specification for a Basis.
Definition: Basis.h:50
std::map< int, ExpansionShPtr > ExpansionMap
Definition: MeshGraph.h:174