Nektar++
Expansion1D.h
Go to the documentation of this file.
1///////////////////////////////////////////////////////////////////////////////
2//
3// File: Expansion1D.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: Header file for Expansion1D routines
32//
33///////////////////////////////////////////////////////////////////////////////
34
35#ifndef EXPANSION1D_H
36#define EXPANSION1D_H
37
42
44{
45class Expansion2D;
46typedef std::shared_ptr<Expansion2D> Expansion2DSharedPtr;
47typedef std::weak_ptr<Expansion2D> Expansion2DWeakPtr;
48
49class Expansion1D;
50typedef std::shared_ptr<Expansion1D> Expansion1DSharedPtr;
51typedef std::weak_ptr<Expansion1D> Expansion1DWeakPtr;
52typedef std::vector<Expansion1DSharedPtr> Expansion1DVector;
53
54class Expansion1D : virtual public Expansion,
55 virtual public StdRegions::StdExpansion1D
56{
57public:
59 : Expansion(pGeom), StdExpansion1D()
60 {
61 }
62
63 LOCAL_REGIONS_EXPORT ~Expansion1D() override = default;
64
66 const int dir, Array<OneD, const NekDouble> &inarray,
67 Array<OneD, NekDouble> &outarray);
68
70 const Array<OneD, const NekDouble> &inarray,
71 Array<OneD, NekDouble> &outarray);
72
74
75protected:
77
78 void v_AddRobinMassMatrix(const int vert,
79 const Array<OneD, const NekDouble> &primCoeffs,
80 DNekMatSharedPtr &inoutmat) override;
81
83 const int vert, const Array<OneD, const NekDouble> &primCoeffs,
84 const Array<OneD, NekDouble> &incoeffs,
85 Array<OneD, NekDouble> &coeffs) override;
86
88 const Array<OneD, Array<OneD, NekDouble>> &vec) override;
89
93 Array<OneD, Array<OneD, NekDouble>> &d1factors) override;
94
96 Array<OneD, int> &idmap, const int nq0,
97 const int nq1) override;
98
99 void v_TraceNormLen(const int traceid, NekDouble &h, NekDouble &p) override;
100
101private:
102};
103
105{
106 return std::dynamic_pointer_cast<SpatialDomains ::Geometry1D>(m_geom);
107}
108} // namespace Nektar::LocalRegions
109
110#endif
#define LOCAL_REGIONS_EXPORT
void v_AddRobinTraceContribution(const int vert, const Array< OneD, const NekDouble > &primCoeffs, const Array< OneD, NekDouble > &incoeffs, Array< OneD, NekDouble > &coeffs) override
void v_ReOrientTracePhysMap(const StdRegions::Orientation orient, Array< OneD, int > &idmap, const int nq0, const int nq1) override
void AddHDGHelmholtzTraceTerms(const NekDouble tau, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
void v_AddRobinMassMatrix(const int vert, const Array< OneD, const NekDouble > &primCoeffs, DNekMatSharedPtr &inoutmat) override
void AddNormTraceInt(const int dir, Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
NekDouble v_VectorFlux(const Array< OneD, Array< OneD, NekDouble > > &vec) override
Expansion1D(SpatialDomains::Geometry1DSharedPtr pGeom)
Definition: Expansion1D.h:58
SpatialDomains::Geometry1DSharedPtr GetGeom1D() const
Definition: Expansion1D.h:104
void v_TraceNormLen(const int traceid, NekDouble &h, NekDouble &p) override
void v_NormalTraceDerivFactors(Array< OneD, Array< OneD, NekDouble > > &factors, Array< OneD, Array< OneD, NekDouble > > &d0factors, Array< OneD, Array< OneD, NekDouble > > &d1factors) override
: This method gets all of the factors which are required as part of the Gradient Jump Penalty stabili...
DNekMatSharedPtr v_GenMatrix(const StdRegions::StdMatrixKey &mkey) override
Definition: Expansion1D.cpp:43
SpatialDomains::GeometrySharedPtr m_geom
Definition: Expansion.h:273
std::weak_ptr< Expansion2D > Expansion2DWeakPtr
Definition: Expansion1D.h:47
std::vector< Expansion1DSharedPtr > Expansion1DVector
Definition: Expansion1D.h:52
std::shared_ptr< Expansion2D > Expansion2DSharedPtr
Definition: Expansion1D.h:46
std::shared_ptr< Expansion1D > Expansion1DSharedPtr
Definition: Expansion1D.h:50
std::weak_ptr< Expansion1D > Expansion1DWeakPtr
Definition: Expansion1D.h:51
std::shared_ptr< Geometry1D > Geometry1DSharedPtr
Definition: Geometry.h:61
StdRegions::ConstFactorMap factors
std::shared_ptr< DNekMat > DNekMatSharedPtr
Definition: NekTypeDefs.hpp:75
double NekDouble