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_FaceBlock_h
8 #define IOSS_Ioss_FaceBlock_h
9 
10 #include "vtk_ioss_mangle.h"
11 
12 #include "Ioss_EntityType.h" // for EntityType, etc
13 #include <Ioss_EntityBlock.h>
14 #include <Ioss_Property.h> // for Property
15 #include <cstddef>         // for size_t
16 #include <cstdint>         // for int64_t
17 #include <string>          // for string
18 namespace Ioss {
19   class DatabaseIO;
20 } // namespace Ioss
21 namespace Ioss {
22   class Field;
23 } // namespace Ioss
24 
25 namespace Ioss {
26 
27   /** \brief A collection of element faces with the same topology.
28    */
29   class FaceBlock : public EntityBlock
30   {
31   public:
32     FaceBlock(DatabaseIO *io_database, const std::string &my_name, const std::string &face_type,
33               int64_t number_faces);
34 
35     FaceBlock(const FaceBlock &) = default;
36     ~FaceBlock() override;
37 
type_string()38     std::string type_string() const override { return "FaceBlock"; }
short_type_string()39     std::string short_type_string() const override { return "faceblock"; }
contains_string()40     std::string contains_string() const override { return "Face"; }
type()41     EntityType  type() const override { return FACEBLOCK; }
42 
43     // Handle implicit properties -- These are calcuated from data stored
44     // in the grouping entity instead of having an explicit value assigned.
45     // An example would be 'face_block_count' for a region.
46     Property get_implicit_property(const std::string &my_name) const override;
47 
48   protected:
49     int64_t internal_get_field_data(const Field &field, void *data,
50                                     size_t data_size) const override;
51 
52     int64_t internal_put_field_data(const Field &field, void *data,
53                                     size_t data_size) const override;
54   };
55 } // namespace Ioss
56 #endif
57