Skip to content

Commit

Permalink
Revert "removing a few things"
Browse files Browse the repository at this point in the history
This reverts commit 47f1109.
  • Loading branch information
adityakpandare committed Mar 8, 2023
1 parent 490bd6b commit 7e9d467
Show file tree
Hide file tree
Showing 11 changed files with 394 additions and 96 deletions.
272 changes: 272 additions & 0 deletions src/Control/CommonGrammar.hpp

Large diffs are not rendered by default.

162 changes: 94 additions & 68 deletions src/Control/Inciter/InputDeck/Grammar.hpp

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions src/Control/Inciter/Options/Flux.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ namespace inciter {
namespace ctr {

//! Flux types
enum class FluxType : uint8_t { HLLC
, LaxFriedrichs
enum class FluxType : uint8_t { LaxFriedrichs
, HLLC
, UPWIND
, AUSM
, HLL
Expand All @@ -38,8 +38,8 @@ class Flux : public tk::Toggle< FluxType > {

public:
//! Valid expected choices to make them also available at compile-time
using keywords = brigand::list< kw::hllc
, kw::laxfriedrichs
using keywords = brigand::list< kw::laxfriedrichs
, kw::hllc
, kw::upwind
, kw::ausm
, kw::hll
Expand All @@ -53,15 +53,15 @@ class Flux : public tk::Toggle< FluxType > {
//! Group, i.e., options, name
kw::flux::name(),
//! Enums -> names (if defined, policy codes, if not, name)
{ { FluxType::HLLC, kw::hllc::name() }
, { FluxType::LaxFriedrichs, kw::laxfriedrichs::name() }
{ { FluxType::LaxFriedrichs, kw::laxfriedrichs::name() }
, { FluxType::HLLC, kw::hllc::name() }
, { FluxType::UPWIND, kw::upwind::name() }
, { FluxType::AUSM, kw::ausm::name() }
, { FluxType::HLL, kw::hll::name() }
},
//! keywords -> Enums
{ { kw::hllc::string(), FluxType::HLLC }
, { kw::laxfriedrichs::string(), FluxType::LaxFriedrichs }
{ { kw::laxfriedrichs::string(), FluxType::LaxFriedrichs }
, { kw::hllc::string(), FluxType::HLLC }
, { kw::upwind::string(), FluxType::UPWIND }
, { kw::ausm::string(), FluxType::AUSM }
, { kw::hll::string(), FluxType::HLL }
Expand Down
16 changes: 8 additions & 8 deletions src/Control/Inciter/Types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -371,8 +371,8 @@ using SpongeParameters = tk::TaggedTuple< brigand::list<
using TransportPDEParameters = tk::TaggedTuple< brigand::list<
tag::depvar, std::vector< char >
, tag::mesh, mesh
, tag::physics, PhysicsType
, tag::problem, ProblemType
, tag::physics, std::vector< PhysicsType >
, tag::problem, std::vector< ProblemType >
, tag::diffusivity, std::vector< std::vector<
kw::pde_diffusivity::info::expect::type > >
, tag::lambda, std::vector< std::vector<
Expand Down Expand Up @@ -431,8 +431,8 @@ using material = tk::TaggedTuple< brigand::list<
using CompFlowPDEParameters = tk::TaggedTuple< brigand::list<
tag::depvar, std::vector< char >
, tag::mesh, mesh
, tag::physics, PhysicsType
, tag::problem, ProblemType
, tag::physics, std::vector< PhysicsType >
, tag::problem, std::vector< ProblemType >
, tag::farfield_pressure, std::vector< kw::pressure::info::expect::type >
, tag::farfield_density, std::vector< kw::density::info::expect::type >
, tag::farfield_velocity, std::vector< std::vector<
Expand Down Expand Up @@ -475,7 +475,7 @@ using CompFlowPDEParameters = tk::TaggedTuple< brigand::list<
tag::eosidx, std::vector< std::size_t >,
tag::matidx, std::vector< std::size_t > > >
//! Flux function type
, tag::flux, FluxType
, tag::flux, std::vector< FluxType >
//! Lua code (multiple blocks)
, tag::lua, std::vector< std::string >
> >;
Expand All @@ -484,8 +484,8 @@ using CompFlowPDEParameters = tk::TaggedTuple< brigand::list<
using MultiMatPDEParameters = tk::TaggedTuple< brigand::list<
tag::depvar, std::vector< char >
, tag::mesh, mesh
, tag::physics, PhysicsType
, tag::problem, ProblemType
, tag::physics, std::vector< PhysicsType >
, tag::problem, std::vector< ProblemType >
, tag::bc, bc
, tag::bctimedep, std::vector< std::vector< time_dependent_bc > >
, tag::ic, ic
Expand Down Expand Up @@ -538,7 +538,7 @@ using MultiMatPDEParameters = tk::TaggedTuple< brigand::list<
, tag::intsharp_param,
std::vector< kw::intsharp_param::info::expect::type >
//! Flux function type
, tag::flux, FluxType
, tag::flux, std::vector< FluxType >
> >;

//! Parameters storage
Expand Down
2 changes: 1 addition & 1 deletion src/PDE/CompFlow/DGCompFlow.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class CompFlow {
m_system( c ),
m_ncomp( g_inputdeck.get< tag::component, eq >().at(c) ),
m_riemann( compflowRiemannSolver(
g_inputdeck.get< tag::param, tag::compflow, tag::flux >() ) )
g_inputdeck.get< tag::param, tag::compflow, tag::flux >().at(m_system) ) )
{
// associate boundary condition configurations with state functions, the
// order in which the state functions listed matters, see ctr::bc::Keys
Expand Down
6 changes: 3 additions & 3 deletions src/PDE/ConfigureCompFlow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,18 +86,18 @@ infoCompFlow( std::map< ctr::PDEType, tk::ctr::ncomp_t >& cnt )
infoMesh< eq >( c, nfo );

nfo.emplace_back( "physics", ctr::Physics().name(
g_inputdeck.get< tag::param, eq, tag::physics >() ) );
g_inputdeck.get< tag::param, eq, tag::physics >()[c] ) );

nfo.emplace_back( "problem", ctr::Problem().name(
g_inputdeck.get< tag::param, eq, tag::problem >() ) );
g_inputdeck.get< tag::param, eq, tag::problem >()[c] ) );

auto ncomp = g_inputdeck.get< tag::component >().get< eq >()[c];
nfo.emplace_back( "number of components", parameter( ncomp ) );

const auto scheme = g_inputdeck.get< tag::discr, tag::scheme >();
if (scheme != ctr::SchemeType::DiagCG && scheme != ctr::SchemeType::ALECG)
nfo.emplace_back( "flux", ctr::Flux().name(
g_inputdeck.get< tag::param, eq, tag::flux >() ) );
g_inputdeck.get< tag::param, eq, tag::flux >().at(c) ) );

// Material property output
const auto& matprop = g_inputdeck.get< tag::param, eq, tag::material >()[c][0];
Expand Down
6 changes: 3 additions & 3 deletions src/PDE/ConfigureMultiMat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,13 @@ infoMultiMat( std::map< ctr::PDEType, tk::ctr::ncomp_t >& cnt )
infoMesh< eq >( c, nfo );

nfo.emplace_back( "physics", ctr::Physics().name(
g_inputdeck.get< tag::param, eq, tag::physics >() ) );
g_inputdeck.get< tag::param, eq, tag::physics >()[c] ) );

nfo.emplace_back( "problem", ctr::Problem().name(
g_inputdeck.get< tag::param, eq, tag::problem >() ) );
g_inputdeck.get< tag::param, eq, tag::problem >()[c] ) );

