7 #ifndef SPH_DATA_CONTAINERS_H 8 #define SPH_DATA_CONTAINERS_H 10 #include "base_data_package.h" 11 #include "base_data_type.h" 32 using RealBodyVector = StdVec<RealBody *>;
33 using BodyPartVector = StdVec<BodyPart *>;
34 using FictitiousBodyVector = StdVec<FictitiousBody *>;
49 template <
class DataType>
66 template <
typename VariableType>
69 template <
typename VariableOperation>
71 ParticleDataMap &particle_data_map, VariableOperation &variable_operation)
const 74 for (
auto const &name_index : particle_data_map[type_index])
76 std::string variable_name = name_index.first;
77 StdLargeVec<VariableType> &variable = *(std::get<type_index>(particle_data)[name_index.second]);
78 variable_operation(variable_name, variable);
84 template <
typename VariableType>
87 template <
typename VariableOperation>
92 for (std::pair<std::string, size_t> &name_index : variable_name_list[type_index])
94 std::string variable_name = name_index.first;
95 StdLargeVec<VariableType> &variable = *(std::get<type_index>(particle_data)[name_index.second]);
96 variable_operation(variable_name, variable);
101 #endif // SPH_DATA_CONTAINERS_H StdVec< ConcurrentCellLists > SplitCellLists
Definition: sph_data_containers.h:54
LargeVec< CellList * > ConcurrentCellLists
Definition: sph_data_containers.h:52
StdVec< size_t > IndexVector
Definition: sph_data_containers.h:37
std::array< StdVec< std::pair< std::string, size_t > >, 4 > ParticleVariableList
Definition: sph_data_containers.h:63
GeneralDataAssemble< StdLargeVec > ParticleData
Definition: sph_data_containers.h:59
StdLargeVec< CellList * > CellLists
Definition: sph_data_containers.h:46
LargeVec< size_t > ConcurrentIndexVector
Definition: sph_data_containers.h:39
StdLargeVec< ListData > ListDataVector
Definition: sph_data_containers.h:44
Definition: sph_data_containers.h:85
std::pair< size_t, Vecd > ListData
Definition: sph_data_containers.h:42
LargeVec< DataType > ConcurrentVector
Definition: sph_data_containers.h:50
Definition: sph_data_containers.h:67
StdVec< std::pair< Vecd, Real > > PositionsVolumes
Definition: sph_data_containers.h:56
StdVec< SPHBody * > SPHBodyVector
Definition: sph_data_containers.h:30
Definition: base_data_type.h:320
std::array< std::map< std::string, size_t >, 4 > ParticleDataMap
Definition: sph_data_containers.h:61
StdVec< BaseMaterial * > MaterialVector
Definition: sph_data_containers.h:28
std::tuple< StdVec< DataContainerType< Real > * >, StdVec< DataContainerType< Vecd > * >, StdVec< DataContainerType< Matd > * >, StdVec< DataContainerType< int > * > > GeneralDataAssemble
Definition: base_data_package.h:42
Definition: solid_body_supplementary.cpp:9