FrontISTR  5.7.0
Large-scale structural analysis program with finit element method
conv_neu2hec.cpp
Go to the documentation of this file.
1 /*****************************************************************************
2  * Copyright (c) 2019 FrontISTR Commons
3  * This software is released under the MIT License, see LICENSE.txt
4  *****************************************************************************/
5 /*
6  conv_neu2hec ver.2.0
7  -------------------------------------
8  Rule for name of materials
9  MAT<ID> <ID> : ID number of material
10 */
11 
12 #include <vector>
13 #include "conv_neu2hec.h"
14 #include "cconv_mat.h"
15 #include "conv_util.h"
16 #include "CConvMessage.h"
17 
18 using namespace std;
19 using namespace n2h_util;
20 
21 static int solution = sol_static;
22 static bool fg_element_error_stop = true;
23 
24 //=============================================================================
25 // Coordinate Converting
26 //=============================================================================
27 
28 static void set_conv_mat(cconv_mat &m, double o[], double rot[]) {
29  cconv_mat a, rx, ry, rz;
30  a.transfer(-o[0], -o[1], -o[2]);
31  rx.rotate('x', -rot[0]);
32  ry.rotate('y', -rot[1]);
33  rz.rotate('z', -rot[2]);
34  m = a * rx;
35  m *= ry;
36  m *= rz;
37 }
38 
39 static CNFDB_405 *search_405(CNFData &neu, int id) {
40  if (id <= 0) return 0;
41 
42  vector<CNFDB_405 *>::iterator iter;
43 
44  for (iter = neu.DB_405.begin(); iter != neu.DB_405.end(); iter++) {
45  if ((*iter)->ID == id) return *iter;
46  }
47 
48  return 0;
49 }
50 
51 static bool set_conv_mat(CNFData &neu, int id, cconv_mat &m) {
52  m.unit();
53  CNFDB_405 *coord = search_405(neu, id);
54 
55  if (!coord) {
56  return (id == 0);
57  }
58 
59  while (1) {
60  cconv_mat a;
61  set_conv_mat(a, coord->origin, coord->rot);
62 
63  switch (coord->type) {
64  case 0:
66  break;
67 
68  case 1:
70  break;
71 
72  case 2:
73  a.type = coord_t_sphere;
74  break;
75 
76  default:
77  assert(0);
78  }
79 
80  m = m * a;
81 
82  if (coord->define_sys == 0) break;
83 
84  coord = search_405(neu, coord->define_sys);
85 
86  if (!coord) {
87  return false;
88  }
89  }
90 
91  return true;
92 }
93 
94 //=============================================================================
95 // Converting Block Data
96 //=============================================================================
97 
98 //-----------------------------------------------------------------------------
99 // HEADER
100 //-----------------------------------------------------------------------------
101 
102 static void SetHeader(CNFData &neu, CHECData &hec) {
103  CHECDB_Header *header = new CHECDB_Header();
104  strcpy(header->title, neu.title);
105  hec.DB.push_back(header);
106 }
107 
108 //-----------------------------------------------------------------------------
109 // NODE
110 //-----------------------------------------------------------------------------
111 
112 static void SetNode(CNFData &neu, CHECData &hec) {
113  if (neu.DB_403.size() == 0) return;
114 
115  cconv_mat m;
116  int coord_id = 0;
117  m.unit();
118  CHECDB_Node *node = new CHECDB_Node();
120  int node_n = 0;
121  vector<CNFDB_403 *>::iterator iter;
122 
123  for (iter = neu.DB_403.begin(); iter != neu.DB_403.end(); iter++) {
124  CNFDB_403 *n = *iter;
125 
126  if (n->define_sys != coord_id) {
127  coord_id = n->define_sys;
128 
129  if (!set_conv_mat(neu, coord_id, m))
130  throw CConvMessage(CONV_COORDINATE_ERROR, "NODE");
131  }
132 
133  nitem.ID = n->ID;
134  m.convert(n->x, n->y, n->z, nitem.x, nitem.y, nitem.z);
135  node->NodeList.insert(nitem);
136  node_n++;
137  }
138 
139  hec.DB.push_back(node);
140  fprintf(stdout, "%d nodes converted\n", node_n);
141  fflush(stdout);
142 }
143 
144 //-----------------------------------------------------------------------------
145 // ELEMENT
146 //-----------------------------------------------------------------------------
147 
148 static CHECDB_Element *search_element(CHECData &hec, int type, int sec_id = 0,
149  int option = 0) {
150  vector<CHECDataBlock *>::iterator iter;
151 
152  for (iter = hec.DB.begin(); iter != hec.DB.end(); iter++) {
153  if ((*iter)->data_type == HECDB_ELEMENT) {
154  CHECDB_Element *e = (CHECDB_Element *)(*iter);
155 
156  if (e->type == type && e->sec_id == sec_id && e->option == option)
157  return e;
158  }
159  }
160 
161  return 0;
162 }
163 
164 static int line_elem_type(CNFDB_404 *e) {
165  bool fg = (e->topology == CNFDB_404::top_Line2);
166 
167  switch (e->type) { // material property
168  case NEU_ELEM_PROP_ROD:
169  case NEU_ELEM_PROP_LINK:
170  if (fg)
171  return 111;
172 
173  else
174  return 112;
175 
176  case NEU_ELEM_PROP_BEAM:
177  case NEU_ELEM_PROP_BEAM2:
179  case NEU_ELEM_PROP_BAR:
180  if (fg)
181  return 611;
182 
183  else
184  return 612;
185 
186  break;
187 
188  default:
189  throw CConvMessage(CONV_INVALID_ELEMENT_PROPERTY, "Line%d, type:%d",
190  (fg ? 2 : 3), e->type);
191  }
192 }
193 
194 static int tri_elem_type(CNFDB_404 *e) {
195  bool fg = (e->topology == CNFDB_404::top_Tri3);
196 
197  switch (e->type) {
200  if (fg)
201  return 231;
202 
203  else
204  return 232;
205 
206  case NEU_ELEM_PROP_PLATE:
208  if (fg)
209  return 731;
210 
211  else
212  return 732;
213 
214  default:
215  throw CConvMessage(CONV_INVALID_ELEMENT_PROPERTY, "Tri%d, type:%d",
216  (fg ? 3 : 6), e->type);
217  }
218 }
219 
220 static int quad_elem_type(CNFDB_404 *e) {
221  bool fg = (e->topology == CNFDB_404::top_Quad4);
222 
223  switch (e->type) {
226  if (fg)
227  return 241;
228 
229  else
230  return 242;
231 
232  case NEU_ELEM_PROP_PLATE:
234  if (fg)
235  return 741;
236 
237  else
238  return 742;
239 
240  default:
241  throw CConvMessage(CONV_INVALID_ELEMENT_PROPERTY, "Quad%d, type:%d",
242  (fg ? 4 : 8), e->type);
243  }
244 }
245 
246 static int tetra_elem_type(CNFDB_404 *e) {
247  bool fg = (e->topology == CNFDB_404::top_Tetra4);
248 
249  if (fg)
250  return 341;
251 
252  else
253  return 342;
254 }
255 
256 static int wedge_elem_type(CNFDB_404 *e) {
257  bool fg = (e->topology == CNFDB_404::top_Wedge6);
258 
259  if (fg)
260  return 351;
261 
262  else
263  return 352;
264 }
265 
266 static int brick_elem_type(CNFDB_404 *e) {
267  bool fg = (e->topology == CNFDB_404::top_Brick8);
268 
269  if (fg)
270  return 361;
271 
272  else
273  return 362;
274 }
275 
277 
278 static int get_hec_elem_option(CNFDB_404 *e, int hec_type) {
279  switch (hec_type) {
280  case 231:
281  case 232:
282  case 241:
283  case 242:
284  if (e->formulation2 == 0)
285  return opt_plane_stress;
286 
287  else
288  return opt_plane_strain;
289 
290  default:
291  return 0;
292  }
293 }
294 
295 static void SetElement(CNFData &neu, CHECData &hec) {
296  const int con_table[12][20] = {
297  // line
298  {0, 1}, // 111, 611
299  {0, 1, 2}, // 112, 612
300 
301  // tri
302  {0, 1, 2}, // 231, 731
303  //{ 0,1,2,4,5,3 },// 232, 732
304  {0, 1, 2, 5, 6, 4}, // 232, 732
305  // 0 1 2 3 4 5
306  // 0 1 2 4 5 6
307 
308  // quad
309  {0, 1, 2, 3}, // 241, 741
310  {0, 1, 2, 3, 4, 5, 6, 7}, // 242, 742
311 
312  // tetra
313  {0, 1, 2, 4}, // 341
314  // 0 1 2 3 5 6 4 7 8 9
315  {0, 1, 2, 4, 9, 10, 8, 12, 13, 14}, // 342
316 
317  // Wedge
318  {0, 1, 2, 4, 5, 6}, // 351
319  // 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 -- hec
320  //{ 0,1,2,3,4,5, 7,8,6, 13,14,12, 9,10,11}, // 352
321  {0, 1, 2, 4, 5, 6, 9, 10, 8, 17, 18, 16, 12, 13, 14}, // 352
322  // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
323  // 0 1 2 4 5 6 8 9 10 12 13 14 16 17 18
324 
325  // brick
326  {0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
327  10, 11, 16, 17, 18, 19, 12, 13, 14, 15}, // 361
328  {0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
329  10, 11, 16, 17, 18, 19, 12, 13, 14, 15} // 362
330  };
331  int elem_count = 0;
332  int ignored_count = 0;
333 
334  if (neu.DB_404.size() == 0) return;
335 
336  CHECDB_Element *hec_e = 0;
337  vector<CNFDB_404 *>::iterator iter;
338 
339  for (iter = neu.DB_404.begin(); iter != neu.DB_404.end(); iter++) {
340  CNFDB_404 *e = *iter;
341  int con;
342  int nn;
343  int hec_type;
344  int option = 0;
345  int sec_id = e->propID;
346  elem_count++;
347 
348  try {
349  switch (e->topology) {
351  con = 0;
352  nn = 2;
353  hec_type = line_elem_type(e);
354  break;
355 
357  con = 1;
358  nn = 3;
359  hec_type = line_elem_type(e);
360  break;
361 
362  case CNFDB_404::top_Tri3:
363  con = 2;
364  nn = 3;
365  hec_type = tri_elem_type(e);
366  break;
367 
368  case CNFDB_404::top_Tri6:
369  con = 3;
370  nn = 6;
371  hec_type = tri_elem_type(e);
372  break;
373 
375  con = 4;
376  nn = 4;
377  hec_type = quad_elem_type(e);
378  break;
379 
381  con = 5;
382  nn = 8;
383  hec_type = quad_elem_type(e);
384  break;
385 
387  con = 6;
388  nn = 4;
389  hec_type = tetra_elem_type(e);
390  break;
391 
393  con = 7;
394  nn = 10;
395  hec_type = tetra_elem_type(e);
396  break;
397 
399  con = 8;
400  nn = 6;
401  hec_type = wedge_elem_type(e);
402  break;
403 
405  con = 9;
406  nn = 15;
407  hec_type = wedge_elem_type(e);
408  break;
409 
411  con = 10;
412  nn = 8;
413  hec_type = brick_elem_type(e);
414  break;
415 
417  con = 11;
418  nn = 20;
419  hec_type = brick_elem_type(e);
420  break;
421 
422  default:
423  // throw CConvMessage( CONV_NO_SUPPORTED_ELEMENT, "ELEMENT" );
424  fprintf(stderr, "##Warning: Non-supported element type is found.\n");
425  continue;
426  }
427 
428  option = get_hec_elem_option(e, hec_type);
429 
430  } catch (CConvMessage &emsg) {
431  if (fg_element_error_stop) throw emsg;
432 
433  fprintf(stdout, "%s --- ignored!!\n", emsg.Msg());
434  fflush(stdout);
435  ignored_count++;
436  continue;
437  }
438 
439  if (!hec_e || hec_e->type != hec_type || hec_e->sec_id != sec_id ||
440  hec_e->option != option) {
441  hec_e = search_element(hec, hec_type, sec_id, option);
442 
443  if (!hec_e) {
444  hec_e = new CHECDB_Element();
445  hec_e->type = hec_type;
446  hec_e->option = option;
447  hec_e->sec_id = sec_id;
448  hec.DB.push_back(hec_e);
449  }
450  }
451 
452  CHECDB_Element::CElemItem eitem(hec_type, e->ID);
453 
454  for (int i = 0; i < nn; i++) {
455  eitem.node[i] = e->node[con_table[con][i]];
456  }
457 
458  hec_e->ElemList.insert(eitem);
459  }
460 
461  fprintf(stdout, "%d/%d elements converted\n", elem_count - ignored_count,
462  elem_count);
463  fflush(stdout);
464 }
465 
466 //-----------------------------------------------------------------------------
467 // MATERIAL
468 //-----------------------------------------------------------------------------
469 
470 static void set_material_static(CHECDB_Material *hec_m, CNFDB_601 *m) {
471  create_mat_name(m->ID, hec_m->name);
472  // ITEM 1 -- E & poisson
473  {
475  item.ID = 1;
477  rec.params.push_back(m->E(0));
478  rec.params.push_back(m->NU(0));
479  item.RecList.push_back(rec);
480  hec_m->ItemList.push_back(item);
481  }
482  // ITEM 2 -- density
483  {
485  item.ID = 2;
487  rec.params.push_back(m->DENSITY());
488  item.RecList.push_back(rec);
489  hec_m->ItemList.push_back(item);
490  }
491  // ITEM 3 -- thermal expansion
492  {
494  item.ID = 3;
496  rec.params.push_back(m->THERMAL_EXPANSION(0));
497  item.RecList.push_back(rec);
498  hec_m->ItemList.push_back(item);
499  }
500 }
501 
502 static void set_material_heat(CHECDB_Material *hec_m, CNFDB_601 *m) {
503  create_mat_name(m->ID, hec_m->name);
504  // ITEM 1 - density
505  {
507  item.ID = 1;
509  rec.params.push_back(m->DENSITY());
510  item.RecList.push_back(rec);
511  hec_m->ItemList.push_back(item);
512  }
513  // ITEM 2 -- specific heat
514  {
516  item.ID = 2;
518  rec.params.push_back(m->THERMAL_CAPACITY());
519  item.RecList.push_back(rec);
520  hec_m->ItemList.push_back(item);
521  }
522  // ITEM 3 -- heat conductivity
523  {
525  item.ID = 3;
527  rec.params.push_back(m->THERMAL_CONDUCTIVITY(0));
528  item.RecList.push_back(rec);
529  hec_m->ItemList.push_back(item);
530  }
531 }
532 
533 static void SetMaterial(CNFData &neu, CHECData &hec) {
534  if (neu.DB_601.size() == 0) return;
535 
536  int mat_n = 0;
537  vector<CNFDB_601 *>::iterator iter;
538 
539  for (iter = neu.DB_601.begin(); iter != neu.DB_601.end(); iter++) {
540  CNFDB_601 *m = *iter;
541  CHECDB_Material *hec_m = new CHECDB_Material();
542 
543  switch (solution) {
544  case sol_static:
545  case sol_eigen:
546  set_material_static(hec_m, m);
547  break;
548 
549  case sol_heat:
550  set_material_heat(hec_m, m);
551  break;
552 
553  default:
554  assert(0);
555  }
556 
557  hec.DB.push_back(hec_m);
558  mat_n++;
559  }
560 
561  fprintf(stdout, "%d materials converted\n", mat_n);
562  fflush(stdout);
563 }
564 
565 //-----------------------------------------------------------------------------
566 // SECTION
567 // CAUTIION) Execute after SetElement
568 //-----------------------------------------------------------------------------
569 
570 static bool exist_elem_sec(CHECData &hec, int sec_id) {
571  vector<CHECDataBlock *>::iterator iter;
572 
573  for (iter = hec.DB.begin(); iter != hec.DB.end(); iter++) {
574  if ((*iter)->data_type == HECDB_ELEMENT) {
575  CHECDB_Element *e = (CHECDB_Element *)(*iter);
576 
577  if (e->sec_id == sec_id) return true;
578  }
579  }
580 
581  return false;
582 }
583 
585 
586 static int exist_elem_sec_opt(CHECData &hec, int sec_id, int option) {
587  bool fg = false;
588  vector<CHECDataBlock *>::iterator iter;
589 
590  for (iter = hec.DB.begin(); iter != hec.DB.end(); iter++) {
591  if ((*iter)->data_type == HECDB_ELEMENT) {
592  CHECDB_Element *e = (CHECDB_Element *)(*iter);
593 
594  if (e->sec_id == sec_id) {
595  if (e->option == option) return EESO_SEC_OPT;
596 
597  fg = true;
598  }
599  }
600  }
601 
602  return fg ? EESO_SEC : EESO_NOTHING;
603 }
604 
605 // execute after execution of SetElement
606 static void SetSection(CNFData &neu, CHECData &hec) {
607  if (neu.DB_402.size() == 0) return;
608 
609  vector<CNFDB_402 *>::iterator iter;
610 
611  for (iter = neu.DB_402.begin(); iter != neu.DB_402.end(); iter++) {
612  CNFDB_402 *p = *iter;
613  CHECDB_Section *sec = new CHECDB_Section();
614  create_egrp_name_for_sec(p->ID, sec->egrp);
615  create_mat_name(p->matID, sec->material);
616  bool fg_nothing = false;
617 
618  switch (p->type) {
622  assert(!(p->num_val <= 0));
623  sec->thickness = p->Value[0];
624 
625  switch (exist_elem_sec_opt(hec, p->ID, opt_plane_strain)) {
626  case EESO_SEC_OPT:
627  sec->secopt = 1;
628  break;
629 
630  case EESO_NOTHING:
631  fg_nothing = true;
632  break;
633  }
634 
635  break;
636 
637  case NEU_ELEM_PROP_PLATE:
639  if (!exist_elem_sec(hec, p->ID)) {
640  fg_nothing = true;
641  break;
642  }
643 
645  assert(!(p->num_val <= 0));
646  sec->thickness = p->Value[0];
647  sec->integpoints = 3;
648  break;
649 
650  default:
652 
653  if (!exist_elem_sec(hec, p->ID)) {
654  fg_nothing = true;
655  }
656 
657  break;
658  }
659 
660  if (fg_nothing) {
661  delete sec;
662  sec = 0;
663  fprintf(stdout,
664  "##Warning: Non used material-property ID:%d is eliminated\n",
665  (int)p->ID);
666  fflush(stdout);
667 
668  } else {
669  hec.DB.push_back(sec);
670  }
671  }
672 }
673 
674 //-----------------------------------------------------------------------------
675 // Generate Element Group for Section
676 //-----------------------------------------------------------------------------
677 
678 class eg_rec_t {
679  public:
680  int sec_id;
682  eg_rec_t(int id = -1, CHECDB_EGroup *e = 0) : sec_id(id), eg(e) {}
684 };
685 
686 inline bool operator==(const eg_rec_t &a, const eg_rec_t &b) {
687  return a.sec_id == b.sec_id;
688 }
689 inline bool operator<(const eg_rec_t &a, const eg_rec_t &b) {
690  return a.sec_id < b.sec_id;
691 }
692 inline bool operator>(const eg_rec_t &a, const eg_rec_t &b) {
693  return a.sec_id > b.sec_id;
694 }
695 inline bool operator<=(const eg_rec_t &a, const eg_rec_t &b) {
696  return a.sec_id <= b.sec_id;
697 }
698 inline bool operator>=(const eg_rec_t &a, const eg_rec_t &b) {
699  return a.sec_id >= b.sec_id;
700 }
701 
702 static void GenerateEGroupForSection(CHECData &hec) {
703  vector<eg_rec_t> eg_list;
704  vector<eg_rec_t>::iterator egi;
705  CHECDB_EGroup *eg;
706  vector<CHECDataBlock *>::iterator iter;
707 
708  for (iter = hec.DB.begin(); iter != hec.DB.end(); iter++) {
709  if ((*iter)->data_type != HECDB_ELEMENT) continue;
710 
711  CHECDB_Element *e = (CHECDB_Element *)*iter;
712 
713  if (e->ElemList.size() == 0) continue;
714 
715  for (egi = eg_list.begin(); egi != eg_list.end(); egi++) {
716  if (egi->sec_id == e->sec_id) break;
717  }
718 
719  if (egi != eg_list.end()) {
720  eg = egi->eg;
721 
722  } else {
723  eg = new CHECDB_EGroup();
725  eg_list.push_back(eg_rec_t(e->sec_id, eg));
726  }
727 
728  set<CHECDB_Element::CElemItem>::iterator ei;
729 
730  for (ei = e->ElemList.begin(); ei != e->ElemList.end(); ei++) {
731  eg->ElemList.insert(ei->ID);
732  }
733  }
734 
735  for (egi = eg_list.begin(); egi != eg_list.end(); egi++) {
736  hec.DB.push_back(egi->eg);
737  }
738 }
739 
740 //-----------------------------------------------------------------------------
741 // ZERO
742 //-----------------------------------------------------------------------------
743 
744 static void SetZero(CNFData &neu, CHECData &hec) {
745  if (neu.DB_507.size() == 0) return;
746 
747  bool fg_on = false;
748  vector<CNFDB_507 *>::iterator iter;
749 
750  for (iter = neu.DB_507.begin(); iter != neu.DB_507.end(); iter++) {
751  CNFDB_507 *p = *iter;
752 
753  if (p->temp_on) {
754  fg_on = true;
755  CHECDB_Zero *zero = new CHECDB_Zero();
756  zero->zero = p->Def_temp;
757  hec.DB.push_back(zero);
758  }
759  }
760 
761  if (!fg_on) {
762  CHECDB_Zero *zero = new CHECDB_Zero();
763  zero->zero = -273.16;
764  hec.DB.push_back(zero);
765  }
766 }
767 
768 //=============================================================================
769 // conv_neu2hec
770 //=============================================================================
771 
772 void conv_neu2hec(CNFData &neu, CHECData &hec, int sol) {
773  solution = sol;
774  SetHeader(neu, hec);
775  SetNode(neu, hec);
776  SetElement(neu, hec);
777  SetMaterial(neu, hec);
778  SetSection(neu, hec);
779  SetZero(neu, hec);
780  GenerateEGroupForSection(hec);
781 }
CHECDB_Section::thickness
double thickness
Definition: CHECDB.h:187
CNFDB_601::THERMAL_CONDUCTIVITY
nf_float & THERMAL_CONDUCTIVITY(int i)
Definition: CNFDB_601.h:98
n2h_util::create_mat_name
void create_mat_name(int id, char *name)
Definition: conv_util.h:34
NEU_ELEM_PROP_BEAM2
#define NEU_ELEM_PROP_BEAM2
Definition: CNFDataBlock.h:46
CHECDB_Material::CItem::CItemRec::params
std::vector< double > params
Definition: CHECDB.h:140
CNFDB_405::rot
nf_float rot[3]
Definition: CNFDB_405.h:38
CConvMessage
Definition: CConvMessage.h:23
cconv_mat::transfer
void transfer(double x, double y, double z)
Definition: cconv_mat.cpp:64
CHECDB_Section::egrp
char egrp[hec_name_size]
Definition: CHECDB.h:181
CNFDB_404::top_Quad8
@ top_Quad8
Definition: CNFDB_404.h:35
n2h_util
Definition: conv_util.h:11
CNFDB_404::formulation2
nf_int formulation2
Definition: CNFDB_404.h:101
conv_neu2hec.h
CNFDB_404::type
nf_int type
Definition: CNFDB_404.h:90
sol_static
@ sol_static
Definition: conv_neu2hec.h:21
CNFDB_404::top_Brick20
@ top_Brick20
Definition: CNFDB_404.h:42
CNFDB_405::type
nf_int type
Definition: CNFDB_405.h:30
CHECDB_Element::CElemItem
Definition: CHECDB.h:76
CNFDB_402::num_val
nf_int num_val
Definition: CNFDB_402.h:48
CNFDB_601::THERMAL_EXPANSION
nf_float & THERMAL_EXPANSION(int i)
Definition: CNFDB_601.h:94
CNFDB_601::NU
nf_float & NU(int i)
Definition: CNFDB_601.h:90
opt_plane_stress
@ opt_plane_stress
Definition: conv_neu2hec.cpp:276
cconv_mat
Definition: cconv_mat.h:14
CNFDB_404::top_Wedge15
@ top_Wedge15
Definition: CNFDB_404.h:41
CHECDB_EGroup
Definition: CHECDB.h:216
operator>
bool operator>(const eg_rec_t &a, const eg_rec_t &b)
Definition: conv_neu2hec.cpp:692
CNFDB_405
Definition: CNFDB_405.h:15
conv_neu2hec
void conv_neu2hec(CNFData &neu, CHECData &hec, int sol)
Definition: conv_neu2hec.cpp:772
operator<=
bool operator<=(const eg_rec_t &a, const eg_rec_t &b)
Definition: conv_neu2hec.cpp:695
CHECDB_Material
Definition: CHECDB.h:129
CNFDB_402::ID
nf_int ID
Definition: CNFDB_402.h:32
CNFDB_404::top_Brick8
@ top_Brick8
Definition: CNFDB_404.h:38
operator>=
bool operator>=(const eg_rec_t &a, const eg_rec_t &b)
Definition: conv_neu2hec.cpp:698
coord_t_cartesian
@ coord_t_cartesian
Definition: cconv_mat.h:15
cconv_mat::convert
void convert(double x, double y, double z, double &X, double &Y, double &Z)
Definition: cconv_mat.cpp:119
CHECDB_Element::option
int option
Definition: CHECDB.h:74
CHECDB_EGroup::name
char name[hec_name_size]
Definition: CHECDB.h:218
NEU_ELEM_PROP_PLATE2
#define NEU_ELEM_PROP_PLATE2
Definition: CNFDataBlock.h:58
CNFDB_507::Def_temp
nf_float Def_temp
Definition: CNFDB_507.h:131
CHECDB_Header::title
char title[hec_str_size]
Definition: CHECDB.h:53
CNFDB_404::top_Wedge6
@ top_Wedge6
Definition: CNFDB_404.h:37
opt_plane_strain
@ opt_plane_strain
Definition: conv_neu2hec.cpp:276
CHECDB_Material::CItem::RecList
std::vector< CItemRec > RecList
Definition: CHECDB.h:143
conv_util.h
CNFDB_601
Definition: CNFDB_601.h:17
NEU_ELEM_PROP_LINK
#define NEU_ELEM_PROP_LINK
Definition: CNFDataBlock.h:44
CHECDB_Section
Definition: CHECDB.h:175
CHECDB_Zero
Definition: CHECDB.h:267
CNFDB_404::topology
nf_int topology
Definition: CNFDB_404.h:91
CHECDB_Material::ItemList
std::vector< CItem > ItemList
Definition: CHECDB.h:166
NEU_ELEM_PROP_PLANESTRAIN
#define NEU_ELEM_PROP_PLANESTRAIN
Definition: CNFDataBlock.h:59
CHECDB_Node::CNodeItem::y
double y
Definition: CHECDB.h:113
CNFDB_402::Value
nf_float * Value
Definition: CNFDB_402.h:51
EESO_NOTHING
@ EESO_NOTHING
Definition: conv_neu2hec.cpp:584
CNFDB_404::propID
nf_int propID
Definition: CNFDB_404.h:89
CHECDB_Zero::zero
double zero
Definition: CHECDB.h:269
CNFDB_404::top_Quad4
@ top_Quad4
Definition: CNFDB_404.h:34
CHECDB_Node
Definition: CHECDB.h:108
CHECDB_Material::CItem
Definition: CHECDB.h:133
coord_t_sphere
@ coord_t_sphere
Definition: cconv_mat.h:15
operator==
bool operator==(const eg_rec_t &a, const eg_rec_t &b)
Definition: conv_neu2hec.cpp:686
cconv_mat::type
coord_type type
Definition: cconv_mat.h:17
NEU_ELEM_PROP_ROD
#define NEU_ELEM_PROP_ROD
Definition: CNFDataBlock.h:41
NEU_ELEM_PROP_PLATE
#define NEU_ELEM_PROP_PLATE
Definition: CNFDataBlock.h:57
EESO_SEC_OPT
@ EESO_SEC_OPT
Definition: conv_neu2hec.cpp:584
cconv_mat.h
CNFDB_402::matID
nf_int matID
Definition: CNFDB_402.h:34
CNFDB_507
Definition: CNFDB_507.h:17
CHECDB_Header
Definition: CHECDB.h:51
CONV_COORDINATE_ERROR
@ CONV_COORDINATE_ERROR
Definition: CConvMessage.h:20
CNFData
Definition: CNFData.h:46
CNFDB_404::top_Line2
@ top_Line2
Definition: CNFDB_404.h:30
CNFDB_405::origin
nf_float origin[3]
Definition: CNFDB_405.h:36
CNFDB_404::ID
nf_int ID
Definition: CNFDB_404.h:87
CHECData::DB
std::vector< CHECDataBlock * > DB
Definition: CHECData.h:30
eg_rec_t::sec_id
int sec_id
Definition: conv_neu2hec.cpp:680
CNFDB_402
Definition: CNFDB_402.h:18
CHECDB_Section::material
char material[hec_name_size]
Definition: CHECDB.h:182
CHECDB_Node::CNodeItem
Definition: CHECDB.h:110
CHECDB_Element::ElemList
std::set< CElemItem > ElemList
Definition: CHECDB.h:96
CHECDB_Node::CNodeItem::x
double x
Definition: CHECDB.h:113
CNFDB_601::ID
nf_int ID
Definition: CNFDB_601.h:49
CConvMessage::Msg
virtual const char * Msg()
Definition: CConvMessage.cpp:30
eg_rec_t
Definition: conv_neu2hec.cpp:678
CNFDB_404::node
nf_int node[20]
Definition: CNFDB_404.h:103
CHECData
Definition: CHECData.h:25
checdb_id_class::ID
int ID
Definition: CHECDB.h:33
CHECDB_Node::NodeList
std::set< CNodeItem > NodeList
Definition: CHECDB.h:117
CNFDB_403
Definition: CNFDB_403.h:15
CNFDB_601::E
nf_float & E(int i)
Definition: CNFDB_601.h:82
CHECDB_Material::CItem::ID
int ID
Definition: CHECDB.h:135
CHECDB_Material::CItem::CItemRec
Definition: CHECDB.h:137
CHECDB_Section::type
int type
Definition: CHECDB.h:180
CHECDB_Node::CNodeItem::z
double z
Definition: CHECDB.h:113
CHECDB_Section::TYPE_SHELL
@ TYPE_SHELL
Definition: CHECDB.h:178
CNFDB_404::top_Tri6
@ top_Tri6
Definition: CNFDB_404.h:33
CHECDB_Element::type
int type
Definition: CHECDB.h:71
CHECDB_Section::secopt
int secopt
Definition: CHECDB.h:184
CNFData::title
char title[256]
Definition: CNFData.h:49
CHECDB_Material::name
char name[hec_name_size]
Definition: CHECDB.h:131
CNFDB_507::temp_on
nf_bool temp_on
Definition: CNFDB_507.h:132
n2h_util::create_egrp_name_for_sec
void create_egrp_name_for_sec(int id, char *name)
Definition: conv_util.h:35
CNFDB_404::top_Tetra4
@ top_Tetra4
Definition: CNFDB_404.h:36
eg_rec_t::~eg_rec_t
~eg_rec_t()
Definition: conv_neu2hec.cpp:683
NEU_ELEM_PROP_BEAM
#define NEU_ELEM_PROP_BEAM
Definition: CNFDataBlock.h:45
CHECDB_Section::TYPE_SOLID
@ TYPE_SOLID
Definition: CHECDB.h:178
CNFDB_402::type
nf_int type
Definition: CNFDB_402.h:35
eg_rec_t::eg_rec_t
eg_rec_t(int id=-1, CHECDB_EGroup *e=0)
Definition: conv_neu2hec.cpp:682
coord_t_cylinder
@ coord_t_cylinder
Definition: cconv_mat.h:15
CNFDB_404::top_Tetra10
@ top_Tetra10
Definition: CNFDB_404.h:40
eg_rec_t::eg
CHECDB_EGroup * eg
Definition: conv_neu2hec.cpp:681
CNFDB_404::top_Line3
@ top_Line3
Definition: CNFDB_404.h:31
NEU_ELEM_PROP_BAR
#define NEU_ELEM_PROP_BAR
Definition: CNFDataBlock.h:42
cconv_mat::unit
void unit()
Definition: cconv_mat.cpp:52
CNFDB_404
Definition: CNFDB_404.h:16
NEU_ELEM_PROP_CURVEBEAM
#define NEU_ELEM_PROP_CURVEBEAM
Definition: CNFDataBlock.h:49
NEU_ELEM_PROP_PLANESTRAIN2
#define NEU_ELEM_PROP_PLANESTRAIN2
Definition: CNFDataBlock.h:60
sol_heat
@ sol_heat
Definition: conv_neu2hec.h:21
CNFDB_601::THERMAL_CAPACITY
nf_float & THERMAL_CAPACITY()
Definition: CNFDB_601.h:102
CHECDB_EGroup::ElemList
std::set< int > ElemList
Definition: CHECDB.h:219
CHECDB_Section::integpoints
int integpoints
Definition: CHECDB.h:190
CHECDB_Element
Definition: CHECDB.h:62
CNFDB_404::top_Tri3
@ top_Tri3
Definition: CNFDB_404.h:32
cconv_mat::rotate
void rotate(char axis, double angle)
Definition: cconv_mat.cpp:71
operator<
bool operator<(const eg_rec_t &a, const eg_rec_t &b)
Definition: conv_neu2hec.cpp:689
EESO_SEC
@ EESO_SEC
Definition: conv_neu2hec.cpp:584
CONV_INVALID_ELEMENT_PROPERTY
@ CONV_INVALID_ELEMENT_PROPERTY
Definition: CConvMessage.h:22
sol_eigen
@ sol_eigen
Definition: conv_neu2hec.h:21
CNFDB_601::DENSITY
nf_float & DENSITY()
Definition: CNFDB_601.h:103
CConvMessage.h
CNFDB_405::define_sys
nf_int define_sys
Definition: CNFDB_405.h:29
CHECDB_Element::sec_id
int sec_id
Definition: CHECDB.h:73
HECDB_ELEMENT
@ HECDB_ELEMENT
Definition: CHECDB.h:23