nfo.emplace_back( "flux", ctr::Flux().name(
g_inputdeck.get< tag::param, eq, tag::flux >() ) );
g_inputdeck.get< tag::param, eq, tag::flux >().at(c) ) );

auto nmat = g_inputdeck.get< tag::param, eq, tag::nmat >()[c];
nfo.emplace_back( "number of materials", std::to_string( nmat ) );
Expand Down
2 changes: 1 addition & 1 deletion src/PDE/ConfigureTransport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ infoTransport( std::map< ctr::PDEType, tk::ctr::ncomp_t >& cnt )
infoMesh< eq >( c, nfo );

nfo.emplace_back( "problem", ctr::Problem().name(
g_inputdeck.get< param, eq, tag::problem >() ) );
g_inputdeck.get< param, eq, tag::problem >()[c] ) );

auto intsharp = g_inputdeck.get< tag::param, eq, tag::intsharp >()[c];
nfo.emplace_back( "interface sharpening", std::to_string( intsharp ) );
Expand Down
2 changes: 1 addition & 1 deletion src/PDE/MultiMat/DGMultiMat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class MultiMat {
m_system( c ),
m_ncomp( g_inputdeck.get< tag::component, eq >().at(c) ),
m_riemann( multimatRiemannSolver(
g_inputdeck.get< tag::param, tag::multimat, tag::flux >() ) )
g_inputdeck.get< tag::param, tag::multimat, tag::flux >().at(m_system) ) )
{
// associate boundary condition configurations with state functions
brigand::for_each< ctr::bc::Keys >( ConfigBC< eq >( m_system, m_bc,
Expand Down
2 changes: 1 addition & 1 deletion src/PDE/MultiMat/FVMultiMat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class MultiMat {
m_system( c ),
m_ncomp( g_inputdeck.get< tag::component, eq >().at(c) ),
m_riemann( multimatRiemannSolver(
g_inputdeck.get< tag::param, tag::multimat, tag::flux >() ) )
g_inputdeck.get< tag::param, tag::multimat, tag::flux >().at(m_system) ) )
{
// associate boundary condition configurations with state functions
brigand::for_each< ctr::bc::Keys >( ConfigBC< eq >( m_system, m_bc,
Expand Down
4 changes: 2 additions & 2 deletions src/PDE/PDEStack.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ class PDEStack {
if ( nc ) {
// re-create key and search for it
ctr::PDEKey key{{ eq,
g_inputdeck.get< tag::param, EqTag, tag::physics >(),
g_inputdeck.get< tag::param, EqTag, tag::problem >() }};
g_inputdeck.get< tag::param, EqTag, tag::physics >()[c],
g_inputdeck.get< tag::param, EqTag, tag::problem >()[c] }};
const auto it = f.find( key );
Assert( it != end( f ),
"Can't find PDE with key('" +
Expand Down

0 comments on commit 7e9d467

Please sign in to comment.