Mallard 0.8.0
Unstructured, GPU accelerated, high-order finite volume CFD solver
Mallard website
Loading...
Searching...
No Matches
Solver Class Reference

#include <solver.h>

Public Member Functions

 Solver ()
 
 ~Solver ()
 
int init (const std::string &input_file_name)
 Initialize the solver from an input file.
 
int init (const toml::value &input)
 Initialize the solver from a parsed TOML input.
 
int run ()
 Run until a stop condition is reached.
 
void take_step ()
 Advance the solution by one time step. With chemistry, the half step that ends it may be deferred (see run) and fused with the next step's first half (Strang splitting).
 
void calc_rhs (State solution, State rhs, rtype t)
 Compute dU/dt for the given conservative state at time t.
 
rtype calc_dt_cfl1 (Kokkos::View< rtype > on_device={})
 Compute the stable time step for the current solution.
 
void update_primitives ()
 Recompute primitives from conservatives on the device.
 
void update_p_max ()
 Raise P_MAX to the current pressure (updates the primitives).
 
void copy_device_to_host ()
 Copy the device solution to the host mirrors.
 
void copy_host_to_device ()
 Copy the host mirrors to the device solution.
 
std::array< rtype, 2 *N_DIM > calc_force (const Kokkos::View< uint32_t * > &faces)
 Force exerted by the fluid on a boundary zone: pressure part [Fx, Fy] and viscous part [Fx, Fy].
 
std::array< rtype, N_CONSERVATIVE > integrate_conservatives ()
 Sum of each conservative variable integrated over the domain.
 
std::vector< rtype > integrate_species ()
 Partial density of each species integrated over the domain (empty for a single gas).
 
std::array< rtype, N_FLOW_STATISTICS > integrate_flow_statistics ()
 Domain integrals of kinetic energy rho |u|^2 / 2, enstrophy rho |omega|^2 / 2, squared dilatation (div u)^2, pressure dilatation p div u, |u|^2, |omega|^2, rho^2, T and T^2, with the reconstruction's velocity gradients (TENO polynomials) or else least-squares ones.
 
void update_velocity_gradients ()
 W = [rho, u, p] in W_cells and its gradients in viscous_gradients on the owned cells: from the reconstruction polynomials (TENO), else least squares.
 
void update_vortex_fields ()
 Q = (|Omega|^2 - |S|^2) / 2 and the vorticity of each owned cell, into vortex_fields.
 
void update_average_pressure_outlets (StateView solution)
 
void add_mass_flow_force (StateView solution, StateView rhs)
 Add the uniform body force along the mass flow direction that holds the volume average of rho u at its target: it cancels the rate of change of that average from all other terms of the RHS (integrated over the cells, before division by volume), plus the remaining gap divided by the time step. The energy gains the force's work.
 
void update_characteristic_boundaries (rtype t_stage)
 At the first stage of each step: the transverse terms of the characteristic boundaries and their incoming waves, advanced over the step.
 
RestartFaces characteristic_restart_faces () const
 The [p, u_n] of the characteristic faces of owned cells, once they hold a state.
 
void restore_characteristic_state (const RestartData &restart)
 Takes the characteristic faces' [p, u_n] from a restart file that has every face.
 
uint64_t restart_face_key (uint32_t i_face) const
 Rank-count independent key of a boundary face in restart files.
 
void apply_sponges (const State &solution, const State &rhs)
 Adds the sponge-layer sources to the RHS per unit volume (owned cells).
 
void calc_dt ()
 
rtype next_target_time () const
 The time the next step must not pass: t_stop or the next time-based output.
 
void check_fields ()
 
std::string step_graph_unsupported () const
 
void graph_step ()
 
void record_step ()
 
void destroy_step_graph ()
 
void calc_rhs_mixture (State solution, State rhs, rtype t)
 
void add_geometric_source (StateView rhs, Kokkos::View< rtype *, Kokkos::LayoutStride > mu)
 Axisymmetric runs: add geometric_source, made high order by the reconstruction where it can (mu: cell viscosities, empty if inviscid), to the radial momentum of owned cells.
 
void update_primitives_mixture ()
 
void init_temperature_seed ()
 
rtype calc_dt_cfl1_mixture ()
 
