Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | Static Public Attributes | List of all members
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_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.
 
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 272 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 631 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 692 of file SolverConfig.hpp.

◆ DustConfig

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

Definition at line 422 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 507 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 745 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 279 of file SolverConfig.hpp.

◆ MHDConfig

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

Definition at line 398 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 283 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 359 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 275 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 281 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 770 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 758 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 782 of file SolverConfig.hpp.

+ Here is the call graph for this function:

◆ check_config()

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

Definition at line 876 of file SolverConfig.hpp.

◆ do_MHD_debug()

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

Whether to add debug fields to the pdl.

Definition at line 810 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 388 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 380 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 319 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 308 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 330 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 374 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 371 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 817 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 840 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 828 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 848 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 857 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 837 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 854 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 831 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 860 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 834 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 851 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 843 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 822 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 519 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 537 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 531 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 513 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 525 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 867 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 649 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 677 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 639 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 669 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 659 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 704 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 709 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 722 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 383 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 377 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 804 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 481 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 554 of file SolverConfig.hpp.

+ Here is the call graph for this function:

◆ 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 610 of file SolverConfig.hpp.

+ Here is the call graph for this function:

◆ 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 547 of file SolverConfig.hpp.

+ Here is the call graph for this function:

◆ 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 566 of file SolverConfig.hpp.

+ Here is the call graph for this function:

◆ 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 587 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 600 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 576 of file SolverConfig.hpp.

+ Here is the call graph for this function:

◆ 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 561 of file SolverConfig.hpp.

+ Here is the call graph for this function:

◆ 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 117 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 408 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 368 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 402 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 412 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 483 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 293 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 492 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 496 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 452 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 473 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 476 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 365 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 447 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 449 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 305 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 493 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 864 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 634 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 699 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 289 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 461 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 863 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 798 of file SolverConfig.hpp.

◆ dim

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

The dimension of the problem.

Definition at line 277 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 795 of file SolverConfig.hpp.

◆ dust_config

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

Definition at line 423 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 480 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 510 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 467 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 750 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 288 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 468 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 469 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 464 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 466 of file SolverConfig.hpp.

◆ mhd_config

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

Definition at line 399 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 348 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 482 of file SolverConfig.hpp.

◆ Rkern

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

The radius of the sph kernel.

Definition at line 286 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 491 of file SolverConfig.hpp.

◆ scheduler_conf

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

Definition at line 295 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 433 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 495 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 451 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 471 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 362 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 291 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 443 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 302 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 444 of file SolverConfig.hpp.


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