Nektar++
AssemblyMapDG.h
Go to the documentation of this file.
1///////////////////////////////////////////////////////////////////////////////
2//
3// File: AssemblyMapDG.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: Local to Global DG mapping routines, header file
32//
33///////////////////////////////////////////////////////////////////////////////
34
35#ifndef MULTIREGIONS_ASSEMBLY_MAP_DG_H
36#define MULTIREGIONS_ASSEMBLY_MAP_DG_H
37
42
44{
45class AssemblyMapDG;
46typedef std::shared_ptr<AssemblyMapDG> AssemblyMapDGSharedPtr;
47
48///
50{
51public:
52 /// Default constructor.
54
55 /// Constructor for trace map for one-dimensional expansion.
59 const ExpListSharedPtr &trace, const ExpList &locExp,
62 &bndCond,
63 const PeriodicMap &periodicTrace,
64 const std::string variable = "DefaultVar");
65
66 /// Destructor.
68
69 /// Return the number of boundary segments on which Dirichlet
70 /// boundary conditions are imposed.
72
74 &GetElmtToTrace(const int i);
75
79
80 /**
81 * Changes toAlign quadrature point order, where the realignment is
82 * given by orient, which defines the mapping needed to go between
83 * the original ordering and the new desired ordering.
84 *
85 * @param[in,out] toAlign Data to reorder
86 * @param[in] orient The transformation to perform
87 * @param[in] nquad1 Quadrature points in direction 1
88 * @param[in] nquad2 Quadrature points in direction 2
89 */
91 Array<OneD, int> &toAlign, StdRegions::Orientation orient, int nquad1,
92 int nquad2 = 0);
93
95
96protected:
97 /// Number of physical dirichlet boundary values in trace
99
101
102 /// list of edge expansions for a given element
104
105 void SetUpUniversalDGMap(const ExpList &locExp);
106
107 int v_GetLocalToGlobalMap(const int i) const override;
108
109 int v_GetGlobalToUniversalMap(const int i) const override;
110
111 int v_GetGlobalToUniversalMapUnique(const int i) const override;
112
114
116
118
119 NekDouble v_GetLocalToGlobalSign(const int i) const override;
120
123 bool useComm = false) const override;
124
126 Array<OneD, NekDouble> &loc) const override;
127
128 void v_GlobalToLocal(const NekVector<NekDouble> &global,
129 NekVector<NekDouble> &loc) const override;
130
132 Array<OneD, NekDouble> &global) const override;
133
135 NekVector<NekDouble> &global) const override;
136
137 void v_UniversalAssemble(Array<OneD, NekDouble> &pGlobal) const override;
138
139 void v_UniversalAssemble(NekVector<NekDouble> &pGlobal) const override;
140
141 int v_GetFullSystemBandWidth() const override;
142}; // class
143
144} // namespace Nektar::MultiRegions
145
146#endif // MULTIREGIONS_ASSEMBLY_MAP_DG_H
#define MULTI_REGIONS_EXPORT
Array< OneD, Array< OneD, LocalRegions::ExpansionSharedPtr > > m_elmtToTrace
list of edge expansions for a given element
const Array< OneD, const int > & v_GetGlobalToUniversalMap() override
void v_LocalToGlobal(const Array< OneD, const NekDouble > &loc, Array< OneD, NekDouble > &global, bool useComm=false) const override
void v_GlobalToLocal(const Array< OneD, const NekDouble > &global, Array< OneD, NekDouble > &loc) const override
static void RealignTraceElement(Array< OneD, int > &toAlign, StdRegions::Orientation orient, int nquad1, int nquad2=0)
AssemblyCommDGSharedPtr m_assemblyComm
Array< OneD, Array< OneD, LocalRegions::ExpansionSharedPtr > > & GetElmtToTrace()
const Array< OneD, const int > & v_GetLocalToGlobalMap() override
AssemblyCommDGSharedPtr GetAssemblyCommDG()
int GetNumDirichletBndPhys()
Return the number of boundary segments on which Dirichlet boundary conditions are imposed.
void v_Assemble(const Array< OneD, const NekDouble > &loc, Array< OneD, NekDouble > &global) const override
void SetUpUniversalDGMap(const ExpList &locExp)
int m_numDirichletBndPhys
Number of physical dirichlet boundary values in trace.
Definition: AssemblyMapDG.h:98
const Array< OneD, const int > & v_GetGlobalToUniversalMapUnique() override
void v_UniversalAssemble(Array< OneD, NekDouble > &pGlobal) const override
int v_GetFullSystemBandWidth() const override
~AssemblyMapDG() override
Destructor.
AssemblyMapDG()
Default constructor.
Base class for constructing local to global mapping of degrees of freedom.
Definition: AssemblyMap.h:56
virtual const Array< OneD, NekDouble > & v_GetLocalToGlobalSign() const
Base class for all multi-elemental spectral/hp expansions.
Definition: ExpList.h:98
std::shared_ptr< SessionReader > SessionReaderSharedPtr
std::shared_ptr< AssemblyMapDG > AssemblyMapDGSharedPtr
Definition: AssemblyMapDG.h:46
std::shared_ptr< AssemblyCommDG > AssemblyCommDGSharedPtr
std::shared_ptr< ExpList > ExpListSharedPtr
Shared pointer to an ExpList object.
std::map< int, std::vector< PeriodicEntity > > PeriodicMap
std::shared_ptr< MeshGraph > MeshGraphSharedPtr
Definition: MeshGraph.h:174
double NekDouble