26 bool scat_elem_num_is_trivial =
true;
27 for (
size_t i = 0; i < this->particle_scattering_element_number.size(); ++i) {
28 if (this->particle_scattering_element_number[i] != i + 1) scat_elem_num_is_trivial =
false;
30 if (!scat_elem_num_is_trivial)
33 if (this->particle_constituent_number.size() > 1)
44 bool comp_whole_is_trivial =
false;
45 if (std::all_of(particle_scattering_element_composition_whole.begin(),
46 particle_scattering_element_composition_whole.end(),
47 [](uint8_t v)->
bool {
return (v == 1) ? true :
false; }))
48 comp_whole_is_trivial =
true;
49 if (!comp_whole_is_trivial)
56 const std::string &name, std::shared_ptr<H5::Group> grp)
const gsl::span< const uint8_t > particle_scattering_element_composition_whole
void apply(icedb::Shapes::NewShapeCommonOptionalProperties &) const
static Shape_Type createShape(Groups::Group &grpshp, const std::string &uid, gsl::not_null< const NewShapeRequiredProperties *> required, const NewShapeCommonOptionalProperties *optional=nullptr)
Create a new shape.
uint64_t number_of_particle_scattering_elements
uint8_t particle_scattering_element_coordinates_are_integral
Strucure containing a list of all of the required data needed to create a new shape in the database...
std::string particle_id
ATTRIBUTE: Unique Particle Identifier.
gsl::span< const float > particle_scattering_element_radius
void apply(icedb::Shapes::NewShapeRequiredProperties &) const
float particle_scattering_element_spacing
OPTIONAL ATTRIBUTE: Physical spacing between adjacent grid points (in meters). Used in DDA...
float hint_max_scattering_element_dimension
EXPERIMENTAL HINT: Specify the maximum scattering element dimension.
icedb::Shapes::Shape::Shape_Type toShape(const std::string &name, std::shared_ptr< H5::Group >) const
Make a new shape under the group.
std::string particle_constituent_single_name
uint8_t number_of_particle_constituents
FloatData_t particle_scattering_element_coordinates
uint64_t number_of_particle_scattering_elements
Structure containing a list of all of the common optional data for creating a new shape in the databa...
gsl::span< const float > particle_scattering_element_coordinates
gsl::span< const uint64_t > particle_scattering_element_number
DIMENSION: The id number for each scattering element. Single dimension.
uint64_t particle_scattering_element_coordinates_are_integral
gsl::span< const float > particle_scattering_element_composition_fractional
std::unique_ptr< Shape > Shape_Type
The preferred C++ type for referencing a shape.
gsl::span< const std::string > particle_constituent_name
gsl::span< const uint8_t > particle_constituent_number
DIMENSION: The id number of each particle's constituent. Single dimension.
uint8_t number_of_particle_constituents