Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
shammodels::sph::modules::GeneratorLattice< Tvec, Lattice, discontinuous > Class Template Reference

Setup node generating particles on a lattice. More...

#include <shammodels/sph/include/shammodels/sph/modules/setup/GeneratorLattice.hpp>

Inheritance diagram for shammodels::sph::modules::GeneratorLattice< Tvec, Lattice, discontinuous >:
Collaboration diagram for shammodels::sph::modules::GeneratorLattice< Tvec, Lattice, discontinuous >:

Public Member Functions

 GeneratorLattice (ShamrockCtx &context, Tscal dr, std::pair< Tvec, Tvec > box, Tscal init_h_factor=default_init_h_factor)
bool is_done ()
 This function return true if the setup is done.
shamrock::patch::PatchDataLayer next_n (u32 nmax)
 This function generate patchdata with at most nmax per MPI ranks This function is always assumed as called by every ranks simultaneously.
std::string get_name ()
 Get the name of the node.
ISPHSetupNode_Dot get_dot_subgraph ()
 Get a dot subgraph describing the node and its childrens (recursively).
Public Member Functions inherited from shammodels::sph::modules::ISPHSetupNode
virtual ~ISPHSetupNode ()=default
 Virtual destructor for the ISPHSetupNode class.
std::string get_dot ()
 Generate a dot graph for the setup tree.

Static Public Attributes

static constexpr Tscal default_init_h_factor = LatticeProperties<Lattice>::default_init_h_factor
 Default ratio between the initial smoothing length and dr (see LatticeProperties).

Detailed Description

template<class Tvec, class Lattice, bool discontinuous = true>
class shammodels::sph::modules::GeneratorLattice< Tvec, Lattice, discontinuous >

Setup node generating particles on a lattice.

Template Parameters
Tvecposition vector type
Latticelattice class (shammath::LatticeHCP, LatticeFCC or LatticeCubic)
discontinuousif true, use the discontinuous lattice iterator

Definition at line 68 of file GeneratorLattice.hpp.

Constructor & Destructor Documentation

◆ GeneratorLattice()

template<class Tvec, class Lattice, bool discontinuous = true>
shammodels::sph::modules::GeneratorLattice< Tvec, Lattice, discontinuous >::GeneratorLattice ( ShamrockCtx & context,
Tscal dr,
std::pair< Tvec, Tvec > box,
Tscal init_h_factor = default_init_h_factor )
inline

Definition at line 97 of file GeneratorLattice.hpp.

Member Function Documentation

◆ get_dot_subgraph()

template<class Tvec, class Lattice, bool discontinuous = true>
ISPHSetupNode_Dot shammodels::sph::modules::GeneratorLattice< Tvec, Lattice, discontinuous >::get_dot_subgraph ( )
inlinevirtual

Get a dot subgraph describing the node and its childrens (recursively).

This function should return a ISPHSetupNode_Dot object which contains all the information needed to generate a dot graph for the node and its children.

Returns
A ISPHSetupNode_Dot object

Implements shammodels::sph::modules::ISPHSetupNode.

Definition at line 169 of file GeneratorLattice.hpp.

◆ get_name()

template<class Tvec, class Lattice, bool discontinuous = true>
std::string shammodels::sph::modules::GeneratorLattice< Tvec, Lattice, discontinuous >::get_name ( )
inlinevirtual

Get the name of the node.

Returns
The name of the node

Implements shammodels::sph::modules::ISPHSetupNode.

Definition at line 168 of file GeneratorLattice.hpp.

◆ is_done()

template<class Tvec, class Lattice, bool discontinuous = true>
bool shammodels::sph::modules::GeneratorLattice< Tvec, Lattice, discontinuous >::is_done ( )
inlinevirtual

This function return true if the setup is done.

Returns
true if done, false otherwise

Implements shammodels::sph::modules::ISPHSetupNode.

Definition at line 105 of file GeneratorLattice.hpp.

◆ next_n()

template<class Tvec, class Lattice, bool discontinuous = true>
shamrock::patch::PatchDataLayer shammodels::sph::modules::GeneratorLattice< Tvec, Lattice, discontinuous >::next_n ( u32 nmax)
inlinevirtual

This function generate patchdata with at most nmax per MPI ranks This function is always assumed as called by every ranks simultaneously.

Parameters
nmax
Returns
shamrock::patch::PatchData

Implements shammodels::sph::modules::ISPHSetupNode.

Definition at line 107 of file GeneratorLattice.hpp.

Member Data Documentation

◆ default_init_h_factor

template<class Tvec, class Lattice, bool discontinuous = true>
Tscal shammodels::sph::modules::GeneratorLattice< Tvec, Lattice, discontinuous >::default_init_h_factor = LatticeProperties<Lattice>::default_init_h_factor
staticconstexpr

Default ratio between the initial smoothing length and dr (see LatticeProperties).

Definition at line 85 of file GeneratorLattice.hpp.


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