Nektar++
Loading...
Searching...
No Matches
GJPStabilisation.h
Go to the documentation of this file.
1///////////////////////////////////////////////////////////////////////////////
2//
3// File: GJPStabilisation.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: GJP data
32//
33///////////////////////////////////////////////////////////////////////////////
34
35#ifndef NEKTAR_LIBS_MULTIREGIONS_GJPSTABILISATION_H
36#define NEKTAR_LIBS_MULTIREGIONS_GJPSTABILISATION_H
37
42
44{
45
53
55{
56public:
58
60
62 const Array<OneD, NekDouble> &inarray, Array<OneD, NekDouble> &outarray,
64 const NekDouble scale = 1.0) const;
65
70
71 int GetNumTracePts(void) const
72 {
73 return m_dgfield->GetTrace()->GetTotPoints();
74 }
75
76 bool IsSemiImplicit() const
77 {
79 }
80
81 bool IsExplicit() const
82 {
83 return (m_formulation == eGJPExplicit);
84 }
85
86 bool IsImplicit() const
87 {
88 return (m_formulation == eGJPImplicit);
89 }
90
92
93private:
94 unsigned m_coordDim;
95 unsigned m_traceDim;
98 static std::string GJPStabilisationLookupIds[];
99
100 // Trace normals
102
103 /// DG expansion for projection evalaution along trace
105
106 /// Scale factor for phys values along trace involving the local
107 /// normals and geometric factors
109
111
112 /// phys offset in trace expannsion of each trace as we loop over elmts
113 std::vector<unsigned> m_traceOffset;
114 /// npoints in local trace expannsion in dir 0
115 std::vector<unsigned> m_locTracePts0;
116 /// npoints in local trace expannsion in dir 1
117 std::vector<unsigned> m_locTracePts1;
118 /// list of the number of traces over an element;
119 std::vector<unsigned> m_ntrace;
120 /// local trace and multiregion dg trace if different (i.e variable p and
121 /// BC trace)
122 std::map<int, std::pair<LocalRegions::ExpansionSharedPtr,
125
126 std::vector<bool> m_traceFwd;
127
128 std::vector<std::pair<int, Array<OneD, DNekMatSharedPtr>>>
130
131 std::vector<NekDouble> m_locEdgeScale;
132
133 void ConstructLocalTraceJump(const int dir,
135 Array<OneD, NekDouble> &store) const;
136
137 void ConstructLocalTraceJumpSI(const int dir,
140 Array<OneD, NekDouble> &store) const;
141
143 Array<OneD, NekDouble> &out) const;
144
146 Array<OneD, NekDouble> &out) const;
147
150 Array<OneD, NekDouble> &Bwd) const;
151};
152
153typedef std::shared_ptr<GJPStabilisation> GJPStabilisationSharedPtr;
154
155} // namespace Nektar::MultiRegions
156#endif // GJP
#define MULTI_REGIONS_EXPORT
std::vector< unsigned > m_locTracePts1
npoints in local trace expannsion in dir 1
Array< OneD, Array< OneD, NekDouble > > m_traceNormals
void StdDerivOnTraceFromModes(int i, Array< OneD, NekDouble > &in, Array< OneD, NekDouble > &out) const
void Apply(const Array< OneD, NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const Array< OneD, NekDouble > &pUnorm=NullNekDouble1DArray, const NekDouble scale=1.0) const
std::vector< unsigned > m_locTracePts0
npoints in local trace expannsion in dir 0
std::vector< std::pair< int, Array< OneD, DNekMatSharedPtr > > > m_StdDBaseOnTraceMat
void ConstructLocalTraceJump(const int dir, const Array< OneD, const NekDouble > &in, Array< OneD, NekDouble > &store) const
Array< OneD, NekDouble > GetTraceWeightVarFactors(void)
void TraceJumpFromLocTraceNormDeriv(Array< OneD, NekDouble > &normderiv, Array< OneD, NekDouble > &Fwd, Array< OneD, NekDouble > &Bwd) const
std::vector< unsigned > m_ntrace
list of the number of traces over an element;
void IProductwrtStdDerivBaseOnTraceMat(int i, Array< OneD, NekDouble > &in, Array< OneD, NekDouble > &out) const
Array< OneD, Array< OneD, NekDouble > > & GetTraceNormals(void)
std::map< int, std::pair< LocalRegions::ExpansionSharedPtr, LocalRegions::ExpansionSharedPtr > > m_interpTrace
local trace and multiregion dg trace if different (i.e variable p and BC trace)
Array< OneD, NekDouble > m_locTraceWeights
void ConstructLocalTraceJumpSI(const int dir, const Array< OneD, const NekDouble > &Fwd, const Array< OneD, const NekDouble > &Bwd, Array< OneD, NekDouble > &store) const
std::vector< unsigned > m_traceOffset
phys offset in trace expannsion of each trace as we loop over elmts
Array< OneD, Array< OneD, NekDouble > > m_scalTrace
Scale factor for phys values along trace involving the local normals and geometric factors.
MultiRegions::ExpListSharedPtr m_dgfield
DG expansion for projection evalaution along trace.
std::shared_ptr< Expansion > ExpansionSharedPtr
Definition Expansion.h:66
std::shared_ptr< ExpList > ExpListSharedPtr
Shared pointer to an ExpList object.
std::shared_ptr< GJPStabilisation > GJPStabilisationSharedPtr
static Array< OneD, NekDouble > NullNekDouble1DArray