BELFEM 0.9.0
Berkeley Lab Finite Element Framework
Loading...
Searching...
No Matches
cl_EdgeCutter.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, through
4 * 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 BELFEM_CL_EDGECUTTER_HPP
13#define BELFEM_CL_EDGECUTTER_HPP
14#include "cl_Mesh.hpp"
16#include "cl_Curve.hpp"
17namespace belfem
18{
19 namespace mesh
20 {
22 {
23 Mesh * mMesh;
24 fem::ElementMapper * mElementMapper ;
25
26 Cell< SideSet * > mSideSets ;
27
28 DynamicBitset * mFacetBitset = nullptr ;
29 Cell< Facet * > mFacets ;
30 Vector< index_t > mFacetsPerLayerBegin ;
31 Vector< index_t > mFacetsPerLayerEnd ;
32
33 real mConnectorWitdh = 7.5e-4 ;
34
35 // work vectors
41 public:
42
43 EdgeCutter( Mesh * aMesh );
44
46
47 void
48 select_sidesets( const Vector< id_t > & aSideSets );
49
50 void
51 process_curve( Curve * aCurve );
52
53 private:
54
55 void
56 facet_bfs( Curve * aCurve );
57
58 void
59 compute_node_vectors( Curve * aCurve,
60 Matrix< real > & aNormals,
61 Matrix< real > & aTangents,
62 Matrix< real > & aBinomials,
63 Vector< real > & aDistances );
64
65 void
66 compute_temporary_nodes( Curve * aCurve, Matrix< real > & aBinomials, Cell< Node * > & aNodes );
67
68 void
69 project_temporary_nodes(
70 Cell< Facet * > & aFacets,
71 Cell< Node * > & aNodes );
72
73 real
74 determine_sign( Curve * aCurve, Matrix< real > & aBinomials );
75
76 void
77 save_testmesh( Cell< Node * > & aNodes );
78
79 bool
80 inside_bounding_box( const Vector< real > & aPoint, const Vector< real > & aXmin, const Vector< real > & aXmax ) const;
81
82 void
83 project_to_plane( Facet * aFacet ) const;
84 };
85 }
86}
87#endif //BELFEM_CL_EDGECUTTER_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
Top-level container for all mesh entities.
Definition cl_Mesh.hpp:60
Inverse element map: given physical coordinates aX inside an element, solves x(xi) = aX for the natur...
Definition cl_IF_ElementMapper.hpp:32
Definition cl_Curve.hpp:27
EdgeCutter(Mesh *aMesh)
Definition cl_EdgeCutter.cpp:23
void process_curve(Curve *aCurve)
Definition cl_EdgeCutter.cpp:66
void select_sidesets(const Vector< id_t > &aSideSets)
Definition cl_EdgeCutter.cpp:47
Definition cl_Facet.hpp:24
Definition cl_EF_EdgeFunction.hpp:17
USER GUIDES:
Definition cl_Capacitor.cpp:16
double real
Definition typedefs.hpp:36