Debian Codegraph @

packages/seacas/applications/exodiff/side_set.h

raw
1 // Copyright(C) 1999-2020, 2022, 2023 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 #pragma once
7
8 #include "exo_entity.h"
9 #include <iostream>
10
11 template <typename INT> class Exo_Read;
12
13 template <typename INT> class Side_Set : public Exo_Entity
14 {
15 public:
16 Side_Set();
17 Side_Set(int file_id, size_t id);
18 Side_Set(int file_id, size_t id, size_t ns, size_t ndf = 0);
19 ~Side_Set() override;
20 Side_Set(const Side_Set &) = delete;
21 const Side_Set &operator=(const Side_Set &) = delete;
22
23 void apply_map(const std::vector<INT> &elmt_map);
24 const INT *Elements() const;
25 const INT *Sides() const;
26 std::pair<INT, INT> Side_Id(size_t position) const;
27 size_t Side_Index(size_t position) const;
28
29 std::pair<INT, INT> Distribution_Factor_Range(size_t side) const;
30 const double *Distribution_Factors() const;
31 void Free_Distribution_Factors() const;
32
33 size_t Distribution_Factor_Count() const { return num_dist_factors; }
34
35 private:
36 int Check_State() const override;
37 void load_sides(const std::vector<INT> &elmt_map) const;
38 void load_df() const;
39 void entity_load_params() override;
40
41 EXOTYPE exodus_type() const override;
42 const char *label() const override { return "Sideset"; }
43 const char *short_label() const override { return "sideset"; }
44
45 size_t num_dist_factors{0};
46
47 mutable INT *elmts{nullptr};
48 mutable INT *sides{nullptr};
49 mutable INT *sideIndex{nullptr};
50 mutable INT *dfIndex{nullptr};
51 mutable double *dist_factors{nullptr};
52
53 friend class Exo_Read<INT>;
54 };