Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
shammodels::sph::SolverConfig< Tvec, SPHKernel > Struct Template Reference

The configuration for a sph solver. More...

Collaboration diagram for shammodels::sph::SolverConfig< Tvec, SPHKernel >:

Public Types

using Tscal = shambase::VecComponent<Tvec>
 The type of the scalar used to represent the quantities.
using Kernel = SPHKernel<Tscal>
 The type of the kernel used for the SPH interactions.
using u_morton = u32
 The type of the Morton code for the tree.
using RTree = shamtree::CompressedLeafBVH<u_morton, Tvec, 3>
using SolverStatusVar = SolverStatusVar<Tvec>
 Alias to SolverStatusVar type.
using MHDConfig = MHDConfig<Tvec>
using DustConfig = DustConfig<Tscal>
using EOSConfig = shammodels::EOSConfig<Tvec>
 Alias to EOSConfig type.
using AVConfig = AVConfig<Tvec>
 Configuration for the Artificial Viscosity (AV).
using BCConfig = BCConfig<Tvec>
 Configuration of the boundary conditions.
using ExtForceConfig = shammodels::ExtForceConfig<Tvec>
 External force configuration.

Public Member Functions

void set_particle_tracking (bool state)
void set_units (shamunits::UnitSystem< Tscal > new_sys)
 Set the unit system of the simulation.
Tscal get_constant_G ()
 Retrieves the value of the constant G based on the unit system.
Tscal get_constant_c ()
 Retrieves the value of the constant c based on the unit system.
Tscal get_constant_mu_0 ()
 Retrieves the value of the constant mu_0 based on the unit system.
void set_time (Tscal t)
 Set the current time.
void set_next_dt (Tscal dt)
 Set the time step for the next iteration.
Tscal get_time ()
 Get the current time.
Tscal get_dt_sph ()
 Get the time step for the next iteration.
void set_cfl_multipler (Tscal lambda)
 Set the CFL multiplier for the time step.
Tscal get_cfl_multipler ()
 Get the CFL multiplier for the time step.
void set_cfl_mult_stiffness (Tscal cstiff)
 Set the CFL multiplier for the stiffness.
Tscal get_cfl_mult_stiffness ()
 Get the CFL multiplier for the stiffness.
void set_noMHD ()
 disable MHD in the SPH solver
void set_IdealMHD (typename MHDConfig::IdealMHD_constrained_hyper_para v)
 Enable the ideal MHD hydro solver.
void set_NonIdealMHD (typename MHDConfig::NonIdealMHD v)
void set_tree_reduction_level (u32 level)
 Setter for the tree reduction level.
void set_two_stage_search (bool enable)
 Setter for the two stage search.
void set_show_neigh_stats (bool enable)
void set_smoothing_length_density_based ()
void set_smoothing_length_density_based_neigh_lim (u32 max_neigh_count)
void set_enable_particle_reordering (bool enable)
void set_particle_reordering_step_freq (u64 freq)
void set_save_dt_to_fields (bool enable)
bool should_save_dt_to_fields () const
void set_show_ghost_zone_graph (bool enable)
bool is_eos_locally_isothermal ()
 Check if the EOS is a locally isothermal equation of state.
bool is_eos_adiabatic ()
 Check if the EOS is an adiabatic equation of state.
bool is_eos_polytropic ()
 Check if the EOS is a polytropic equation of state.
bool is_eos_isothermal ()
 Check if the EOS is an isothermal equation of state.
bool is_eos_fermi ()
 Check if the EOS is a Fermi equation of state.
void set_eos_isothermal (Tscal cs)
 Set the EOS configuration to an isothermal equation of state.
void set_eos_adiabatic (Tscal gamma)
 Set the EOS configuration to an adiabatic equation of state.
void set_eos_polytropic (Tscal K, Tscal gamma)
 Set the EOS configuration to an polytropic equation of state.
void set_eos_locally_isothermal ()
 Set the EOS configuration to a locally isothermal equation of state.
void set_eos_locally_isothermalLP07 (Tscal cs0, Tscal q, Tscal r0)
 Set the EOS configuration to a locally isothermal equation of state from Lodato Price 2007.
void set_eos_locally_isothermalFA2014 (Tscal h_over_r)
 Set the EOS configuration to a locally isothermal equation of state fromFarris 2014.
void set_eos_locally_isothermalFA2014_extended (Tscal cs0, Tscal q, Tscal r0, u32 n_sinks)
 Set the EOS configuration to a locally isothermal equation of state from Farris 2014 extended to q != 1/2.
void set_eos_fermi (Tscal mu_e)
 Set the EOS configuration to a Fermi equation of state.
void set_artif_viscosity_None ()
 Set the artificial viscosity configuration to None.
void set_artif_viscosity_Constant (typename AVConfig::Constant v)
 Set the artificial viscosity configuration to a constant value.
void set_artif_viscosity_VaryingMM97 (typename AVConfig::VaryingMM97 v)
 Set the artificial viscosity configuration to a varying value using the prescription of Monaghan & Gingold 1997.
void set_artif_viscosity_VaryingCD10 (typename AVConfig::VaryingCD10 v)
 Set the artificial viscosity configuration to a varying value using the prescription of Cullen & Dehnen 2010.
void set_artif_viscosity_ConstantDisc (typename AVConfig::ConstantDisc v)
 Set the artificial viscosity configuration to a constant value in the disc plane.
void set_boundary_free ()
 Set the boundary condition to free boundary.
void set_boundary_periodic ()
 Set the boundary condition to periodic boundary.
void set_boundary_shearing_periodic (i32_3 shear_base, i32_3 shear_dir, Tscal speed)
 Set the boundary condition to shearing periodic boundary.
void add_ext_force_point_mass (Tscal central_mass, Tscal Racc)
 Add a point mass external force.
void add_ext_force_paczynski_wiita (Tscal central_mass, Tvec central_pos, Tscal Racc)
 Add a post-newtonian Paczynski-Wiita potential.
