Nektar++
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// 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 1 direction and so
32// uses much of the functionality from a ExpList2D and its daughters
33//
34///////////////////////////////////////////////////////////////////////////////
35
36#ifndef EXPLIST3DHOMO1D_H
37#define EXPLIST3DHOMO1D_H
38
39#include <boost/core/ignore_unused.hpp>
40
43#include <vector>
44
45namespace Nektar
46{
47namespace MultiRegions
48{
49
50// Forward declaration for typedefs
51class ExpList3DHomogeneous1D;
52
53/// Shared pointer to an ExpList3DHomogeneous1D object.
54typedef std::shared_ptr<ExpList3DHomogeneous1D> ExpList3DHomogeneous1DSharedPtr;
55/// Vector of pointers to ExpList3DHomogeneous1D objects.
56typedef std::vector<ExpList3DHomogeneous1DSharedPtr>
58
59/// Abstraction of a two-dimensional multi-elemental expansion which
60/// is merely a collection of local expansions.
62{
63public:
64 /// Default constructor.
66
69 const LibUtilities::BasisKey &HomoBasis, const NekDouble lhom,
70 const bool useFFT, const bool dealiasing);
71
72 /// Sets up a list of local expansions based on an input mesh.
75 const LibUtilities::BasisKey &HomoBasis, const NekDouble lhom,
76 const bool useFFT, const bool dealiasing,
78 const std::string &var = "DefaultVar",
81
82 /// Sets up a list of local expansions based on an mesh expansion
85 const LibUtilities::BasisKey &HomoBasis, const NekDouble lhom,
86 const bool useFFT, const bool dealiasing,
87 const SpatialDomains::ExpansionInfoMap &expansions,
90
91 /// Copy constructor.
93 const ExpList3DHomogeneous1D &In,
94 const bool DeclarePlanesSetCoeffPhys = true);
95
96 /// Constructor copying only elements defined in eIds.
98 const ExpList3DHomogeneous1D &In, const std::vector<unsigned int> &eIDs,
99 const bool DeclarePlanesSetCoeffPhys = true,
100 const Collections::ImplementationType ImpType =
102
103 /// Destructor.
105
106protected:
107 /// Definition of the total number of degrees of freedom and
108 /// quadrature points. Sets up the storage for \a m_coeff and \a
109 /// m_phys.
110 void SetCoeffPhys(void);
111
112 // virtual functions
113 virtual void v_GetCoords(Array<OneD, NekDouble> &coord_0,
114 Array<OneD, NekDouble> &coord_1,
115 Array<OneD, NekDouble> &coord_2) override;
116
117 virtual void v_GetCoords(const int eid, Array<OneD, NekDouble> &xc0,
119 Array<OneD, NekDouble> &xc2) override final;
120
121 virtual void v_WriteTecplotConnectivity(std::ostream &outfile,
122 int expansion) override;
123
124 virtual void v_WriteVtkPieceHeader(std::ostream &outfile, int expansion,
125 int istrip) override;
126
127 virtual NekDouble v_L2(const Array<OneD, const NekDouble> &inarray,
128 const Array<OneD, const NekDouble> &soln =
129 NullNekDouble1DArray) override;
130
132
133 virtual void v_GetPeriodicEntities(PeriodicMap &periodicVerts,
134 PeriodicMap &periodicEdges,
135 PeriodicMap &periodicFaces) override
136 {
137 boost::ignore_unused(periodicFaces);
138 m_planes[0]->GetPeriodicEntities(periodicVerts, periodicEdges);
139 }
140
141private:
143 const SpatialDomains::ExpansionInfoMap &expansions,
144 const Collections::ImplementationType ImpType);
145};
146
147} // namespace MultiRegions
148} // namespace Nektar
149
150#endif // EXPLIST3DHOMO1D_H
#define MULTI_REGIONS_EXPORT
Describes the specification for a Basis.
Definition: Basis.h:47
Abstraction of a two-dimensional multi-elemental expansion which is merely a collection of local expa...
void GenExpList3DHomogeneous1D(const SpatialDomains::ExpansionInfoMap &expansions, const Collections::ImplementationType ImpType)
virtual NekDouble v_L2(const Array< OneD, const NekDouble > &inarray, const Array< OneD, const NekDouble > &soln=NullNekDouble1DArray) override
virtual void v_GetCoords(Array< OneD, NekDouble > &coord_0, Array< OneD, NekDouble > &coord_1, Array< OneD, NekDouble > &coord_2) override
void SetCoeffPhys(void)
Definition of the total number of degrees of freedom and quadrature points. Sets up the storage for m...
virtual Array< OneD, const NekDouble > v_HomogeneousEnergy(void) override
virtual void v_WriteVtkPieceHeader(std::ostream &outfile, int expansion, int istrip) override
virtual void v_WriteTecplotConnectivity(std::ostream &outfile, int expansion) override
virtual void v_GetPeriodicEntities(PeriodicMap &periodicVerts, PeriodicMap &periodicEdges, PeriodicMap &periodicFaces) override
Abstraction of a two-dimensional multi-elemental expansion which is merely a collection of local expa...
Array< OneD, ExpListSharedPtr > m_planes
std::shared_ptr< SessionReader > SessionReaderSharedPtr
std::vector< ExpList3DHomogeneous1DSharedPtr > ExpList3DHomogeneous1DVector
Vector of pointers to ExpList3DHomogeneous1D objects.
std::map< int, std::vector< PeriodicEntity > > PeriodicMap
std::shared_ptr< ExpList3DHomogeneous1D > ExpList3DHomogeneous1DSharedPtr
Shared pointer to an ExpList3DHomogeneous1D object.
std::shared_ptr< MeshGraph > MeshGraphSharedPtr
Definition: MeshGraph.h:176
std::map< int, ExpansionInfoShPtr > ExpansionInfoMap
Definition: MeshGraph.h:143
The above copyright notice and this permission notice shall be included.
Definition: CoupledSolver.h:2
static Array< OneD, NekDouble > NullNekDouble1DArray
double NekDouble