36 #ifndef NEKTAR_LIBS_MULTIREGIONS_DISCONTFIELD1D_H
37 #define NEKTAR_LIBS_MULTIREGIONS_DISCONTFIELD1D_H
46 #include <boost/algorithm/string.hpp>
50 namespace MultiRegions
69 const std::string &variable,
70 const bool SetUpJustDG =
true,
71 const bool DeclareCoeffPhysArrays =
true,
82 const std::string &variable,
83 bool SetToOneSpaceDimensions =
false,
90 const bool DeclareCoeffPhysArrays =
true);
95 const std::string &variable,
96 const bool SetUpJustDG =
false,
97 const bool DeclareCoeffPhysArrays =
true);
203 const std::string variable,
204 const bool DeclareCoeffPhysArrays =
true);
210 const std::string variable);
258 void SetMultiDomainBoundaryConditionExpansion(
261 const std::string variable,
271 const std::string variable);
302 std::shared_ptr<ExpList> &result,
303 const bool DeclareCoeffPhysArrays);
309 const std::string varName =
"",
321 const bool PhysSpaceForcing);
340 bool PutFwdInBwdOnBCs =
false,
341 bool DoExchange =
true);
345 bool PutFwdInBwdOnBCs);
354 void SetUpDG(
const std::string =
"DefaultVar");
378 const std::string &variable);
#define MULTI_REGIONS_EXPORT
This class is the abstractio n of a global discontinuous two- dimensional spectral/hp element expansi...
virtual const Array< OneD, const NekDouble > & v_GetBndCondBwdWeight()
std::vector< int > m_periodicBwdCopy
void GenerateFieldBnd1D(SpatialDomains::BoundaryConditions &bcs, const std::string variable)
PeriodicMap m_periodicEdges
A map which identifies pairs of periodic edges.
PeriodicMap m_periodicFaces
A map which identifies pairs of periodic faces.
Array< OneD, SpatialDomains::BoundaryConditionShPtr > m_bndConditions
An array which contains the information about the boundary condition on the different boundary region...
virtual const LocTraceToTraceMapSharedPtr & v_GetLocTraceToTraceMap(void) const
std::set< int > m_boundaryTraces
A set storing the global IDs of any boundary Verts.
LocTraceToTraceMapSharedPtr m_locTraceToTraceMap
virtual MultiRegions::ExpListSharedPtr & v_UpdateBndCondExpansion(int i)
virtual ~DisContField()
Destructor.
std::vector< bool > m_negatedFluxNormal
SpatialDomains::BoundaryConditionsSharedPtr GetDomainBCs(const SpatialDomains::CompositeMap &domain, const SpatialDomains::BoundaryConditions &Allbcs, const std::string &variable)
AssemblyMapDGSharedPtr m_traceMap
Local to global DG mapping for trace space.
virtual void v_AddTraceIntegralToOffDiag(const Array< OneD, const NekDouble > &FwdFlux, const Array< OneD, const NekDouble > &BwdFlux, Array< OneD, NekDouble > &outarray)
Array< OneD, int > m_BCtoTraceMap
virtual ExpListSharedPtr & v_GetTrace()
GlobalLinSysSharedPtr GetGlobalBndLinSys(const GlobalLinSysKey &mkey)
For a given key, returns the associated global linear system.
virtual AssemblyMapDGSharedPtr & v_GetTraceMap(void)
virtual void v_SetBndCondBwdWeight(const int index, const NekDouble value)
virtual std::map< int, RobinBCInfoSharedPtr > v_GetRobinBCInfo()
int m_numDirBndCondExpansions
The number of boundary segments on which Dirichlet boundary conditions are imposed.
virtual Array< OneD, SpatialDomains::BoundaryConditionShPtr > & v_UpdateBndConditions()
void EvaluateHDGPostProcessing(Array< OneD, NekDouble > &outarray)
Evaluate HDG post-processing to increase polynomial order of solution.
virtual void v_PeriodicBwdCopy(const Array< OneD, const NekDouble > &Fwd, Array< OneD, NekDouble > &Bwd)
virtual const Array< OneD, const MultiRegions::ExpListSharedPtr > & v_GetBndCondExpansions()
NekDouble L2_DGDeriv(const int dir, const Array< OneD, const NekDouble > &soln)
Calculate the error of the derivative using the consistent DG evaluation of .
virtual void v_AddTraceIntegral(const Array< OneD, const NekDouble > &Fn, Array< OneD, NekDouble > &outarray)
Add trace contributions into elemental coefficient spaces.
virtual void v_GetFwdBwdTracePhys(Array< OneD, NekDouble > &Fwd, Array< OneD, NekDouble > &Bwd)
void FindPeriodicTraces(const SpatialDomains::BoundaryConditions &bcs, const std::string variable)
Generate a associative map of periodic vertices in a mesh.
bool SameTypeOfBoundaryConditions(const DisContField &In)
Check to see if expansion has the same BCs as In.
virtual void v_GetLocTraceFromTracePts(const Array< OneD, const NekDouble > &Fwd, const Array< OneD, const NekDouble > &Bwd, Array< OneD, NekDouble > &locTraceFwd, Array< OneD, NekDouble > &locTraceBwd)
Array< OneD, NekDouble > m_bndCondBndWeight
virtual void v_AddFwdBwdTraceIntegral(const Array< OneD, const NekDouble > &Fwd, const Array< OneD, const NekDouble > &Bwd, Array< OneD, NekDouble > &outarray)
Add trace contributions into elemental coefficient spaces.
virtual void v_Reset()
Reset this field, so that geometry information can be updated.
virtual void v_GetBndElmtExpansion(int i, std::shared_ptr< ExpList > &result, const bool DeclareCoeffPhysArrays)
virtual void v_FillBwdWithBwdWeight(Array< OneD, NekDouble > &weightave, Array< OneD, NekDouble > &weightjmp)
Fill the weight with m_bndCondBndWeight.
Array< OneD, MultiRegions::ExpListSharedPtr > m_bndCondExpansions
An object which contains the discretised boundary conditions.
GlobalLinSysMapShPtr m_globalBndMat
Global boundary matrix.
virtual void v_ExtractTracePhys(Array< OneD, NekDouble > &outarray)
PeriodicMap m_periodicVerts
A map which identifies groups of periodic vertices.
virtual void v_AddTraceQuadPhysToField(const Array< OneD, const NekDouble > &Fwd, const Array< OneD, const NekDouble > &Bwd, Array< OneD, NekDouble > &field)
ExpListSharedPtr m_trace
Trace space storage for points between elements.
virtual void v_EvaluateBoundaryConditions(const NekDouble time=0.0, const std::string varName="", const NekDouble x2_in=NekConstants::kNekUnsetDouble, const NekDouble x3_in=NekConstants::kNekUnsetDouble)
Evaluate all boundary conditions at a given time..
virtual void v_GetBoundaryToElmtMap(Array< OneD, int > &ElmtID, Array< OneD, int > &TraceID)
std::vector< bool > & GetNegatedFluxNormal(void)
DisContField()
Default constructor.
virtual void v_GetPeriodicEntities(PeriodicMap &periodicVerts, PeriodicMap &periodicEdges, PeriodicMap &periodicFaces)
Obtain a copy of the periodic edges and vertices for this field.
virtual const Array< OneD, const SpatialDomains::BoundaryConditionShPtr > & v_GetBndConditions()
void SetUpDG(const std::string="DefaultVar")
Set up all DG member variables and maps.
std::vector< int > m_periodicFwdCopy
A vector indicating degress of freedom which need to be copied from forwards to backwards space in ca...
bool IsLeftAdjacentTrace(const int n, const int e)
virtual void v_FillBwdWithBoundCond(const Array< OneD, NekDouble > &Fwd, Array< OneD, NekDouble > &Bwd, bool PutFwdInBwdOnBCs)
std::vector< bool > m_leftAdjacentTraces
Array< OneD, int > m_BCtoElmMap
virtual void v_HelmSolve(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::ConstFactorMap &factors, const StdRegions::VarCoeffMap &varcoeff, const MultiRegions::VarFactorsMap &varfactors, const Array< OneD, const NekDouble > &dirForcing, const bool PhysSpaceForcing)
Solve the Helmholtz equation.
void GenerateBoundaryConditionExpansion(const SpatialDomains::MeshGraphSharedPtr &graph1D, const SpatialDomains::BoundaryConditions &bcs, const std::string variable, const bool DeclareCoeffPhysArrays=true)
Discretises the boundary conditions.
Base class for all multi-elemental spectral/hp expansions.
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points.
Describe a linear system.
std::shared_ptr< SessionReader > SessionReaderSharedPtr
std::shared_ptr< AssemblyMapDG > AssemblyMapDGSharedPtr
static ExpListSharedPtr NullExpListSharedPtr
std::shared_ptr< DisContField > DisContFieldSharedPtr
std::shared_ptr< GlobalLinSys > GlobalLinSysSharedPtr
Pointer to a GlobalLinSys object.
std::shared_ptr< ExpList > ExpListSharedPtr
Shared pointer to an ExpList object.
std::shared_ptr< LocTraceToTraceMap > LocTraceToTraceMapSharedPtr
std::map< StdRegions::ConstFactorType, Array< OneD, NekDouble > > VarFactorsMap
std::map< int, std::vector< PeriodicEntity > > PeriodicMap
std::shared_ptr< GlobalLinSysMap > GlobalLinSysMapShPtr
Pointer to a GlobalLinSys/key map.
static const NekDouble kNekUnsetDouble
std::shared_ptr< BoundaryConditions > BoundaryConditionsSharedPtr
std::shared_ptr< BoundaryConditionBase > BoundaryConditionShPtr
std::map< int, CompositeSharedPtr > CompositeMap
std::shared_ptr< MeshGraph > MeshGraphSharedPtr
std::map< StdRegions::VarCoeffType, Array< OneD, NekDouble > > VarCoeffMap
std::map< ConstFactorType, NekDouble > ConstFactorMap
The above copyright notice and this permission notice shall be included.