void add_ext_force_lense_thirring (Tscal central_mass, Tscal Racc, Tscal a_spin, Tvec dir_spin)
 Add a Lense-Thirring external force.
void add_ext_force_shearing_box (Tscal Omega_0, Tscal eta, Tscal q)
 Add a shearing box external force.
void set_debug_dump (bool _do_debug_dump, std::string _debug_dump_filename)
 Set whether to dump debug information to file.
constexpr bool do_MHD_debug ()
 Whether to add debug fields to the pdl.
bool ghost_has_soundspeed ()
 Whether the ghost cells have a sound speed (i.e. the eos is locally isothermal).
bool has_field_uint ()
 Whether the solver has a field for the particle's uint.
bool has_field_alphaAV ()
 Whether the solver has a field for alpha AV.
bool has_field_divv ()
 Whether the solver has a field for divv.
bool has_field_dtdivv ()
 Whether the solver has a field for dt divv.
bool has_field_curlv ()
 Whether the solver has a field for curlv.
bool has_axyz_in_ghost ()
 Whether the solver has a field for ax, ay, az in ghost cells.
bool has_field_soundspeed ()
 Whether the solver has a field for sound speed.
bool has_field_B_on_rho ()
 Whether the solver has a field for B_on_rho.
bool has_field_psi_on_ch ()
 Whether the solver has a field for psi_on_ch.
bool has_field_divB ()
 Whether the solver has a field for divB.
bool has_field_curlB ()
 Whether the solver has a field for curlB.
bool has_field_dtdivB ()
 Whether the solver has a field for dt divB.
void use_luminosity (bool enable)
void print_status ()
 Print the current status of the solver config.
void check_config ()
void set_layout (shamrock::patch::PatchDataLayerLayout &pdl)
void set_ghost_layout (shamrock::patch::PatchDataLayerLayout &ghost_layout)

Public Attributes

Tscal gpart_mass
 The mass of each gas particle.
CFLConfig< Tscalcfl_config
 The configuration for the CFL condition.
bool track_particles_id = false
PatchSchedulerConfig scheduler_conf = {}
std::optional< shamunits::UnitSystem< Tscal > > unit_sys = {}
 The unit system of the simulation.
ParticleKillingConfig< Tvec > particle_killing
SolverStatusVar time_state
 The time sate of the simulation.
bool show_cfl_detail = false
MHDConfig mhd_config = {}
DustConfig dust_config = {}
SelfGravConfig self_grav_config = SelfGravConfig{}
u32 tree_reduction_level = 3
 Reduction level to be used in the tree build.
bool use_two_stage_search = true
 Use two stage neighbors search (see shamrock paper).
bool show_neigh_stats = false
bool combined_dtdiv_divcurlv_compute = false
Tscal htol_up_coarse_cycle = 1.1
Tscal htol_up_fine_cycle = 1.1
 Maximum factor of the smoothing length evolution per subcycles.
Tscal epsilon_h = 1e-6
 Convergence criteria for the smoothing length.
u32 h_iter_per_subcycles = 50
 Maximum number of iterations per subcycle.
u32 h_max_subcycles_count = 100
 Maximum number of subcycles before solver crash.
SmoothingLengthConfig smoothing_length_config
bool enable_particle_reordering = false
u64 particle_reordering_step_freq = 1000
bool save_dt_to_fields = false
bool show_ghost_zone_graph = false
EOSConfig eos_config
 EOS configuration.
AVConfig artif_viscosity
 Configuration for the Artificial Viscosity (AV).
BCConfig boundary_config
 Boundary condition configuration.
ExtForceConfig ext_force_config {}
 External force configuration.
bool do_debug_dump = false
 Whether to dump debug information to file.
std::string debug_dump_filename = ""
 The filename to dump debug information in.
bool compute_luminosity = false
 Whether to store luminosity.

Static Public Attributes

static constexpr u32 dim = shambase::VectorProperties<Tvec>::dimension
 The dimension of the problem.
static constexpr Tscal Rkern = Kernel::Rkern
 The radius of the sph kernel.

Detailed Description

template<class Tvec, template< class > class SPHKernel>
struct shammodels::sph::SolverConfig< Tvec, SPHKernel >

The configuration for a sph solver.

Template Parameters
Tvecthe type of the vector used to represent the particles
SPHKernelthe type of the SPH kernel

Definition at line 401 of file SolverConfig.hpp.

Member Typedef Documentation

◆ AVConfig

template<class Tvec, template< class > class SPHKernel>
using shammodels::sph::SolverConfig< Tvec, SPHKernel >::AVConfig = AVConfig<Tvec>

Configuration for the Artificial Viscosity (AV).

This struct contains the information needed to configure the Artificial Viscosity in the SPH algorithm. It is a variant of two possible types of artificial viscosity:

  • None: no AV
  • Constant: AV with a constant value
  • VaryingMM97: AV with a varying value, using the Monaghan & Gingold 1997 prescription
  • VaryingCD10: AV with a varying value, using the Cullen & Dehnen 2010 prescription
  • ConstantDisc: AV with a constant value, but only in the disc plane

Definition at line 762 of file SolverConfig.hpp.

◆ BCConfig

template<class Tvec, template< class > class SPHKernel>
using shammodels::sph::SolverConfig< Tvec, SPHKernel >::BCConfig = BCConfig<Tvec>

Configuration of the boundary conditions.

Definition at line 823 of file SolverConfig.hpp.

◆ DustConfig

template<class Tvec, template< class > class SPHKernel>
using shammodels::sph::SolverConfig< Tvec, SPHKernel >::DustConfig = DustConfig<Tscal>

Definition at line 553 of file SolverConfig.hpp.

◆ EOSConfig

template<class Tvec, template< class > class SPHKernel>
using shammodels::sph::SolverConfig< Tvec, SPHKernel >::EOSConfig = shammodels::EOSConfig<Tvec>

Alias to EOSConfig type.

Definition at line 638 of file SolverConfig.hpp.

◆ ExtForceConfig