void freeze_thermodynamics ()
 Double flux: freeze each cell's [gamma, e0] from the true equation of state at the start of a step, and after the step reset rho E to the true equation of state at the pressure the frozen one gives.
 
void reset_energy ()
 
std::array< rtype, 6 > mixture_diagnostics ()
 Over owned cells and all ranks: min rho, min p, -max Ma, min T, -max T, -max |sum Y - 1|.
 
void update_cell_states (const State &solution, bool update_seed)
 Gas mixtures: W = [rho, u, p] and the scalars [Y, gamma, e0] of every cell, with the temperature found by Newton from the cached seed; update_seed stores the new temperature as the seed. Only the RHS updates the seed, so that its history, and the last bits of T, do not depend on output or diagnostics.
 
void update_transport ()
 Viscous mixtures, after update_cell_states: transport coefficients of every cell and the gradients of [u, T, X].
 
void update_eddy_viscosity (uint32_t n)
 LES: the SGS coefficients [mu_t, lambda_t, mu_t / (Sc_t W)] of cells [0, n) from the velocity gradients of the current RHS (viscous_gradients, or transport_gradients for mixtures, whose time-step diffusivity NU_EFF also grows).
 
void eddy_viscosity_of_state (uint32_t n)
 LES: the eddy viscosity of the current state for the time step (owned cells) or output (all).
 
void update_thickened_flame ()
 Thickened flame: [F, E, Omega] and the chemistry time scale E / F of every cell from the current state (owned cells, exchanged to the halo), once per step in calc_dt.
 
void update_partially_stirred_reactor ()
 PaSR: the reacting fraction kappa of every owned cell (chem_time_scale), once per step in calc_dt.
 
void update_dynamic_constant ()
 Global dynamic procedure: les.C from the Germano identity of the current state, summed over the domain exactly (fixed point), so the constant is independent of the rank count. The velocity gradients of the state must be up to date on owned cells.
 
void thicken_transport ()
 Thickened flame: multiply the transport of every cell (after update_eddy_viscosity).
 
void exchange_cell_vectors (const Kokkos::View< rtype *[3]> &v)
 Overwrite the halo cells of a 3-vector cell field with their owners' values.
 
void init_chemistry ()
 Reacting mixtures: read [chemistry]; advance every owned cell that needs it as an adiabatic constant-volume reactor over dt_chem; heat release rate of every cell for output.
 
void allocate_chemistry ()
 
void advance_chemistry (double dt_chem)
 
void take_simpler_step ()
 SIMPLER balanced splitting (Wu, Ma & Ihme 2019): with c = -T(U^n), the reaction substep dU/dt = R(U) - c over dt, then the transport substep dU/dt = T(U) + c over dt / 2.
 
void subtract_transport_rate (const State &rhs)
 SIMPLER: rhs -= T(U^n) on the owned cells.
 
void check_chemistry (const CellChemistry::Statistics &stats, double start)
 Counts the active cells of a chemistry call begun at start (timer), adds its rank times to the imbalance sums; throws if any cell failed on any rank.
 
void update_heat_release_rate ()
 
std::pair< uint64_t, double > chemistry_statistics ()
 Over all ranks: owned cells advanced in the last chemistry call, max sub-steps of a cell in the last step.
 
KineticEnergyBudget kinetic_energy_budget ()
 Rates of change of the resolved kinetic energy by the convective, viscous and SGS fluxes of the current state, from an RHS evaluation that leaves the solver's state as it was (docs/design/les.md, section 4.2). Planar runs only.
 
