IOSS 2.0
Loading...
Searching...
No Matches
Ioss_SideSet.h
Go to the documentation of this file.
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_EntityType.h" // for EntityType, etc
12#include "Ioss_GroupingEntity.h" // for GroupingEntity
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#include <vector> // for vector
18
19namespace Ioss {
20 class DatabaseIO;
21 class Field;
22 class SideBlock;
23
24 using SideBlockContainer = std::vector<SideBlock *>;
25
26 /** \brief A collection of element sides.
27 */
28 class IOSS_EXPORT SideSet : public GroupingEntity
29 {
30 public:
31 SideSet(DatabaseIO *io_database, const std::string &my_name);
32 SideSet(const SideSet &other);
33 ~SideSet() override;
34
35 IOSS_NODISCARD std::string type_string() const override { return "SideSet"; }
36 IOSS_NODISCARD std::string short_type_string() const override { return "surface"; }
37 IOSS_NODISCARD std::string contains_string() const override { return "Element/Side pair"; }
38 IOSS_NODISCARD EntityType type() const override { return SIDESET; }
39
40 bool add(SideBlock *side_block);
41 IOSS_NODISCARD const SideBlockContainer &get_side_blocks() const;
42 IOSS_NODISCARD SideBlock *get_side_block(const std::string &my_name) const;
43 IOSS_NODISCARD size_t side_block_count() const { return sideBlocks.size(); }
44
45 IOSS_NODISCARD size_t block_count() const { return sideBlocks.size(); }
46 IOSS_NODISCARD SideBlock *get_block(size_t which) const;
47
48 void block_membership(Ioss::NameList &block_members) override;
49
50 // Handle implicit properties -- These are calculated from data stored
51 // in the grouping entity instead of having an explicit value assigned.
52 // An example would be 'element_block_count' for a region.
53 IOSS_NODISCARD Property get_implicit_property(const std::string &my_name) const override;
54
55 IOSS_NODISCARD int max_parametric_dimension() const;
56 IOSS_NODISCARD bool operator==(const SideSet &rhs) const;
57 IOSS_NODISCARD bool operator!=(const SideSet &rhs) const;
58 IOSS_NODISCARD bool equal(const SideSet &rhs) const;
59
60 protected:
61 int64_t internal_get_field_data(const Field &field, void *data,
62 size_t data_size) const override;
63
64 int64_t internal_put_field_data(const Field &field, void *data,
65 size_t data_size) const override;
66
67 int64_t internal_get_zc_field_data(const Field &field, void **data,
68 size_t *data_size) const override;
69
70 bool equal_(const SideSet &rhs, bool quiet) const;
71
72 private:
74 Ioss::NameList blockMembership; // What element blocks do the
75 // elements in this sideset belong to.
76 };
77} // namespace Ioss
#define IOSS_NODISCARD
Definition Ioss_CodeTypes.h:55
An input or output Database.
Definition Ioss_DatabaseIO.h:63
Holds metadata for bulk data associated with a GroupingEntity.
Definition Ioss_Field.h:25
Base class for all 'grouping' entities. The following derived classes are typical:
Definition Ioss_GroupingEntity.h:67
A named value that has a known type.
Definition Ioss_Property.h:27
A collection of element sides having the same topology.
Definition Ioss_SideBlock.h:37
A collection of element sides.
Definition Ioss_SideSet.h:29
IOSS_NODISCARD size_t side_block_count() const
Definition Ioss_SideSet.h:43
SideBlockContainer sideBlocks
Definition Ioss_SideSet.h:73
IOSS_NODISCARD std::string type_string() const override
Get the name of the particular type of entity.
Definition Ioss_SideSet.h:35
IOSS_NODISCARD std::string short_type_string() const override
Get a short name of the particular type of entity.
Definition Ioss_SideSet.h:36
IOSS_NODISCARD EntityType type() const override
Get the EntityType, which indicates the particular type of GroupingEntity this is.
Definition Ioss_SideSet.h:38
IOSS_NODISCARD std::string contains_string() const override
What does this entity contain.
Definition Ioss_SideSet.h:37
Ioss::NameList blockMembership
Definition Ioss_SideSet.h:74
IOSS_NODISCARD size_t block_count() const
Definition Ioss_SideSet.h:45
The main namespace for the Ioss library.
Definition Ioad_DatabaseIO.C:40
Ioss::NameList NameList
Definition Ioss_ChangeSetFactory.h:25
std::vector< SideBlock * > SideBlockContainer
Definition Ioss_SideSet.h:24
EntityType
The particular type of GroupingEntity.
Definition Ioss_EntityType.h:12
@ SIDESET
Definition Ioss_EntityType.h:21