MCPcopy Create free account
hub / github.com/NGSolve/ngsolve / ClassifyType

Function ClassifyType

comp/read_ansys.cpp:167–205  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

165 }
166
167 static netgen::ELEMENT_TYPE ClassifyType (const string & rawtok, int nnodes)
168 {
169 using namespace netgen;
170 string tok = Upper(Trim(rawtok));
171 int dim = TypeDim(tok);
172 switch (dim)
173 {
174 case 3:
175 switch (nnodes)
176 {
177 case 4: return TET;
178 case 10: return TET10;
179 case 8: return HEX;
180 case 20: return HEX20;
181 case 6: return PRISM;
182 case 15: return PRISM15;
183 case 5: return PYRAMID;
184 }
185 break;
186 case 2:
187 switch (nnodes)
188 {
189 case 3: return TRIG;
190 case 6: return TRIG6;
191 case 4: return QUAD;
192 case 8: return QUAD8;
193 }
194 break;
195 case 1:
196 switch (nnodes)
197 {
198 case 2: return SEGMENT;
199 case 3: return SEGMENT3;
200 }
201 break;
202 }
203 throw Exception("ReadAnsysInp: unsupported element type '" + rawtok +
204 "' with " + ToString(nnodes) + " nodes");
205 }
206
207 static int ElDim (netgen::ELEMENT_TYPE t)
208 {

Callers 1

ParseAbaqusInpFunction · 0.85

Calls 4

UpperFunction · 0.85
TrimFunction · 0.85
TypeDimFunction · 0.85
ToStringFunction · 0.85

Tested by

no test coverage detected