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
41#include <vector>
42
44{
45
46// Forward declaration for typedefs
47class ExpList3DHomogeneous1D;
48
49/// Shared pointer to an ExpList3DHomogeneous1D object.
50typedef std::shared_ptr<ExpList3DHomogeneous1D> ExpList3DHomogeneous1DSharedPtr;
51/// Vector of pointers to ExpList3DHomogeneous1D objects.
52typedef std::vector<ExpList3DHomogeneous1DSharedPtr>
54
55/// Abstraction of a two-dimensional multi-elemental expansion which
56/// is merely a collection of local expansions.
58{
59public:
60 /// Default constructor.
62
65 const LibUtilities::BasisKey &HomoBasis, const NekDouble lhom,
66 const bool useFFT, const bool dealiasing);
67
68 /// Sets up a list of local expansions based on an input mesh.
71 const LibUtilities::BasisKey &HomoBasis, const NekDouble lhom,
72 const bool useFFT, const bool dealiasing,
74 const std::string &var = "DefaultVar",
77
78 /// Sets up a list of local expansions based on an mesh expansion
81 const LibUtilities::BasisKey &HomoBasis, const NekDouble lhom,
82 const bool useFFT, const bool dealiasing,
83 const SpatialDomains::ExpansionInfoMap &expansions,
86
87 /// Copy constructor.
89 const ExpList3DHomogeneous1D &In,
90 const bool DeclarePlanesSetCoeffPhys = true);
91
92 /// Constructor copying only elements defined in eIds.
94 const ExpList3DHomogeneous1D &In, const std::vector<unsigned int> &eIDs,
95 const bool DeclarePlanesSetCoeffPhys = true,
98
99 /// Destructor.
101
102protected:
103 /// Definition of the total number of degrees of freedom and
104 /// quadrature points. Sets up the storage for \a m_coeff and \a
105 /// m_phys.
106 void SetCoeffPhys(void);
107
108 // virtual functions
110 Array<OneD, NekDouble> &coord_1,
111 Array<OneD, NekDouble> &coord_2) override;
112
113 void v_GetCoords(const int eid, Array<OneD, NekDouble> &xc0,
115 Array<OneD, NekDouble> &xc2) final;
116
117 void v_WriteTecplotConnectivity(std::ostream &outfile,
118 int expansion) override;
119
120 void v_WriteVtkPieceHeader(std::ostream &outfile, int expansion,
121 int istrip) override;
122
124 const Array<OneD, const NekDouble> &soln =
125 NullNekDouble1DArray) override;
126
128
130 PeriodicMap &periodicVerts, PeriodicMap &periodicEdges,
131 [[maybe_unused]] PeriodicMap &periodicFaces) override
132 {
133 m_planes[0]->GetPeriodicEntities(periodicVerts, periodicEdges);
134 }
135
136private:
138 const SpatialDomains::ExpansionInfoMap &expansions,
139 const Collections::ImplementationType ImpType);
140};
141
142} // namespace Nektar::MultiRegions
143
144#endif // EXPLIST3DHOMO1D_H
#define MULTI_REGIONS_EXPORT
Describes the specification for a Basis.
Definition: Basis.h:45
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)
NekDouble v_L2(const Array< OneD, const NekDouble > &inarray, const Array< OneD, const NekDouble > &soln=NullNekDouble1DArray) override
void v_GetPeriodicEntities(PeriodicMap &periodicVerts, PeriodicMap &periodicEdges, PeriodicMap &periodicFaces) override
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...
Array< OneD, const NekDouble > v_HomogeneousEnergy(void) override
void v_WriteVtkPieceHeader(std::ostream &outfile, int expansion, int istrip) override
void v_WriteTecplotConnectivity(std::ostream &outfile, int expansion) 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:174
std::map< int, ExpansionInfoShPtr > ExpansionInfoMap
Definition: MeshGraph.h:141
static Array< OneD, NekDouble > NullNekDouble1DArray
double NekDouble