template<class Tvec, template< class > class SPHKernel>
using shammodels::sph::SolverConfig< Tvec, SPHKernel >::ExtForceConfig = shammodels::ExtForceConfig<Tvec>

External force configuration.

This configuration is used to define the external forces that are applied to the particles in the simulation.

The external forces are defined by a variant of different types of forces (i.e., point mass, Lense-Thirring, etc.). The user can add different types of forces using the functions add_ext_force_point_mass, add_ext_force_lense_thirring, etc.

Definition at line 876 of file SolverConfig.hpp.

◆ Kernel

template<class Tvec, template< class > class SPHKernel>
using shammodels::sph::SolverConfig< Tvec, SPHKernel >::Kernel = SPHKernel<Tscal>

The type of the kernel used for the SPH interactions.

Definition at line 408 of file SolverConfig.hpp.

◆ MHDConfig

template<class Tvec, template< class > class SPHKernel>
using shammodels::sph::SolverConfig< Tvec, SPHKernel >::MHDConfig = MHDConfig<Tvec>

Definition at line 529 of file SolverConfig.hpp.

◆ RTree

template<class Tvec, template< class > class SPHKernel>
using shammodels::sph::SolverConfig< Tvec, SPHKernel >::RTree = shamtree::CompressedLeafBVH<u_morton, Tvec, 3>

Definition at line 412 of file SolverConfig.hpp.

◆ SolverStatusVar

template<class Tvec, template< class > class SPHKernel>
using shammodels::sph::SolverConfig< Tvec, SPHKernel >::SolverStatusVar = SolverStatusVar<Tvec>

Alias to SolverStatusVar type.

Definition at line 488 of file SolverConfig.hpp.

◆ Tscal

template<class Tvec, template< class > class SPHKernel>
using shammodels::sph::SolverConfig< Tvec, SPHKernel >::Tscal = shambase::VecComponent<Tvec>

The type of the scalar used to represent the quantities.

Definition at line 404 of file SolverConfig.hpp.

◆ u_morton

template<class Tvec, template< class > class SPHKernel>
using shammodels::sph::SolverConfig< Tvec, SPHKernel >::u_morton = u32

The type of the Morton code for the tree.

Definition at line 410 of file SolverConfig.hpp.

Member Function Documentation

◆ add_ext_force_lense_thirring()

template<class Tvec, template< class > class SPHKernel>
void shammodels::sph::SolverConfig< Tvec, SPHKernel >::add_ext_force_lense_thirring ( Tscal central_mass,
Tscal Racc,
Tscal a_spin,
Tvec dir_spin )
inline

Add a Lense-Thirring external force.

Parameters
[in]central_massThe mass of the central object
[in]RaccThe accretion radius of the central object
[in]a_spinThe spin of the central object
[in]dir_spinThe direction of the spin of the central object

Definition at line 911 of file SolverConfig.hpp.

◆ add_ext_force_paczynski_wiita()

template<class Tvec, template< class > class SPHKernel>
void shammodels::sph::SolverConfig< Tvec, SPHKernel >::add_ext_force_paczynski_wiita ( Tscal central_mass,
Tvec central_pos,
Tscal Racc )
inline

Add a post-newtonian Paczynski-Wiita potential.

Parameters
[in]central_massThe mass of the central object
[in]RaccThe accretion radius of the central object

Definition at line 899 of file SolverConfig.hpp.

◆ add_ext_force_point_mass()

template<class Tvec, template< class > class SPHKernel>
void shammodels::sph::SolverConfig< Tvec, SPHKernel >::add_ext_force_point_mass ( Tscal central_mass,
Tscal Racc )
inline

Add a point mass external force.

Parameters
[in]central_massThe mass of the central object
[in]RaccThe accretion radius of the central object

Definition at line 889 of file SolverConfig.hpp.

◆ add_ext_force_shearing_box()

template<class Tvec, template< class > class SPHKernel>
void shammodels::sph::SolverConfig< Tvec, SPHKernel >::add_ext_force_shearing_box ( Tscal Omega_0,
Tscal eta,
Tscal q )
inline

Add a shearing box external force.

Parameters
[in]Omega_0The angular frequency of the shear
[in]etaThe shear rate
[in]qThe power-law index of the shear

Definition at line 923 of file SolverConfig.hpp.

◆ check_config()

template<class Tvec, template< class > class SPHKernel>
void shammodels::sph::SolverConfig< Tvec, SPHKernel >::check_config ( )
inline

Definition at line 1017 of file SolverConfig.hpp.

◆ do_MHD_debug()

template<class Tvec, template< class > class SPHKernel>
bool shammodels::sph::SolverConfig< Tvec, SPHKernel >::do_MHD_debug ( )
inlineconstexpr

Whether to add debug fields to the pdl.

Definition at line 951 of file SolverConfig.hpp.

◆ get_cfl_mult_stiffness()

template<class Tvec, template< class > class SPHKernel>
Tscal shammodels::sph::SolverConfig< Tvec, SPHKernel >::get_cfl_mult_stiffness ( )
inline

Get the CFL multiplier for the stiffness.

Definition at line 517 of file SolverConfig.hpp.

◆ get_cfl_multipler()

template<class Tvec, template< class > class SPHKernel>
Tscal shammodels::sph::SolverConfig< Tvec, SPHKernel >::get_cfl_multipler ( )
inline

Get the CFL multiplier for the time step.

Definition at line 509 of file SolverConfig.hpp.

◆ get_constant_c()

template<class Tvec, template< class > class SPHKernel>
Tscal shammodels::sph::SolverConfig< Tvec, SPHKernel >::get_constant_c ( )
inline

Retrieves the value of the constant c based on the unit system.

Definition at line 448 of file SolverConfig.hpp.

Here is the call graph for this function:

◆ get_constant_G()

template<class Tvec, template< class > class SPHKernel>
Tscal shammodels::sph::SolverConfig< Tvec, SPHKernel >::get_constant_G ( )
inline

Retrieves the value of the constant G based on the unit system.

Definition at line 437 of file SolverConfig.hpp.