rtype les_constant () const
 LES: the model constant in use (the dynamic procedure's latest with les.dynamic).
 
double les_dynamic_ratio () const
 LES: <L:M> / <M:M> of the latest dynamic procedure, before clipping at zero.
 
bool is_les () const
 Whether the run is a large-eddy simulation ([les]).
 
const LES & get_les () const
 
const Kokkos::View< rtype *[3]>::host_mirror_type & get_les_coefficients () const
 LES: [mu_t, lambda_t, mu_t / (Sc_t W)] of each cell as of the last copy_device_to_host.
 
const Kokkos::View< rtype * >::host_mirror_type & get_chem_time_scale () const
 PaSR: the reacting fraction kappa per cell, after copy_device_to_host.
 
const Kokkos::View< rtype *[3]>::host_mirror_type & get_tfles_fields () const
 Thickened flame: [F, E, Omega] per cell, after copy_device_to_host.
 
const Kokkos::View< rtype *[3]>::host_mirror_type & get_cell_transport () const
 
bool is_mixture () const
 Whether the gas is a mixture (a mechanism is given).
 
bool is_viscous () const
 Whether the flow is viscous (Navier-Stokes), for a single gas or a mixture.
 
const MixtureModel & get_mixture () const
 
void set_distributed (bool on)
 Whether a run on several ranks splits the mesh between them (default). Call before init(); tests turn it off to get a serial reference on every rank.
 
bool is_distributed () const
 
double chemistry_cells_sent () const
 Cell integrations done by another rank than the owner so far (chemistry load balancing).
 
const Distribution & get_distribution () const
 
double get_mass_flow_force () const
 Body force per unit volume, along the mass flow direction, of the last RHS ([source] mass_flow).
 
rtype get_time () const
 
const Statistics & get_statistics () const
 
uint64_t get_step () const
 
const Euler & get_physics () const
 
std::shared_ptr< Mesh > get_mesh () const
 
State state () const
 The solution: flow block and species partial densities.
 
const std::vector< std::string > & get_species_names () const
 Names of the transported species, empty for a single gas.
 

Public Attributes

StateView conservatives
 
SpeciesView species
 
Kokkos::View< rtype *[N_PRIMITIVE]> primitives
 
StateView::host_mirror_type h_conservatives
 
SpeciesView::host_mirror_type h_species
 
Kokkos::View< rtype *[N_PRIMITIVE]>::host_mirror_type h_primitives
 
Kokkos::View< rtype * > p_max
 
Kokkos::View< rtype * >::host_mirror_type h_p_max
 
Kokkos::View< rtype ** > vortex_fields
 
Kokkos::View< rtype ** >::host_mirror_type h_vortex_fields
 

Protected Member Functions

void init_mesh ()
 
void init_radiation ()
 Mixtures: read [radiation]; subtract the optically thin radiative loss from the energy RHS.
 
void add_radiation (StateView rhs, SpeciesView rhoY)
 
void init_physics ()
 
void init_numerics ()
 
void init_boundaries ()
 
void init_run_parameters ()
 
void init_output ()
 
void init_solution ()
 
void init_solution_constant ()
 
void init_solution_analytical ()
 
void init_solution_restart ()
 
void update_boundary_states (rtype t_eval)
 
void init_inlets (const std::vector< toml::value > &input_boundaries, const std::vector< std::pair< size_t, std::vector< uint32_t > > > &inlets)
 
void update_inflow (rtype t_eval)
 
void init_sources ()
 
void update_source_field (rtype t_eval)
 
void init_sponges ()
 
std::vector< std::vector< double > > composition_at_cells (const toml::value &table, const std::string &where, const std::vector< uint32_t > &cells) const
 Mass fractions of a composition table (numbers or expressions) at the centroids of cells.
 
void allocate_memory ()
 
void register_data ()
 
std::vector< std::string > restart_variables () const
 
std::string stop_reason () const
 
bool state_needed () const
 
double progress () const
 
void print_setup () const
 
void print_progress ()
 
void print_summary (const std::string &stop) const
 
template<typename F >
void timed_phase (const std::string &name, F &&f)
 
void write_data (bool force=false)
 
void write_forces ()
 
void write_integrals ()
 
void write_probes ()
 
CellSampler cell_sampler () const
 

Constructor & Destructor Documentation

◆ Solver()

Solver::Solver ( )

◆ ~Solver()

Solver::~Solver ( )

Member Function Documentation

◆ add_geometric_source()

void Solver::add_geometric_source ( StateView  rhs,
Kokkos::View< rtype *, Kokkos::LayoutStride >  mu 
)

Axisymmetric runs: add geometric_source, made high order by the reconstruction where it can (mu: cell viscosities, empty if inviscid), to the radial momentum of owned cells.

◆ add_mass_flow_force()

void Solver::add_mass_flow_force ( StateView  solution,
StateView  rhs 
)

Add the uniform body force along the mass flow direction that holds the volume average of rho u at its target: it cancels the rate of change of that average from all other terms of the RHS (integrated over the cells, before division by volume), plus the remaining gap divided by the time step. The energy gains the force's work.

◆ add_radiation()

void Solver::add_radiation ( StateView  rhs,
SpeciesView  rhoY 
)
protected

◆ advance_chemistry()

void Solver::advance_chemistry ( double  dt_chem)

◆ allocate_chemistry()

void Solver::allocate_chemistry ( )

◆ allocate_memory()

void Solver::allocate_memory ( )
protected

◆ apply_sponges()

void Solver::apply_sponges ( const State &  solution,
const State &  rhs 
)

Adds the sponge-layer sources to the RHS per unit volume (owned cells).

◆ calc_dt()

void Solver::calc_dt ( )

◆ calc_dt_cfl1()

rtype Solver::calc_dt_cfl1 ( Kokkos::View< rtype >  on_device = {})

Compute the stable time step for the current solution.

Parameters
on_deviceIf given (single gas), the local minimum is left there instead, without a host synchronization, and 0 returned.
Returns
dt corresponding to CFL = 1.

◆ calc_dt_cfl1_mixture()

rtype Solver::calc_dt_cfl1_mixture ( )

◆ calc_force()

std::array< rtype, 2 *N_DIM > Solver::calc_force ( const Kokkos::View< uint32_t * > &  faces)

Force exerted by the fluid on a boundary zone: pressure part [Fx, Fy] and viscous part [Fx, Fy].

◆ calc_rhs()

void Solver::calc_rhs ( State  solution,
State  rhs,
rtype  t 
)

Compute dU/dt for the given conservative state at time t.

◆ calc_rhs_mixture()

void Solver::calc_rhs_mixture ( State  solution,
State  rhs,
rtype  t 
)

◆ cell_sampler()

CellSampler Solver::cell_sampler ( ) const
inlineprotected

◆ characteristic_restart_faces()

RestartFaces Solver::characteristic_restart_faces ( ) const

The [p, u_n] of the characteristic faces of owned cells, once they hold a state.

◆ check_chemistry()

void Solver::check_chemistry ( const CellChemistry::Statistics &  stats,
double  start 
)

Counts the active cells of a chemistry call begun at start (timer), adds its rank times to the imbalance sums; throws if any cell failed on any rank.

◆ check_fields()

void Solver::check_fields ( )

◆ chemistry_cells_sent()

double Solver::chemistry_cells_sent ( ) const
inline

Cell integrations done by another rank than the owner so far (chemistry load balancing).

◆ chemistry_statistics()

std::pair< uint64_t, double > Solver::chemistry_statistics ( )

Over all ranks: owned cells advanced in the last chemistry call, max sub-steps of a cell in the last step.

◆ composition_at_cells()

std::vector< std::vector< double > > Solver::composition_at_cells ( const toml::value &  table,
const std::string &  where,
const std::vector< uint32_t > &  cells 
) const
protected

Mass fractions of a composition table (numbers or expressions) at the centroids of cells.

◆ copy_device_to_host()

void Solver::copy_device_to_host ( )

Copy the device solution to the host mirrors.

◆ copy_host_to_device()

void Solver::copy_host_to_device ( )

Copy the host mirrors to the device solution.

◆ destroy_step_graph()

void Solver::destroy_step_graph ( )

◆ eddy_viscosity_of_state()

void Solver::eddy_viscosity_of_state ( uint32_t  n)

LES: the eddy viscosity of the current state for the time step (owned cells) or output (all).

◆ exchange_cell_vectors()

void Solver::exchange_cell_vectors ( const Kokkos::View< rtype *[3]> &  v)

Overwrite the halo cells of a 3-vector cell field with their owners' values.

◆ freeze_thermodynamics()

void Solver::freeze_thermodynamics ( )

Double flux: freeze each cell's [gamma, e0] from the true equation of state at the start of a step, and after the step reset rho E to the true equation of state at the pressure the frozen one gives.

◆ get_cell_transport()

const Kokkos::View< rtype *[3]>::host_mirror_type & Solver::get_cell_transport ( ) const
inline

◆ get_chem_time_scale()

const Kokkos::View< rtype * >::host_mirror_type & Solver::get_chem_time_scale ( ) const
inline

PaSR: the reacting fraction kappa per cell, after copy_device_to_host.

◆ get_distribution()

const Distribution & Solver::get_distribution ( ) const
inline

◆ get_les()

const LES & Solver::get_les ( ) const
inline

◆ get_les_coefficients()

const Kokkos::View< rtype *[3]>::host_mirror_type & Solver::get_les_coefficients ( ) const
inline

LES: [mu_t, lambda_t, mu_t / (Sc_t W)] of each cell as of the last copy_device_to_host.

◆ get_mass_flow_force()

double Solver::get_mass_flow_force ( ) const
inline

Body force per unit volume, along the mass flow direction, of the last RHS ([source] mass_flow).

◆ get_mesh()

std::shared_ptr< Mesh > Solver::get_mesh ( ) const
inline

◆ get_mixture()

const MixtureModel & Solver::get_mixture ( ) const
inline

◆ get_physics()

const Euler & Solver::get_physics ( ) const
inline

◆ get_species_names()

const std::vector< std::string > & Solver::get_species_names ( ) const
inline

Names of the transported species, empty for a single gas.

◆ get_statistics()

const Statistics & Solver::get_statistics ( ) const
inline

◆ get_step()

uint64_t Solver::get_step ( ) const
inline

◆ get_tfles_fields()

const Kokkos::View< rtype *[3]>::host_mirror_type & Solver::get_tfles_fields ( ) const
inline

Thickened flame: [F, E, Omega] per cell, after copy_device_to_host.

◆ get_time()

rtype Solver::get_time ( ) const
inline

◆ graph_step()

void Solver::graph_step ( )

◆ init() [1/2]

int Solver::init ( const std::string &  input_file_name)

Initialize the solver from an input file.

Parameters
input_file_namePath to the TOML input file.
Returns
Exit status.

◆ init() [2/2]

int Solver::init ( const toml::value &  input)

Initialize the solver from a parsed TOML input.

Parameters
inputParsed TOML input.
Returns
Exit status.

◆ init_boundaries()

void Solver::init_boundaries ( )
protected

◆ init_chemistry()

void Solver::init_chemistry ( )

Reacting mixtures: read [chemistry]; advance every owned cell that needs it as an adiabatic constant-volume reactor over dt_chem; heat release rate of every cell for output.

◆ init_inlets()

void Solver::init_inlets ( const std::vector< toml::value > &  input_boundaries,
const std::vector< std::pair< size_t, std::vector< uint32_t > > > &  inlets 
)
protected

◆ init_mesh()

void Solver::init_mesh ( )
protected

◆ init_numerics()

void Solver::init_numerics ( )
protected

◆ init_output()

void Solver::init_output ( )
protected

◆ init_physics()

void Solver::init_physics ( )
protected

◆ init_radiation()

void Solver::init_radiation ( )
protected

Mixtures: read [radiation]; subtract the optically thin radiative loss from the energy RHS.

◆ init_run_parameters()

void Solver::init_run_parameters ( )
protected

◆ init_solution()

void Solver::init_solution ( )
protected

◆ init_solution_analytical()

void Solver::init_solution_analytical ( )
protected

Cell averages of the conservative variables are computed by splitting each cell into simplices and applying a composite rule on each: in 2D, a fan of triangles, each subdivided into n_sub^2 sub-triangles with a degree-5 Dunavant rule; in 3D, the tetrahedra of Mesh::h_cell_tetrahedra, each subdivided into n_sub^3 sub-tetrahedra with a 14-point degree-5 rule. This resolves discontinuous initial data that do not align with the mesh and is high-order accurate for smooth data. Curved cells use their own rule (curved::Geometry::cell_rule). Cells are averaged in parallel on the host, each thread with its own compiled expressions; every cell's sum runs in the same order as on one thread, so the result does not depend on the thread count.

◆ init_solution_constant()

void Solver::init_solution_constant ( )
protected

◆ init_solution_restart()

void Solver::init_solution_restart ( )
protected

◆ init_sources()

void Solver::init_sources ( )
protected

◆ init_sponges()

void Solver::init_sponges ( )
protected

◆ init_temperature_seed()

void Solver::init_temperature_seed ( )

◆ integrate_conservatives()

std::array< rtype, N_CONSERVATIVE > Solver::integrate_conservatives ( )

Sum of each conservative variable integrated over the domain.

◆ integrate_flow_statistics()

std::array< rtype, N_FLOW_STATISTICS > Solver::integrate_flow_statistics ( )

Domain integrals of kinetic energy rho |u|^2 / 2, enstrophy rho |omega|^2 / 2, squared dilatation (div u)^2, pressure dilatation p div u, |u|^2, |omega|^2, rho^2, T and T^2, with the reconstruction's velocity gradients (TENO polynomials) or else least-squares ones.

◆ integrate_species()

std::vector< rtype > Solver::integrate_species ( )

Partial density of each species integrated over the domain (empty for a single gas).

◆ is_distributed()

bool Solver::is_distributed ( ) const
inline

◆ is_les()

bool Solver::is_les ( ) const
inline

Whether the run is a large-eddy simulation ([les]).

◆ is_mixture()

bool Solver::is_mixture ( ) const
inline

Whether the gas is a mixture (a mechanism is given).

◆ is_viscous()

bool Solver::is_viscous ( ) const
inline

Whether the flow is viscous (Navier-Stokes), for a single gas or a mixture.

◆ kinetic_energy_budget()

KineticEnergyBudget Solver::kinetic_energy_budget ( )

Rates of change of the resolved kinetic energy by the convective, viscous and SGS fluxes of the current state, from an RHS evaluation that leaves the solver's state as it was (docs/design/les.md, section 4.2). Planar runs only.

◆ les_constant()

rtype Solver::les_constant ( ) const
inline

LES: the model constant in use (the dynamic procedure's latest with les.dynamic).

◆ les_dynamic_ratio()

double Solver::les_dynamic_ratio ( ) const
inline

LES: <L:M> / <M:M> of the latest dynamic procedure, before clipping at zero.

◆ mixture_diagnostics()

std::array< rtype, 6 > Solver::mixture_diagnostics ( )

Over owned cells and all ranks: min rho, min p, -max Ma, min T, -max T, -max |sum Y - 1|.

◆ next_target_time()

rtype Solver::next_target_time ( ) const

The time the next step must not pass: t_stop or the next time-based output.

◆ print_progress()

void Solver::print_progress ( )
protected

◆ print_setup()

void Solver::print_setup ( ) const
protected

◆ print_summary()

void Solver::print_summary ( const std::string &  stop) const
protected

◆ progress()

double Solver::progress ( ) const
protected

◆ record_step()

void Solver::record_step ( )

◆ register_data()

void Solver::register_data ( )
protected

◆ reset_energy()

void Solver::reset_energy ( )

◆ restart_face_key()

uint64_t Solver::restart_face_key ( uint32_t  i_face) const

Rank-count independent key of a boundary face in restart files.

◆ restart_variables()

std::vector< std::string > Solver::restart_variables ( ) const
protected

◆ restore_characteristic_state()

void Solver::restore_characteristic_state ( const RestartData &  restart)

Takes the characteristic faces' [p, u_n] from a restart file that has every face.

◆ run()

int Solver::run ( )

Run until a stop condition is reached.

Returns
Exit status.

◆ set_distributed()

void Solver::set_distributed ( bool  on)
inline

Whether a run on several ranks splits the mesh between them (default). Call before init(); tests turn it off to get a serial reference on every rank.

◆ state()

State Solver::state ( ) const
inline

The solution: flow block and species partial densities.

◆ state_needed()

bool Solver::state_needed ( ) const
protected

◆ step_graph_unsupported()

std::string Solver::step_graph_unsupported ( ) const

◆ stop_reason()

std::string Solver::stop_reason ( ) const
protected

◆ subtract_transport_rate()

void Solver::subtract_transport_rate ( const State &  rhs)

SIMPLER: rhs -= T(U^n) on the owned cells.

◆ take_simpler_step()

void Solver::take_simpler_step ( )

SIMPLER balanced splitting (Wu, Ma & Ihme 2019): with c = -T(U^n), the reaction substep dU/dt = R(U) - c over dt, then the transport substep dU/dt = T(U) + c over dt / 2.

◆ take_step()

void Solver::take_step ( )

Advance the solution by one time step. With chemistry, the half step that ends it may be deferred (see run) and fused with the next step's first half (Strang splitting).

◆ thicken_transport()

void Solver::thicken_transport ( )

Thickened flame: multiply the transport of every cell (after update_eddy_viscosity).

◆ timed_phase()

template<typename F >
void Solver::timed_phase ( const std::string &  name,
F &&  f 
)
protected

◆ update_average_pressure_outlets()

void Solver::update_average_pressure_outlets ( StateView  solution)

◆ update_boundary_states()

void Solver::update_boundary_states ( rtype  t_eval)
protected

◆ update_cell_states()

void Solver::update_cell_states ( const State &  solution,
bool  update_seed 
)

Gas mixtures: W = [rho, u, p] and the scalars [Y, gamma, e0] of every cell, with the temperature found by Newton from the cached seed; update_seed stores the new temperature as the seed. Only the RHS updates the seed, so that its history, and the last bits of T, do not depend on output or diagnostics.

◆ update_characteristic_boundaries()

void Solver::update_characteristic_boundaries ( rtype  t_stage)

At the first stage of each step: the transverse terms of the characteristic boundaries and their incoming waves, advanced over the step.

◆ update_dynamic_constant()

void Solver::update_dynamic_constant ( )

Global dynamic procedure: les.C from the Germano identity of the current state, summed over the domain exactly (fixed point), so the constant is independent of the rank count. The velocity gradients of the state must be up to date on owned cells.

◆ update_eddy_viscosity()

void Solver::update_eddy_viscosity ( uint32_t  n)

LES: the SGS coefficients [mu_t, lambda_t, mu_t / (Sc_t W)] of cells [0, n) from the velocity gradients of the current RHS (viscous_gradients, or transport_gradients for mixtures, whose time-step diffusivity NU_EFF also grows).

◆ update_heat_release_rate()

void Solver::update_heat_release_rate ( )

◆ update_inflow()

void Solver::update_inflow ( rtype  t_eval)
protected

◆ update_p_max()

void Solver::update_p_max ( )

Raise P_MAX to the current pressure (updates the primitives).

◆ update_partially_stirred_reactor()

void Solver::update_partially_stirred_reactor ( )

PaSR: the reacting fraction kappa of every owned cell (chem_time_scale), once per step in calc_dt.

◆ update_primitives()

void Solver::update_primitives ( )

Recompute primitives from conservatives on the device.

◆ update_primitives_mixture()

void Solver::update_primitives_mixture ( )

◆ update_source_field()

void Solver::update_source_field ( rtype  t_eval)
protected

◆ update_thickened_flame()

void Solver::update_thickened_flame ( )

Thickened flame: [F, E, Omega] and the chemistry time scale E / F of every cell from the current state (owned cells, exchanged to the halo), once per step in calc_dt.

◆ update_transport()

void Solver::update_transport ( )

Viscous mixtures, after update_cell_states: transport coefficients of every cell and the gradients of [u, T, X].

◆ update_velocity_gradients()

void Solver::update_velocity_gradients ( )

W = [rho, u, p] in W_cells and its gradients in viscous_gradients on the owned cells: from the reconstruction polynomials (TENO), else least squares.

◆ update_vortex_fields()

void Solver::update_vortex_fields ( )

Q = (|Omega|^2 - |S|^2) / 2 and the vorticity of each owned cell, into vortex_fields.

◆ write_data()

void Solver::write_data ( bool  force = false)
protected

◆ write_forces()

void Solver::write_forces ( )
protected

◆ write_integrals()

void Solver::write_integrals ( )
protected

◆ write_probes()

void Solver::write_probes ( )
protected

Member Data Documentation

◆ conservatives

StateView Solver::conservatives

◆ h_conservatives

StateView::host_mirror_type Solver::h_conservatives

◆ h_p_max

Kokkos::View<rtype*>::host_mirror_type Solver::h_p_max

◆ h_primitives

Kokkos::View<rtype*[N_PRIMITIVE]>::host_mirror_type Solver::h_primitives

◆ h_species

SpeciesView::host_mirror_type Solver::h_species

◆ h_vortex_fields

Kokkos::View<rtype**>::host_mirror_type Solver::h_vortex_fields

◆ p_max

Kokkos::View<rtype *> Solver::p_max

◆ primitives

Kokkos::View<rtype *[N_PRIMITIVE]> Solver::primitives

◆ species

SpeciesView Solver::species

◆ vortex_fields

Kokkos::View<rtype **> Solver::vortex_fields

The documentation for this class was generated from the following files: