Debian Codegraph @

packages/seacas/libraries/ioss/src/Ioss_EntitySet.C

raw
1 // Copyright(C) 1999-2020 National Technology & Engineering Solutions
2 // of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
3 // NTESS, the U.S. Government retains certain rights in this software.
4 //
5 // See packages/seacas/LICENSE for details
6
7 #include "Ioss_EntitySet.h"
8 #include "Ioss_Field.h"
9 #include "Ioss_Property.h"
10 #include <cstddef>
11
12 #include "Ioss_FieldManager.h"
13 #include "Ioss_GroupingEntity.h"
14 #include "Ioss_PropertyManager.h"
15
16 namespace Ioss {
17 class DatabaseIO;
18 } // namespace Ioss
19
20 /** \brief Base class constructor adds "name" and "entity_count" properties to the set.
21 *
22 * \param[in] io_database The database associated with the set.
23 * \param[in] my_name The set name.
24 * \param[in] entity_cnt The number of subentities in the set.
25 *
26 */
27 Ioss::EntitySet::EntitySet(Ioss::DatabaseIO *io_database, const std::string &my_name,
28 size_t entity_cnt)
29 : Ioss::GroupingEntity(io_database, my_name, entity_cnt)
30 {
31 properties.add(Ioss::Property("distribution_factor_count", static_cast<int>(entity_cnt)));
32
33 // Add the standard fields...
34 fields.add(Ioss::Field("distribution_factors", Ioss::Field::REAL, "scalar", Ioss::Field::MESH,
35 entity_cnt));
36 fields.add(Ioss::Field("ids_raw", field_int_type(), "scalar", Ioss::Field::MESH, entity_cnt));
37 }
38
39 Ioss::Property Ioss::EntitySet::get_implicit_property(const std::string &my_name) const
40 {
41 return Ioss::GroupingEntity::get_implicit_property(my_name);
42 }