Here is the call graph for this function:

◆ get_constant_mu_0()

template<class Tvec, template< class > class SPHKernel>
Tscal shammodels::sph::SolverConfig< Tvec, SPHKernel >::get_constant_mu_0 ( )
inline

Retrieves the value of the constant mu_0 based on the unit system.

Definition at line 459 of file SolverConfig.hpp.

Here is the call graph for this function:

◆ get_dt_sph()

template<class Tvec, template< class > class SPHKernel>
Tscal shammodels::sph::SolverConfig< Tvec, SPHKernel >::get_dt_sph ( )
inline

Get the time step for the next iteration.

Definition at line 503 of file SolverConfig.hpp.

◆ get_time()

template<class Tvec, template< class > class SPHKernel>
Tscal shammodels::sph::SolverConfig< Tvec, SPHKernel >::get_time ( )
inline

Get the current time.

Definition at line 500 of file SolverConfig.hpp.

◆ ghost_has_soundspeed()

template<class Tvec, template< class > class SPHKernel>
bool shammodels::sph::SolverConfig< Tvec, SPHKernel >::ghost_has_soundspeed ( )
inline

Whether the ghost cells have a sound speed (i.e. the eos is locally isothermal).

Definition at line 958 of file SolverConfig.hpp.

Here is the call graph for this function:

◆ has_axyz_in_ghost()

template<class Tvec, template< class > class SPHKernel>
bool shammodels::sph::SolverConfig< Tvec, SPHKernel >::has_axyz_in_ghost ( )
inline

Whether the solver has a field for ax, ay, az in ghost cells.

Definition at line 981 of file SolverConfig.hpp.

Here is the call graph for this function:

◆ has_field_alphaAV()

template<class Tvec, template< class > class SPHKernel>
bool shammodels::sph::SolverConfig< Tvec, SPHKernel >::has_field_alphaAV ( )
inline

Whether the solver has a field for alpha AV.

Definition at line 969 of file SolverConfig.hpp.

◆ has_field_B_on_rho()

template<class Tvec, template< class > class SPHKernel>
bool shammodels::sph::SolverConfig< Tvec, SPHKernel >::has_field_B_on_rho ( )
inline

Whether the solver has a field for B_on_rho.

Definition at line 989 of file SolverConfig.hpp.

◆ has_field_curlB()

template<class Tvec, template< class > class SPHKernel>
bool shammodels::sph::SolverConfig< Tvec, SPHKernel >::has_field_curlB ( )
inline

Whether the solver has a field for curlB.

Definition at line 998 of file SolverConfig.hpp.

◆ has_field_curlv()

template<class Tvec, template< class > class SPHKernel>
bool shammodels::sph::SolverConfig< Tvec, SPHKernel >::has_field_curlv ( )
inline

Whether the solver has a field for curlv.

Definition at line 978 of file SolverConfig.hpp.

◆ has_field_divB()

template<class Tvec, template< class > class SPHKernel>
bool shammodels::sph::SolverConfig< Tvec, SPHKernel >::has_field_divB ( )
inline

Whether the solver has a field for divB.

Definition at line 995 of file SolverConfig.hpp.

◆ has_field_divv()

template<class Tvec, template< class > class SPHKernel>
bool shammodels::sph::SolverConfig< Tvec, SPHKernel >::has_field_divv ( )
inline

Whether the solver has a field for divv.

Definition at line 972 of file SolverConfig.hpp.

◆ has_field_dtdivB()

template<class Tvec, template< class > class SPHKernel>
bool shammodels::sph::SolverConfig< Tvec, SPHKernel >::has_field_dtdivB ( )
inline

Whether the solver has a field for dt divB.

Definition at line 1001 of file SolverConfig.hpp.

◆ has_field_dtdivv()

template<class Tvec, template< class > class SPHKernel>
bool shammodels::sph::SolverConfig< Tvec, SPHKernel >::has_field_dtdivv ( )
inline

Whether the solver has a field for dt divv.

Definition at line 975 of file SolverConfig.hpp.

◆ has_field_psi_on_ch()

template<class Tvec, template< class > class SPHKernel>
bool shammodels::sph::SolverConfig< Tvec, SPHKernel >::has_field_psi_on_ch ( )
inline

Whether the solver has a field for psi_on_ch.

Definition at line 992 of file SolverConfig.hpp.

◆ has_field_soundspeed()

template<class Tvec, template< class > class SPHKernel>
bool shammodels::sph::SolverConfig< Tvec, SPHKernel >::has_field_soundspeed ( )
inline

Whether the solver has a field for sound speed.

Definition at line 984 of file SolverConfig.hpp.

Here is the call graph for this function:

◆ has_field_uint()

template<class Tvec, template< class > class SPHKernel>
bool shammodels::sph::SolverConfig< Tvec, SPHKernel >::has_field_uint ( )
inline

Whether the solver has a field for the particle's uint.

Note
for now, this is always true as

Definition at line 963 of file SolverConfig.hpp.

◆ is_eos_adiabatic()

template<class Tvec, template< class > class SPHKernel>
bool shammodels::sph::SolverConfig< Tvec, SPHKernel >::is_eos_adiabatic ( )
inline

Check if the EOS is an adiabatic equation of state.

Definition at line 650 of file SolverConfig.hpp.

◆ is_eos_fermi()

template<class Tvec, template< class > class SPHKernel>
bool shammodels::sph::SolverConfig< Tvec, SPHKernel >::is_eos_fermi ( )
inline

Check if the EOS is a Fermi equation of state.

Definition at line 668 of file SolverConfig.hpp.

◆ is_eos_isothermal()

template<class Tvec, template< class > class SPHKernel>
bool shammodels::sph::SolverConfig< Tvec, SPHKernel >::is_eos_isothermal ( )
inline

Check if the EOS is an isothermal equation of state.

Definition at line 662 of file SolverConfig.hpp.

◆ is_eos_locally_isothermal()

template<class Tvec, template< class > class SPHKernel>
bool shammodels::sph::SolverConfig< Tvec, SPHKernel >::is_eos_locally_isothermal ( )
inline

