BELFEM 0.9.0
Berkeley Lab Finite Element Framework
Loading...
Searching...
No Matches
cl_CutSet.hpp
Go to the documentation of this file.
1/*
2 * BELFEM -- The Berkeley Lab Finite Element Framework
3 * Copyright (c) 2026, The Regents of the University of California,
4 * through Lawrence Berkeley National Laboratory (subject to receipt of any required
5 * approvals from the U.S. Dept. of Energy). All rights reserved.
6 *
7 * Developers: Christian Messe, Gregory Giard
8 *
9 * See the top-level LICENSE file for the complete license and disclaimer.
10 */
11
12#ifndef CL_CUTSET_HPP
13#define CL_CUTSET_HPP
14
15#include "typedefs.hpp"
16#include "cl_Cell.hpp"
17#include "cl_Vector.hpp"
18#include "cl_Map.hpp"
19#include "cl_DynamicBitset.hpp"
20#include "cl_Mesh.hpp"
21
22namespace belfem
23{
24 namespace mesh
25 {
26 class CutSet
27 {
28 Mesh * mMesh ;
29
31 Cell< Node * > & mNodeOriginals ;
32
34 DynamicBitset * mBitset ;
35
37 DynamicBitset * mNodeBitset ;
38
40 Map< id_t, Node * > mNodeDuplicates ;
41
42//-----------------------------------------------------------------------------
43 public:
44//-----------------------------------------------------------------------------
45
46 CutSet(
47 Mesh * aMesh,
48 Cell< Node * > & aNodeOriginals,
49 const string & aHexString,
50 const index_t aNumberOfCuts );
51
52 ~CutSet();
53
56
57 bool
58 test( const Node * aNode ) const ;
59
60//-----------------------------------------------------------------------------
61
62 void
63 create_duplicates( id_t & aMaxNodeID, Cell< Node * > & aAbstractNodes );
64
65//-----------------------------------------------------------------------------
66
67 Node *
68 duplicate( Node * aNode );
69
70//-----------------------------------------------------------------------------
71
74
75//-----------------------------------------------------------------------------
76 };
77
78//-----------------------------------------------------------------------------
79
80 inline bool
81 CutSet::test( const Node * aNode ) const
82 {
83 return mBitset->test( aNode->index() );
84 }
85
86//-----------------------------------------------------------------------------
87
88 inline DynamicBitset *
90 {
91 return mNodeBitset;
92 }
93
94//-----------------------------------------------------------------------------
95
96 inline Node *
98 {
99 return mNodeDuplicates[ aNode->id() ];
100 }
101
102//-----------------------------------------------------------------------------
103
104 inline Map< id_t, Node * > &
106 {
107 return mNodeDuplicates;
108 }
109
110//-----------------------------------------------------------------------------
111 }
112}
113#endif //CL_CUTSET_HPP
Cell is a wrapper around the standard vector.
Definition cl_Cell.hpp:42
Runtime-sized bitset; one bit per flag, packed into 64-bit words.
Definition cl_DynamicBitset.hpp:33
Hash map (unordered key-value).
Definition cl_Map.hpp:75
Top-level container for all mesh entities.
Definition cl_Mesh.hpp:60
id_t id() const
Definition cl_Graph_Vertex.hpp:218
virtual index_t index() const
Definition cl_Graph_Vertex.hpp:234
bool test(const Node *aNode) const
Definition cl_CutSet.hpp:81
CutSet(Mesh *aMesh, Cell< Node * > &aNodeOriginals, const string &aHexString, const index_t aNumberOfCuts)
Definition cl_CutSet.cpp:20
Node * duplicate(Node *aNode)
Definition cl_CutSet.hpp:97
void create_duplicates(id_t &aMaxNodeID, Cell< Node * > &aAbstractNodes)
Definition cl_CutSet.cpp:42
Map< id_t, Node * > & duplicate_map()
Definition cl_CutSet.hpp:105
DynamicBitset * node_bitset()
Definition cl_CutSet.hpp:89
Definition cl_Node.hpp:30
Definition cl_EF_EdgeFunction.hpp:17
USER GUIDES:
Definition cl_Capacitor.cpp:16
unsigned int id_t
Definition typedefs.hpp:41
uint32_t index_t
Definition typedefs.hpp:52