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
78
79 /**
80 * Changes toAlign quadrature point order, where the realignment is
81 * given by orient, which defines the mapping needed to go between
82 * the original ordering and the new desired ordering.
83 *
84 * @param[in,out] toAlign Data to reorder
85 * @param[in] orient The transformation to perform
86 * @param[in] nquad1 Quadrature points in direction 1
87 * @param[in] nquad2 Quadrature points in direction 2
88 */
90 Array<OneD, int> &toAlign, StdRegions::Orientation orient, int nquad1,
91 int nquad2 = 0);
92
94
95protected:
96 /// Number of physical dirichlet boundary values in trace
98
100
101 /// list of edge expansions for a given element
103
104 void SetUpUniversalDGMap(const ExpList &locExp);
105
106 int v_GetLocalToGlobalMap(const int i) const override;
107
108 int v_GetGlobalToUniversalMap(const int i) const override;
109
110 int v_GetGlobalToUniversalMapUnique(const int i) const override;
111
113
115
117
118 NekDouble v_GetLocalToGlobalSign(const int i) const override;
119
122 bool useComm = false) const override;
123
125 Array<OneD, NekDouble> &loc) const override;
126
127 void v_GlobalToLocal(const NekVector<NekDouble> &global,
128 NekVector<NekDouble> &loc) const override;
129
131 Array<OneD, NekDouble> &global) const override;
132
134 NekVector<NekDouble> &global) const override;
135
136 void v_UniversalAssemble(Array<OneD, NekDouble> &pGlobal) const override;
137
138 void v_UniversalAssemble(NekVector<NekDouble> &pGlobal) const override;
139
140 int v_GetFullSystemBandWidth() const override;
141}; // class
142
143} // namespace Nektar::MultiRegions
144
145#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
Definition: AssemblyMapDG.h:99
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:97
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:99
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