Check if the EOS is a locally isothermal equation of state.

Definition at line 644 of file SolverConfig.hpp.

◆ is_eos_polytropic()

template<class Tvec, template< class > class SPHKernel>
bool shammodels::sph::SolverConfig< Tvec, SPHKernel >::is_eos_polytropic ( )
inline

Check if the EOS is a polytropic equation of state.

Definition at line 656 of file SolverConfig.hpp.

◆ print_status()

template<class Tvec, template< class > class SPHKernel>
void shammodels::sph::SolverConfig< Tvec, SPHKernel >::print_status ( )
inline

Print the current status of the solver config.

Definition at line 1008 of file SolverConfig.hpp.

Here is the call graph for this function:

◆ set_artif_viscosity_Constant()

template<class Tvec, template< class > class SPHKernel>
void shammodels::sph::SolverConfig< Tvec, SPHKernel >::set_artif_viscosity_Constant ( typename AVConfig::Constant v)
inline

Set the artificial viscosity configuration to a constant value.

Parameters
vConstant value of the artificial viscosity

Definition at line 780 of file SolverConfig.hpp.

◆ set_artif_viscosity_ConstantDisc()

template<class Tvec, template< class > class SPHKernel>
void shammodels::sph::SolverConfig< Tvec, SPHKernel >::set_artif_viscosity_ConstantDisc ( typename AVConfig::ConstantDisc v)
inline

Set the artificial viscosity configuration to a constant value in the disc plane.

Parameters
vConfiguration of the artificial viscosity (alpha, beta, etc.)

Definition at line 808 of file SolverConfig.hpp.

◆ set_artif_viscosity_None()

template<class Tvec, template< class > class SPHKernel>
void shammodels::sph::SolverConfig< Tvec, SPHKernel >::set_artif_viscosity_None ( )
inline

Set the artificial viscosity configuration to None.

Definition at line 770 of file SolverConfig.hpp.

◆ set_artif_viscosity_VaryingCD10()

template<class Tvec, template< class > class SPHKernel>
void shammodels::sph::SolverConfig< Tvec, SPHKernel >::set_artif_viscosity_VaryingCD10 ( typename AVConfig::VaryingCD10 v)
inline

Set the artificial viscosity configuration to a varying value using the prescription of Cullen & Dehnen 2010.

Parameters
vConfiguration of the artificial viscosity (alpha, beta, etc.)

Definition at line 800 of file SolverConfig.hpp.

◆ set_artif_viscosity_VaryingMM97()

template<class Tvec, template< class > class SPHKernel>
void shammodels::sph::SolverConfig< Tvec, SPHKernel >::set_artif_viscosity_VaryingMM97 ( typename AVConfig::VaryingMM97 v)
inline

Set the artificial viscosity configuration to a varying value using the prescription of Monaghan & Gingold 1997.

Parameters
vConfiguration of the artificial viscosity (alpha, beta, etc.)

Definition at line 790 of file SolverConfig.hpp.

◆ set_boundary_free()

template<class Tvec, template< class > class SPHKernel>
void shammodels::sph::SolverConfig< Tvec, SPHKernel >::set_boundary_free ( )
inline

Set the boundary condition to free boundary.

Definition at line 835 of file SolverConfig.hpp.

◆ set_boundary_periodic()

template<class Tvec, template< class > class SPHKernel>
void shammodels::sph::SolverConfig< Tvec, SPHKernel >::set_boundary_periodic ( )
inline

Set the boundary condition to periodic boundary.

Definition at line 840 of file SolverConfig.hpp.

◆ set_boundary_shearing_periodic()

template<class Tvec, template< class > class SPHKernel>
void shammodels::sph::SolverConfig< Tvec, SPHKernel >::set_boundary_shearing_periodic ( i32_3 shear_base,
i32_3 shear_dir,
Tscal speed )
inline

Set the boundary condition to shearing periodic boundary.

The particles are periodic in all directions, but with a shear in the direction given by shear_dir and a period of speed.

Parameters
[in]shear_baseThe base of the scalar product to define the number of shearing periodicity to be applied
[in]shear_dirThe direction of the shear
[in]speedThe speed of the shear

Definition at line 853 of file SolverConfig.hpp.

◆ set_cfl_mult_stiffness()

template<class Tvec, template< class > class SPHKernel>
void shammodels::sph::SolverConfig< Tvec, SPHKernel >::set_cfl_mult_stiffness ( Tscal cstiff)
inline

Set the CFL multiplier for the stiffness.

Definition at line 512 of file SolverConfig.hpp.

◆ set_cfl_multipler()

template<class Tvec, template< class > class SPHKernel>
void shammodels::sph::SolverConfig< Tvec, SPHKernel >::set_cfl_multipler ( Tscal lambda)
inline

Set the CFL multiplier for the time step.

Definition at line 506 of file SolverConfig.hpp.

◆ set_debug_dump()

template<class Tvec, template< class > class SPHKernel>
void shammodels::sph::SolverConfig< Tvec, SPHKernel >::set_debug_dump ( bool _do_debug_dump,
std::string _debug_dump_filename )
inline

Set whether to dump debug information to file.

Parameters
[in]_do_debug_dumpWhether to dump debug information to file
[in]_debug_dump_filenameThe filename to dump debug information to

Definition at line 945 of file SolverConfig.hpp.

◆ set_enable_particle_reordering()

template<class Tvec, template< class > class SPHKernel>
void shammodels::sph::SolverConfig< Tvec, SPHKernel >::set_enable_particle_reordering ( bool enable)
inline

Definition at line 612 of file SolverConfig.hpp.

◆ set_eos_adiabatic()

template<class Tvec, template< class > class SPHKernel>
void shammodels::sph::SolverConfig< Tvec, SPHKernel >::set_eos_adiabatic ( Tscal gamma)
inline

Set the EOS configuration to an adiabatic equation of state.

Parameters
gammaThe adiabatic index

