BELFEM 0.9.0
Berkeley Lab Finite Element Framework
Loading...
Searching...
No Matches
cl_Protoshell.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_PROTOSHELL_HPP
13#define CL_PROTOSHELL_HPP
14#include "typedefs.hpp"
15#include "cl_Cell.hpp"
16#include "cl_Vector.hpp"
17#include "cl_Curve.hpp"
18
19namespace belfem
20{
41 {
42 const id_t mID ;
43 string mLabel ;
44
45 // Geometry definition
46 Vector< id_t > mSideSetIDs ;
47
48 // Electrical connections
49 Vector< id_t > mTerminals ;
50
51 // Material properties (supports multi-layered shells)
52 Vector< real > mThicknesses ;
53 Cell< string > mMaterials ;
54
55 // Curve definitions (note: curves are deleted by mesh class)
56 Cell< mesh::Curve * > mSideCurves ;
57 Cell< mesh::Curve * > mTerminalCurves ;
58
59 // Edge coating (surround plating on the tape slit edges, 3D only)
60 bool mEdgeCoating = false ;
61 real mEdgeCoatingWidth = 0.0 ;
62
63 // Sidesets listed with a NEGATIVE sign in the deck, gmsh style:
64 // sidesets : -5, -6, 7:20 ;
65 // A sign requests that the orientation of every facet of that sideset
66 // be flipped ( master/slave swap, winding rewrite ) after the master
67 // normalization has run. This exists because the layer stack is laid
68 // along the facet normal and the domain-type master rule is
69 // mirror-symmetric: a stack bounded by air on both faces cannot come
70 // out uniform — one outer tape always flips. Which side the layers
71 // face is user intent that no geometry rule can derive ( a corc wrap
72 // has no meaningful mean normal at all ), so the user declares it per
73 // sideset. Stored as positive ids; mSideSetIDs carries the absolute
74 // values, so every other consumer is sign-agnostic.
75 Vector< id_t > mFlippedSideSets ;
76 public:
77
78 Protoshell( const id_t aID ) :
79 mID( aID )
80 {
81
82 }
83
84 ~Protoshell() = default ;
85
86 string &
87 label() ;
88
90 sidesets() ;
91
93 terminals() ;
94
96 thicknesses() ;
97
99 materials() ;
100
102 side_curves() ;
103
106
107 bool &
108 edge_coating() ;
109
110 real &
112
115
116 id_t
117 id() const ;
118
119 };
120
121 inline string &
123 {
124 return mLabel ;
125 }
126
127 inline Vector< id_t > &
129 {
130 return mSideSetIDs ;
131 }
132
133 inline Vector< id_t > &
135 {
136 return mTerminals ;
137 }
138
139 inline Vector< real > &
141 {
142 return mThicknesses ;
143 }
144
145 inline Cell< string > &
147 {
148 return mMaterials;
149 }
150
151 inline Cell< mesh::Curve * > &
153 {
154 return mSideCurves;
155 }
156
157 inline Cell< mesh::Curve * > &
159 {
160 return mTerminalCurves;
161 }
162
163 inline bool &
165 {
166 return mEdgeCoating;
167 }
168
169 inline real &
171 {
172 return mEdgeCoatingWidth;
173 }
174
175 inline Vector< id_t > &
177 {
178 return mFlippedSideSets ;
179 }
180
181 inline id_t
183 {
184 return mID;
185 }
186
187}
188#endif //CL_PROTOSHELL_HPP
~Protoshell()=default
Protoshell(const id_t aID)
Definition cl_Protoshell.hpp:78
id_t id() const
Definition cl_Protoshell.hpp:182
real & edge_coating_width()
Definition cl_Protoshell.hpp:170
Cell< mesh::Curve * > & side_curves()
Definition cl_Protoshell.hpp:152
Vector< real > & thicknesses()
Definition cl_Protoshell.hpp:140
Cell< mesh::Curve * > & terminal_curves()
Definition cl_Protoshell.hpp:158
Vector< id_t > & flipped_sidesets()
Definition cl_Protoshell.hpp:176
bool & edge_coating()
Definition cl_Protoshell.hpp:164
Vector< id_t > & terminals()
Definition cl_Protoshell.hpp:134
Vector< id_t > & sidesets()
Definition cl_Protoshell.hpp:128
string & label()
Definition cl_Protoshell.hpp:122
Cell< string > & materials()
Definition cl_Protoshell.hpp:146
USER GUIDES:
Definition cl_Capacitor.cpp:16
unsigned int id_t
Definition typedefs.hpp:41
double real
Definition typedefs.hpp:36