---------------------------------------------------------------------- element type classification We determine the spatial dimension from the Abaqus type token and the concrete element type from the actual node count -- this is robust against the many reduced-integration / hybrid suffixes (C3D8R, C3D10M, S4R, ...). ----------------------------------------------------------------------
| 151 | // S4R, ...). |
| 152 | // ---------------------------------------------------------------------- |
| 153 | static int TypeDim (const string & tok) |
| 154 | { |
| 155 | if (tok.find("C3D") != string::npos) return 3; // C3D*, DC3D*, AC3D* |
| 156 | // 2D continuum / shell / membrane |
| 157 | static const char* twod[] = { "CPS","CPE","CAX","CPEG","STRI","S","M3D","R3D","SFM" }; |
| 158 | for (auto p : twod) |
| 159 | if (tok.compare(0, strlen(p), p) == 0) return 2; |
| 160 | // 1D truss / beam |
| 161 | if (tok.compare(0,3,"T2D")==0 || tok.compare(0,3,"T3D")==0 || |
| 162 | tok.compare(0,1,"B")==0) |
| 163 | return 1; |
| 164 | return 0; |
| 165 | } |
| 166 | |
| 167 | static netgen::ELEMENT_TYPE ClassifyType (const string & rawtok, int nnodes) |
| 168 | { |