Definition at line 685 of file SolverConfig.hpp.

◆ set_eos_fermi()

template<class Tvec, template< class > class SPHKernel>
void shammodels::sph::SolverConfig< Tvec, SPHKernel >::set_eos_fermi ( Tscal mu_e)
inline

Set the EOS configuration to a Fermi equation of state.

Parameters
mu_eThe mean molecular weight

Definition at line 741 of file SolverConfig.hpp.

◆ set_eos_isothermal()

template<class Tvec, template< class > class SPHKernel>
void shammodels::sph::SolverConfig< Tvec, SPHKernel >::set_eos_isothermal ( Tscal cs)
inline

Set the EOS configuration to an isothermal equation of state.

Parameters
csThe isothermal index

Definition at line 678 of file SolverConfig.hpp.

◆ set_eos_locally_isothermal()

template<class Tvec, template< class > class SPHKernel>
void shammodels::sph::SolverConfig< Tvec, SPHKernel >::set_eos_locally_isothermal ( )
inline

Set the EOS configuration to a locally isothermal equation of state.

Definition at line 697 of file SolverConfig.hpp.

◆ set_eos_locally_isothermalFA2014()

template<class Tvec, template< class > class SPHKernel>
void shammodels::sph::SolverConfig< Tvec, SPHKernel >::set_eos_locally_isothermalFA2014 ( Tscal h_over_r)
inline

Set the EOS configuration to a locally isothermal equation of state fromFarris 2014.

Parameters
cs0Soundspeed at the reference radius
qPower exponent of the soundspeed profile
r0Reference radius

Definition at line 718 of file SolverConfig.hpp.

◆ set_eos_locally_isothermalFA2014_extended()

template<class Tvec, template< class > class SPHKernel>
void shammodels::sph::SolverConfig< Tvec, SPHKernel >::set_eos_locally_isothermalFA2014_extended ( Tscal cs0,
Tscal q,
Tscal r0,
u32 n_sinks )
inline

Set the EOS configuration to a locally isothermal equation of state from Farris 2014 extended to q != 1/2.

Parameters
cs0Soundspeed at the reference radius
qPower exponent of the soundspeed profile
r0Reference radius
n_sinksNumber of sinks to consider for the equation of state

Definition at line 731 of file SolverConfig.hpp.

◆ set_eos_locally_isothermalLP07()

template<class Tvec, template< class > class SPHKernel>
void shammodels::sph::SolverConfig< Tvec, SPHKernel >::set_eos_locally_isothermalLP07 ( Tscal cs0,
Tscal q,
Tscal r0 )
inline

Set the EOS configuration to a locally isothermal equation of state from Lodato Price 2007.

Parameters
cs0Soundspeed at the reference radius
qPower exponent of the soundspeed profile
r0Reference radius

Definition at line 707 of file SolverConfig.hpp.

◆ set_eos_polytropic()

template<class Tvec, template< class > class SPHKernel>
void shammodels::sph::SolverConfig< Tvec, SPHKernel >::set_eos_polytropic ( Tscal K,
Tscal gamma )
inline

Set the EOS configuration to an polytropic equation of state.

Parameters
gammaThe adiabatic index

Definition at line 692 of file SolverConfig.hpp.

◆ set_ghost_layout()

template<class Tvec, template< class > class SPHKernel>
void shammodels::sph::SolverConfig< Tvec, SPHKernel >::set_ghost_layout ( shamrock::patch::PatchDataLayerLayout & ghost_layout)

Definition at line 123 of file SolverConfig.cpp.

◆ set_IdealMHD()

template<class Tvec, template< class > class SPHKernel>
void shammodels::sph::SolverConfig< Tvec, SPHKernel >::set_IdealMHD ( typename MHDConfig::IdealMHD_constrained_hyper_para v)
inline

Enable the ideal MHD hydro solver.

Definition at line 539 of file SolverConfig.hpp.

◆ set_layout()

template<class Tvec, template< class > class SPHKernel>
void shammodels::sph::SolverConfig< Tvec, SPHKernel >::set_layout ( shamrock::patch::PatchDataLayerLayout & pdl)

Definition at line 24 of file SolverConfig.cpp.

◆ set_next_dt()

template<class Tvec, template< class > class SPHKernel>
void shammodels::sph::SolverConfig< Tvec, SPHKernel >::set_next_dt ( Tscal dt)
inline

Set the time step for the next iteration.

Definition at line 497 of file SolverConfig.hpp.

◆ set_noMHD()

template<class Tvec, template< class > class SPHKernel>
void shammodels::sph::SolverConfig< Tvec, SPHKernel >::set_noMHD ( )
inline

disable MHD in the SPH solver

Definition at line 533 of file SolverConfig.hpp.

◆ set_NonIdealMHD()

template<class Tvec, template< class > class SPHKernel>
void shammodels::sph::SolverConfig< Tvec, SPHKernel >::set_NonIdealMHD ( typename MHDConfig::NonIdealMHD v)
inline

Definition at line 543 of file SolverConfig.hpp.

◆ set_particle_reordering_step_freq()

template<class Tvec, template< class > class SPHKernel>
void shammodels::sph::SolverConfig< Tvec, SPHKernel >::set_particle_reordering_step_freq ( u64 freq)
inline

Definition at line 614 of file SolverConfig.hpp.

◆ set_particle_tracking()

template<class Tvec, template< class > class SPHKernel>
void shammodels::sph::SolverConfig< Tvec, SPHKernel >::set_particle_tracking ( bool state)
inline

Definition at line 422 of file SolverConfig.hpp.

◆ set_save_dt_to_fields()

template<class Tvec, template< class > class SPHKernel>
void shammodels::sph::SolverConfig< Tvec, SPHKernel >::set_save_dt_to_fields ( bool enable)
inline

Definition at line 623 of file SolverConfig.hpp.

◆ set_show_ghost_zone_graph()

template<class Tvec, template< class > class SPHKernel>
void shammodels::sph::SolverConfig< Tvec, SPHKernel >::set_show_ghost_zone_graph ( bool enable)
inline

