29 #ifndef DIFFUSION_REACTION_PARTICLES_H 30 #define DIFFUSION_REACTION_PARTICLES_H 35 #include "diffusion_reaction.h" 44 template <
class BaseParticlesType = BaseParticles>
50 std::map<std::string, size_t> species_indexes_map_;
56 template <
class BaseMaterialType>
62 species_indexes_map_(diffusion_reaction_material->SpeciesIndexMap())
69 std::map<std::string, size_t> SpeciesIndexMap() {
return species_indexes_map_; };
71 virtual void initializeOtherVariables()
override 73 BaseParticlesType::initializeOtherVariables();
75 std::map<std::string, size_t>::iterator itr;
76 for (itr = species_indexes_map_.begin(); itr != species_indexes_map_.end(); ++itr)
79 this->registerVariable(
species_n_[itr->second], itr->first);
82 this->
template registerSortableVariable<Real>(itr->first);
84 this->
template addVariableToWrite<Real>(itr->first);
89 constexpr
int type_index = DataTypeIndex<Real>::value;
93 std::get<type_index>(this->all_particle_data_).push_back(&
diffusion_dt_[m]);
94 diffusion_dt_[m].resize(this->real_particles_bound_, Real(0));
98 virtual DiffusionReactionParticles<BaseParticlesType> *ThisObjectPtr()
override {
return this; };
101 #endif // DIFFUSION_REACTION_PARTICLES_H size_t number_of_species_
Definition: diffusion_reaction_particles.h:48
Complex material for diffusion or/and reactions.
Definition: diffusion_reaction.h:195
size_t number_of_diffusion_species_
Definition: diffusion_reaction_particles.h:49
StdVec< StdLargeVec< Real > > diffusion_dt_
Definition: diffusion_reaction_particles.h:54
This is the base classes of SPH bodies. The real body is for that with cell linked list and the ficti...
This is the base classes of all materials. A function in a derived material class returns a value wit...
StdVec< StdLargeVec< Real > > species_n_
Definition: diffusion_reaction_particles.h:53
This is the base class of SPH particles. The basic data of the particles is saved in separated large ...
A group of particles with diffusion or/and reactions particle data.
Definition: diffusion_reaction_particles.h:45
SPHBody is a base body with basic data and functions. Its derived class can be a real fluid body...
Definition: base_body.h:61
Definition: solid_body_supplementary.cpp:9