Debian Codegraph @

packages/seacas/libraries/ioss/src/Ioss_FaceBlock.h

raw
1 // Copyright(C) 1999-2020, 2022, 2023, 2024 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 #pragma once
8
9 #include "ioss_export.h"
10
11 #include "Ioss_EntityBlock.h"
12 #include "Ioss_EntityType.h" // for EntityType, etc
13 #include "Ioss_Property.h" // for Property
14 #include <cstddef> // for size_t
15 #include <cstdint> // for int64_t
16 #include <string> // for string
17 namespace Ioss {
18 class DatabaseIO;
19 } // namespace Ioss
20 namespace Ioss {
21 class Field;
22 } // namespace Ioss
23
24 namespace Ioss {
25
26 /** \brief A collection of element faces with the same topology.
27 */
28 class IOSS_EXPORT FaceBlock : public EntityBlock
29 {
30 public:
31 FaceBlock(DatabaseIO *io_database, const std::string &my_name, const std::string &face_type,
32 int64_t number_faces);
33
34 IOSS_NODISCARD std::string type_string() const override { return "FaceBlock"; }
35 IOSS_NODISCARD std::string short_type_string() const override { return "faceblock"; }
36 IOSS_NODISCARD std::string contains_string() const override { return "Face"; }
37 IOSS_NODISCARD EntityType type() const override { return FACEBLOCK; }
38
39 // Handle implicit properties -- These are calculated from data stored
40 // in the grouping entity instead of having an explicit value assigned.
41 // An example would be 'face_block_count' for a region.
42 IOSS_NODISCARD Property get_implicit_property(const std::string &my_name) const override;
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 int64_t internal_get_zc_field_data(const Field &field, void **data,
52 size_t *data_size) const override;
53 };
54 } // namespace Ioss