Definition at line 627 of file SolverConfig.hpp.

◆ set_show_neigh_stats()

template<class Tvec, template< class > class SPHKernel>
void shammodels::sph::SolverConfig< Tvec, SPHKernel >::set_show_neigh_stats ( bool enable)
inline

Definition at line 583 of file SolverConfig.hpp.

◆ set_smoothing_length_density_based()

template<class Tvec, template< class > class SPHKernel>
void shammodels::sph::SolverConfig< Tvec, SPHKernel >::set_smoothing_length_density_based ( )
inline

Definition at line 604 of file SolverConfig.hpp.

◆ set_smoothing_length_density_based_neigh_lim()

template<class Tvec, template< class > class SPHKernel>
void shammodels::sph::SolverConfig< Tvec, SPHKernel >::set_smoothing_length_density_based_neigh_lim ( u32 max_neigh_count)
inline

Definition at line 607 of file SolverConfig.hpp.

◆ set_time()

template<class Tvec, template< class > class SPHKernel>
void shammodels::sph::SolverConfig< Tvec, SPHKernel >::set_time ( Tscal t)
inline

Set the current time.

Definition at line 494 of file SolverConfig.hpp.

◆ set_tree_reduction_level()

template<class Tvec, template< class > class SPHKernel>
void shammodels::sph::SolverConfig< Tvec, SPHKernel >::set_tree_reduction_level ( u32 level)
inline

Setter for the tree reduction level.

Definition at line 578 of file SolverConfig.hpp.

◆ set_two_stage_search()

template<class Tvec, template< class > class SPHKernel>
void shammodels::sph::SolverConfig< Tvec, SPHKernel >::set_two_stage_search ( bool enable)
inline

Setter for the two stage search.

Definition at line 580 of file SolverConfig.hpp.

◆ set_units()

template<class Tvec, template< class > class SPHKernel>
void shammodels::sph::SolverConfig< Tvec, SPHKernel >::set_units ( shamunits::UnitSystem< Tscal > new_sys)
inline

Set the unit system of the simulation.

Definition at line 434 of file SolverConfig.hpp.

◆ should_save_dt_to_fields()

template<class Tvec, template< class > class SPHKernel>
bool shammodels::sph::SolverConfig< Tvec, SPHKernel >::should_save_dt_to_fields ( ) const
inline

Definition at line 624 of file SolverConfig.hpp.

◆ use_luminosity()

template<class Tvec, template< class > class SPHKernel>
void shammodels::sph::SolverConfig< Tvec, SPHKernel >::use_luminosity ( bool enable)
inline

Definition at line 1005 of file SolverConfig.hpp.

Member Data Documentation

◆ artif_viscosity

template<class Tvec, template< class > class SPHKernel>
AVConfig shammodels::sph::SolverConfig< Tvec, SPHKernel >::artif_viscosity

Configuration for the Artificial Viscosity (AV).

Definition at line 765 of file SolverConfig.hpp.

◆ boundary_config

template<class Tvec, template< class > class SPHKernel>
BCConfig shammodels::sph::SolverConfig< Tvec, SPHKernel >::boundary_config

Boundary condition configuration.

See the documentation of the BCConfig struct for more informations.

Definition at line 830 of file SolverConfig.hpp.

◆ cfl_config

template<class Tvec, template< class > class SPHKernel>
CFLConfig<Tscal> shammodels::sph::SolverConfig< Tvec, SPHKernel >::cfl_config

The configuration for the CFL condition.

Definition at line 418 of file SolverConfig.hpp.

◆ combined_dtdiv_divcurlv_compute

template<class Tvec, template< class > class SPHKernel>
bool shammodels::sph::SolverConfig< Tvec, SPHKernel >::combined_dtdiv_divcurlv_compute = false

Use the combined dtdivv and divcurlv compute

Definition at line 592 of file SolverConfig.hpp.

◆ compute_luminosity

template<class Tvec, template< class > class SPHKernel>
bool shammodels::sph::SolverConfig< Tvec, SPHKernel >::compute_luminosity = false

Whether to store luminosity.

Definition at line 1004 of file SolverConfig.hpp.

◆ debug_dump_filename

template<class Tvec, template< class > class SPHKernel>
std::string shammodels::sph::SolverConfig< Tvec, SPHKernel >::debug_dump_filename = ""

The filename to dump debug information in.

Definition at line 939 of file SolverConfig.hpp.

◆ dim

template<class Tvec, template< class > class SPHKernel>
u32 shammodels::sph::SolverConfig< Tvec, SPHKernel >::dim = shambase::VectorProperties<Tvec>::dimension
staticconstexpr

The dimension of the problem.

Definition at line 406 of file SolverConfig.hpp.

◆ do_debug_dump

template<class Tvec, template< class > class SPHKernel>
bool shammodels::sph::SolverConfig< Tvec, SPHKernel >::do_debug_dump = false

Whether to dump debug information to file.

Definition at line 936 of file SolverConfig.hpp.

◆ dust_config

template<class Tvec, template< class > class SPHKernel>
DustConfig shammodels::sph::SolverConfig< Tvec, SPHKernel >::dust_config = {}

Definition at line 554 of file SolverConfig.hpp.

◆ enable_particle_reordering

template<class Tvec, template< class > class SPHKernel>
bool shammodels::sph::SolverConfig< Tvec, SPHKernel >::enable_particle_reordering = false

Definition at line 611 of file SolverConfig.hpp.

◆ eos_config

template<class Tvec, template< class > class SPHKernel>
EOSConfig shammodels::sph::SolverConfig< Tvec, SPHKernel >::eos_config

EOS configuration.

Definition at line 641 of file SolverConfig.hpp.

◆ epsilon_h

template<class Tvec, template< class > class SPHKernel>
Tscal shammodels::sph::SolverConfig< Tvec, SPHKernel >::epsilon_h = 1e-6

Convergence criteria for the smoothing length.

Definition at line 598 of file SolverConfig.hpp.

◆ ext_force_config

