forked from chess-uiuc/Theseus
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEulerOperator.hpp
More file actions
54 lines (46 loc) · 2.03 KB
/
Copy pathEulerOperator.hpp
File metadata and controls
54 lines (46 loc) · 2.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// Copyright (c) 2025-2026 Board of Trustees of the University of Illinois
//
// This file is part of Theseus.
//
// SPDX-License-Identifier: BSD-3-Clause
#pragma once
#include "RHSOperator.hpp"
namespace Theseus
{
template<typename PhysicsT>
class EulerOperator : public RHSOperator<PhysicsT>
{
public:
using Physics = PhysicsT;
using Base = RHSOperator<Physics>;
using OperatorCache = typename Base::OperatorCache;
using DeviceCache = typename Base::DeviceCache;
using Gas = typename Base::Gas;
using InviscidFlux = typename Base::InviscidFlux;
protected:
using Base::operator_cache;
using Base::device_cache;
public:
EulerOperator(std::shared_ptr<mfem::ParFiniteElementSpace> vfes_,
std::shared_ptr<mfem::ParFiniteElementSpace> fes0_,
std::shared_ptr<mfem::ParMesh> pmesh_,
std::shared_ptr<mfem::ParGridFunction> eta_,
std::shared_ptr<mfem::ParGridFunction> alpha_,
std::shared_ptr<Prandtl::PerssonPeraireIndicator> indicator_,
std::shared_ptr<const Gas> gasModel_,
const std::string &gasModelName_,
const std::string &numFluxName_,
std::shared_ptr<mfem::ParGridFunction> r_gf_ = nullptr,
const mfem::real_t alpha_max = 0.5, const mfem::real_t alpha_min = 0.001)
: RHSOperator<PhysicsT>(vfes_, fes0_, pmesh_, eta_, alpha_, indicator_,
gasModel_, gasModelName_, numFluxName_,
"Euler", r_gf_, alpha_max, alpha_min)
{}
~EulerOperator() = default;
mfem::real_t FlowMult(const mfem::Vector &pu, mfem::Vector &pdudt) const override;
mfem::real_t MultEuler_Volume(const mfem::Vector &pu, mfem::Vector &pdudt) const;
mfem::real_t MultEuler_InteriorFaces(const mfem::Vector &pu, mfem::Vector &pdudt) const;
mfem::real_t MultEuler_BoundaryFaces(const mfem::Vector &pu, mfem::Vector &pdudt) const;
};
}
#include "EulerOperator_impl.hpp"