IOSS  2.0
Ioss_ElementBlock.h
Go to the documentation of this file.
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 #ifndef IOSS_Ioss_ElementBlock_h
8 #define IOSS_Ioss_ElementBlock_h
9 
10 #include <Ioss_BoundingBox.h>
11 #include <Ioss_CodeTypes.h>
12 #include <Ioss_EntityBlock.h>
13 #include <Ioss_Property.h>
14 #include <cassert>
15 #include <string>
16 
17 namespace Ioss {
18  class DatabaseIO;
19 
20  /** \brief A collection of elements having the same topology.
21  */
22  class ElementBlock : public EntityBlock
23  {
24  public:
25  ElementBlock(DatabaseIO *io_database, const std::string &my_name,
26  const std::string &element_type, int64_t number_elements);
27 
28  ElementBlock(const ElementBlock &) = default;
29  ~ElementBlock() override;
30 
31  std::string type_string() const override { return "ElementBlock"; }
32  std::string short_type_string() const override { return "block"; }
33  std::string contains_string() const override { return "Element"; }
34  EntityType type() const override { return ELEMENTBLOCK; }
35 
36  // Handle implicit properties -- These are calcuated from data stored
37  // in the grouping entity instead of having an explicit value assigned.
38  // An example would be 'element_block_count' for a region.
39  Property get_implicit_property(const std::string &my_name) const override;
40 
41  void get_block_adjacencies(std::vector<std::string> &block_adjacency) const;
43 
44  protected:
45  int64_t internal_get_field_data(const Field &field, void *data,
46  size_t data_size) const override;
47 
48  int64_t internal_put_field_data(const Field &field, void *data,
49  size_t data_size) const override;
50 
51  private:
52  };
53 } // namespace Ioss
54 #endif
Ioss::Field
Holds metadata for bulk data associated with a GroupingEntity.
Definition: Ioss_Field.h:22
Ioss_Property.h
Ioss::ElementBlock::type_string
std::string type_string() const override
Get the name of the particular type of entity.
Definition: Ioss_ElementBlock.h:31
Ioss::ElementBlock::ElementBlock
ElementBlock(DatabaseIO *io_database, const std::string &my_name, const std::string &element_type, int64_t number_elements)
Create an element block.
Definition: Ioss_ElementBlock.C:28
Ioss::ElementBlock::type
EntityType type() const override
Get the EntityType, which indicates the particular type of GroupingEntity this is.
Definition: Ioss_ElementBlock.h:34
Ioss::ElementBlock::get_block_adjacencies
void get_block_adjacencies(std::vector< std::string > &block_adjacency) const
Definition: Ioss_ElementBlock.C:59
Ioss::ElementBlock::internal_put_field_data
int64_t internal_put_field_data(const Field &field, void *data, size_t data_size) const override
Definition: Ioss_ElementBlock.C:53
Ioss
The main namespace for the Ioss library.
Definition: Ioad_DatabaseIO.C:40
Ioss::ElementBlock::internal_get_field_data
int64_t internal_get_field_data(const Field &field, void *data, size_t data_size) const override
Definition: Ioss_ElementBlock.C:47
Ioss::ElementBlock::get_implicit_property
Property get_implicit_property(const std::string &my_name) const override
Calculate and get an implicit property.
Definition: Ioss_ElementBlock.C:42
Ioss::EntityType
EntityType
The particular type of GroupingEntity.
Definition: Ioss_EntityType.h:13
Ioss::DatabaseIO
An input or output Database.
Definition: Ioss_DatabaseIO.h:59
Ioss::AxisAlignedBoundingBox
Definition: Ioss_BoundingBox.h:12
Ioss::ELEMENTBLOCK
@ ELEMENTBLOCK
Definition: Ioss_EntityType.h:17
Ioss::EntityBlock
Base class for all 'block'-type grouping entities, which means all members of the block are similar o...
Definition: Ioss_EntityBlock.h:36
Ioss::ElementBlock::ElementBlock
ElementBlock(const ElementBlock &)=default
Ioss::ElementBlock
A collection of elements having the same topology.
Definition: Ioss_ElementBlock.h:23
Ioss::ElementBlock::short_type_string
std::string short_type_string() const override
Get a short name of the particular type of entity.
Definition: Ioss_ElementBlock.h:32
anonymous_namespace{cth_pressure_map.C}::data
std::vector< char > data
Definition: cth_pressure_map.C:48
Ioss::ElementBlock::~ElementBlock
~ElementBlock() override
Ioss_BoundingBox.h
Ioss::ElementBlock::contains_string
std::string contains_string() const override
What does this entity contain.
Definition: Ioss_ElementBlock.h:33
Ioss::Property
A named value that has a known type.
Definition: Ioss_Property.h:24
Ioss::ElementBlock::get_bounding_box
AxisAlignedBoundingBox get_bounding_box() const
Definition: Ioss_ElementBlock.C:64
Ioss_CodeTypes.h
Ioss_EntityBlock.h