template<class Tvec, template< class > class SPHKernel>
ExtForceConfig shammodels::sph::SolverConfig< Tvec, SPHKernel >::ext_force_config {}

External force configuration.

Definition at line 881 of file SolverConfig.hpp.

◆ gpart_mass

template<class Tvec, template< class > class SPHKernel>
Tscal shammodels::sph::SolverConfig< Tvec, SPHKernel >::gpart_mass

The mass of each gas particle.

Definition at line 417 of file SolverConfig.hpp.

◆ h_iter_per_subcycles

template<class Tvec, template< class > class SPHKernel>
u32 shammodels::sph::SolverConfig< Tvec, SPHKernel >::h_iter_per_subcycles = 50

Maximum number of iterations per subcycle.

Definition at line 599 of file SolverConfig.hpp.

◆ h_max_subcycles_count

template<class Tvec, template< class > class SPHKernel>
u32 shammodels::sph::SolverConfig< Tvec, SPHKernel >::h_max_subcycles_count = 100

Maximum number of subcycles before solver crash.

Definition at line 600 of file SolverConfig.hpp.

◆ htol_up_coarse_cycle

template<class Tvec, template< class > class SPHKernel>
Tscal shammodels::sph::SolverConfig< Tvec, SPHKernel >::htol_up_coarse_cycle = 1.1

Factor applied to the smoothing length for neighbors search (and ghost zone size)

Note
This value must be larger or equal to htol_up_fine_cycle

Definition at line 595 of file SolverConfig.hpp.

◆ htol_up_fine_cycle

template<class Tvec, template< class > class SPHKernel>
Tscal shammodels::sph::SolverConfig< Tvec, SPHKernel >::htol_up_fine_cycle = 1.1

Maximum factor of the smoothing length evolution per subcycles.

Definition at line 597 of file SolverConfig.hpp.

◆ mhd_config

template<class Tvec, template< class > class SPHKernel>
MHDConfig shammodels::sph::SolverConfig< Tvec, SPHKernel >::mhd_config = {}

Definition at line 530 of file SolverConfig.hpp.

◆ particle_killing

template<class Tvec, template< class > class SPHKernel>
ParticleKillingConfig<Tvec> shammodels::sph::SolverConfig< Tvec, SPHKernel >::particle_killing

Definition at line 477 of file SolverConfig.hpp.

◆ particle_reordering_step_freq

template<class Tvec, template< class > class SPHKernel>
u64 shammodels::sph::SolverConfig< Tvec, SPHKernel >::particle_reordering_step_freq = 1000

Definition at line 613 of file SolverConfig.hpp.

◆ Rkern

template<class Tvec, template< class > class SPHKernel>
Tscal shammodels::sph::SolverConfig< Tvec, SPHKernel >::Rkern = Kernel::Rkern
staticconstexpr

The radius of the sph kernel.

Definition at line 415 of file SolverConfig.hpp.

◆ save_dt_to_fields

template<class Tvec, template< class > class SPHKernel>
bool shammodels::sph::SolverConfig< Tvec, SPHKernel >::save_dt_to_fields = false

Definition at line 622 of file SolverConfig.hpp.

◆ scheduler_conf

template<class Tvec, template< class > class SPHKernel>
PatchSchedulerConfig shammodels::sph::SolverConfig< Tvec, SPHKernel >::scheduler_conf = {}

Definition at line 424 of file SolverConfig.hpp.

◆ self_grav_config

template<class Tvec, template< class > class SPHKernel>
SelfGravConfig shammodels::sph::SolverConfig< Tvec, SPHKernel >::self_grav_config = SelfGravConfig{}

Definition at line 564 of file SolverConfig.hpp.

◆ show_cfl_detail

template<class Tvec, template< class > class SPHKernel>
bool shammodels::sph::SolverConfig< Tvec, SPHKernel >::show_cfl_detail = false

Definition at line 519 of file SolverConfig.hpp.

◆ show_ghost_zone_graph

template<class Tvec, template< class > class SPHKernel>
bool shammodels::sph::SolverConfig< Tvec, SPHKernel >::show_ghost_zone_graph = false

Definition at line 626 of file SolverConfig.hpp.

◆ show_neigh_stats

template<class Tvec, template< class > class SPHKernel>
bool shammodels::sph::SolverConfig< Tvec, SPHKernel >::show_neigh_stats = false

Definition at line 582 of file SolverConfig.hpp.

◆ smoothing_length_config

template<class Tvec, template< class > class SPHKernel>
SmoothingLengthConfig shammodels::sph::SolverConfig< Tvec, SPHKernel >::smoothing_length_config

Definition at line 602 of file SolverConfig.hpp.

◆ time_state

template<class Tvec, template< class > class SPHKernel>
SolverStatusVar shammodels::sph::SolverConfig< Tvec, SPHKernel >::time_state

The time sate of the simulation.

Definition at line 491 of file SolverConfig.hpp.

◆ track_particles_id

template<class Tvec, template< class > class SPHKernel>
bool shammodels::sph::SolverConfig< Tvec, SPHKernel >::track_particles_id = false

Definition at line 420 of file SolverConfig.hpp.

◆ tree_reduction_level

template<class Tvec, template< class > class SPHKernel>
u32 shammodels::sph::SolverConfig< Tvec, SPHKernel >::tree_reduction_level = 3

Reduction level to be used in the tree build.

Definition at line 574 of file SolverConfig.hpp.

◆ unit_sys

template<class Tvec, template< class > class SPHKernel>
std::optional<shamunits::UnitSystem<Tscal> > shammodels::sph::SolverConfig< Tvec, SPHKernel >::unit_sys = {}

The unit system of the simulation.

Definition at line 431 of file SolverConfig.hpp.

◆ use_two_stage_search

template<class Tvec, template< class > class SPHKernel>
bool shammodels::sph::SolverConfig< Tvec, SPHKernel >::use_two_stage_search = true

Use two stage neighbors search (see shamrock paper).

Definition at line 575 of file SolverConfig.hpp.


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