Nektar++
Loading...
Searching...
No Matches
edesign/EquationSystems/EulerCFE.h
Go to the documentation of this file.
1///////////////////////////////////////////////////////////////////////////////
2//
3// File: EulerCFE.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: Euler equations in consÆ’ervative variables without artificial
32// diffusion
33//
34///////////////////////////////////////////////////////////////////////////////
35
36#pragma once
37
39#include <SolverCore/EquationSystems/UnsteadySystem.h>
40
41namespace Nektar
42{
43template <typename TData> class CFLVelocityCFEOp;
44
45namespace MultiRegions
46{
47template <typename TData> class IProductWRTBaseOp;
48template <typename TData> class MultiplyByElmtInvMassOp;
49} // namespace MultiRegions
50
51namespace SolverCore
52{
53template <typename TData> class AdvectionWeakDGOp;
54} // namespace SolverCore
55
56using namespace SolverCore;
57using namespace MultiRegions;
58
59class EulerCFE : public UnsteadySystem
60{
61public:
62 friend class MemoryManager<EulerCFE>;
63
64 /// Creates an instance of this class
68 {
71 equ->InitObject();
72 return equ;
73 }
74
75 /// Name of class
76 static std::string className;
77
78protected:
79 // Initialise operators
80 std::shared_ptr<AdvectionWeakDGOp<double>> m_advectionWeakDGOp;
81 std::shared_ptr<CFLVelocityCFEOp<double>> m_cflVelocityOp;
82 // Element-local projection of the solution to coefficients for output.
83 std::shared_ptr<IProductWRTBaseOp<double>> m_iProductWRTBaseOp;
84 std::shared_ptr<MultiplyByElmtInvMassOp<double>> m_multiplyByElmtInvMassOp;
86
89
90 ~EulerCFE() override = default;
91
94 const double &time);
95
98 [[maybe_unused]] const double &time,
99 [[maybe_unused]] const double &factor);
100
101 void v_InitObject(bool declareExpansionLists = true) override;
102
103 /// Attach the boundary conditions this system supports.
105
106 void v_GenerateSummary(SummaryList &s) override;
107
109
110 void v_InitialiseOperators() override;
111
112 /// Project the solution to coefficients and return views of them.
113 CoefficientFieldViews v_GetOutputFieldViews() override;
114
115 CFLVelocity v_GetCFLVelocity() override;
116};
117
118} // namespace Nektar
void SetUpBoundaryConditions()
Attach the boundary conditions this system supports.
void DoProjection(LibUtilities::Field< double, FieldState::Phys > &in, LibUtilities::Field< double, FieldState::Phys > &out, const double &time)
Project onto the solution space, which for DG is a copy.
static EquationSystemSharedPtr create(const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph)
Creates an instance of this class.
CoefficientFieldViews v_GetOutputFieldViews() override
Project the solution to coefficients and return views of them.
void DoAdvection(LibUtilities::Field< double, FieldState::Phys > &in, LibUtilities::Field< double, FieldState::Phys > &out, const double &time, const double &factor)
CFLVelocity v_GetCFLVelocity() override
Supply the Courant estimate with the compressible wave speed.
LibUtilities::Field< double, FieldState::Phys > m_cflVelocity
std::shared_ptr< AdvectionWeakDGOp< double > > m_advectionWeakDGOp
static std::string className
Name of class.
std::shared_ptr< CFLVelocityCFEOp< double > > m_cflVelocityOp
std::shared_ptr< IProductWRTBaseOp< double > > m_iProductWRTBaseOp
void LoadSessionParameters()
~EulerCFE() override=default
EulerCFE(const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph)
std::shared_ptr< MultiplyByElmtInvMassOp< double > > m_multiplyByElmtInvMassOp
void v_GenerateSummary(SummaryList &s) override
Print a summary of time stepping parameters.
void v_InitObject(bool declareExpansionLists=true) override
Initialization object for CompressibleFlowSystem class.
A Field represents expansion data to be operated on.
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
std::shared_ptr< SessionReader > SessionReaderSharedPtr
std::vector< std::pair< std::string, std::string > > SummaryList
Definition Misc.h:46
std::shared_ptr< EquationSystem > EquationSystemSharedPtr
A shared pointer to an EquationSystem object.
std::shared_ptr< MeshGraph > MeshGraphSharedPtr
Definition MeshGraph.h:287