Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 // 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: Local to Global DG mapping routines, header file
33 //
34 ///////////////////////////////////////////////////////////////////////////////
35 
36 #ifndef MULTIREGIONS_ASSEMBLY_MAP_DG_H
37 #define MULTIREGIONS_ASSEMBLY_MAP_DG_H
38 
41 #include <MultiRegions/ExpList2D.h>
42 #include <MultiRegions/ExpList1D.h>
43 #include <MultiRegions/ExpList0D.h>
44 
45 namespace Nektar
46 {
47  namespace MultiRegions
48  {
50  typedef boost::shared_ptr<AssemblyMapDG> AssemblyMapDGSharedPtr;
51 
52  ///
53  class AssemblyMapDG: public AssemblyMap
54  {
55  public:
56  /// Default constructor.
58 
59  /// Constructor for trace map for one-dimensional expansion.
63  const ExpListSharedPtr &trace,
64  const ExpList &locExp,
66  &bndConstraint,
68  &bndCond,
69  const PeriodicMap &periodicTrace,
70  const std::string variable = "DefaultVar");
71 
72  /// Destructor.
74 
75  /// Return the number of boundary segments on which Dirichlet
76  /// boundary conditions are imposed.
78 
80  &GetElmtToTrace(const int i);
81 
84  &GetElmtToTrace();
85 
87 
89 
91  Array<OneD, NekDouble> &pGlobal) const;
92 
93  protected:
95 
96  /// Number of physical dirichlet boundary values in trace
98 
99  /// list of edge expansions for a given element
101  /// Integer map of process trace space quadrature points to
102  /// universal space.
104  /// Integer map of unique process trace space quadrature points to
105  /// universal space (signed).
107 
108  void SetUpUniversalDGMap(const ExpList &locExp);
109 
111  const ExpList &locExp,
112  const ExpListSharedPtr trace,
113  const PeriodicMap &perMap = NullPeriodicMap);
114 
115  virtual int v_GetLocalToGlobalMap(const int i) const;
116 
117  virtual int v_GetGlobalToUniversalMap(const int i) const;
118 
119  virtual int v_GetGlobalToUniversalMapUnique(const int i) const;
120 
122 
124 
126 
127  virtual NekDouble v_GetLocalToGlobalSign(const int i) const;
128 
129  virtual void v_LocalToGlobal(
130  const Array<OneD, const NekDouble>& loc,
131  Array<OneD, NekDouble>& global,
132  bool useComm) const;
133 
134  virtual void v_LocalToGlobal(
135  const NekVector<NekDouble>& loc,
136  NekVector< NekDouble>& global,
137  bool useComm) const;
138 
139  virtual void v_GlobalToLocal(
140  const Array<OneD, const NekDouble>& global,
141  Array<OneD, NekDouble>& loc) const;
142 
143  virtual void v_GlobalToLocal(
144  const NekVector<NekDouble>& global,
145  NekVector< NekDouble>& loc) const;
146 
147  virtual void v_Assemble(
148  const Array<OneD, const NekDouble> &loc,
149  Array<OneD, NekDouble> &global) const;
150 
151  virtual void v_Assemble(
152  const NekVector<NekDouble>& loc,
153  NekVector< NekDouble>& global) const;
154 
155  virtual void v_UniversalAssemble(
156  Array<OneD, NekDouble>& pGlobal) const;
157 
158  virtual void v_UniversalAssemble(
159  NekVector< NekDouble>& pGlobal) const;
160 
161  virtual int v_GetFullSystemBandWidth() const;
162 
163  void RealignTraceElement(
164  Array<OneD, int> &toAlign,
166  int nquad1,
167  int nquad2 = 0);
168  }; // class
169 
170 
171  } // end of namespace
172 } // end of namespace
173 
174 #endif //MULTIREGIONS_ASSEMBLY_MAP_DG_H
boost::shared_ptr< AssemblyMapDG > AssemblyMapDGSharedPtr
Definition: AssemblyMapDG.h:49
AssemblyMapDG()
Default constructor.
virtual void v_Assemble(const Array< OneD, const NekDouble > &loc, Array< OneD, NekDouble > &global) const
#define MULTI_REGIONS_EXPORT
boost::shared_ptr< SessionReader > SessionReaderSharedPtr
Definition: MeshPartition.h:51
Array< OneD, int > m_traceToUniversalMap
Integer map of process trace space quadrature points to universal space.
Base class for constructing local to global mapping of degrees of freedom.
Definition: AssemblyMap.h:59
void UniversalTraceAssemble(Array< OneD, NekDouble > &pGlobal) const
virtual void v_UniversalAssemble(Array< OneD, NekDouble > &pGlobal) const
Base class for all multi-elemental spectral/hp expansions.
Definition: ExpList.h:101
Array< OneD, Array< OneD, LocalRegions::ExpansionSharedPtr > > & GetElmtToTrace()
virtual const Array< OneD, const int > & v_GetGlobalToUniversalMapUnique()
void SetUpUniversalTraceMap(const ExpList &locExp, const ExpListSharedPtr trace, const PeriodicMap &perMap=NullPeriodicMap)
static PeriodicMap NullPeriodicMap
virtual const Array< OneD, const int > & v_GetLocalToGlobalMap()
boost::shared_ptr< ExpList > ExpListSharedPtr
Shared pointer to an ExpList object.
void SetUpUniversalDGMap(const ExpList &locExp)
double NekDouble
std::map< int, std::vector< PeriodicEntity > > PeriodicMap
virtual ~AssemblyMapDG()
Destructor.
Array< OneD, int > m_traceToUniversalMapUnique
Integer map of unique process trace space quadrature points to universal space (signed).
Array< OneD, Array< OneD, LocalRegions::ExpansionSharedPtr > > m_elmtToTrace
list of edge expansions for a given element
virtual void v_GlobalToLocal(const Array< OneD, const NekDouble > &global, Array< OneD, NekDouble > &loc) const
virtual void v_LocalToGlobal(const Array< OneD, const NekDouble > &loc, Array< OneD, NekDouble > &global, bool useComm) const
virtual const Array< OneD, NekDouble > & v_GetLocalToGlobalSign() const
virtual const Array< OneD, const int > & v_GetGlobalToUniversalMap()
boost::shared_ptr< MeshGraph > MeshGraphSharedPtr
Definition: MeshGraph.h:442
void RealignTraceElement(Array< OneD, int > &toAlign, StdRegions::Orientation orient, int nquad1, int nquad2=0)
int GetNumDirichletBndPhys()
Return the number of boundary segments on which Dirichlet boundary conditions are imposed...
int m_numDirichletBndPhys
Number of physical dirichlet boundary values in trace.
Definition: AssemblyMapDG.h:97
virtual int v_GetFullSystemBandWidth() const