MIDAS  0.75
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros
cell.h
Go to the documentation of this file.
1 #ifndef MIDAS_CELL_H
2 #define MIDAS_CELL_H
3 
4 #include "alias.h"
5 #include "geomcomp.h"
6 #include "compgeom.h"
7 
8 #include "gelib.h"
9 #include "arrays.h"
10 
11 
18 namespace midaspace {
19 
20 //* ********************************************************************************************
21 //* *** *** *** *** CLASS CELL *** *** *** ***
22 //* ********************************************************************************************
23 class Cell : public GeometryComponent //, virtual public ComponentGeometry
24 {
25  // nedokazal jsem to oddedit tak aby to chodilo, tak jsme udelal promennou cg
26  //* *** COMPONENTGEOMETRY ***
27  protected:
29 
30  public:
31  CellGeometry give_cellGeom (void) const { return cg->give_elemGeom(); }
32  int give_dimension (void) const { return cg->give_dimension(); }
33  const PoinT* give_centercoords (void) const { return cg->give_centercoords(); }
34  double give_circum (void) const { return cg->give_circum(); }
35  double give_lav (void) const { return cg->give_lav(); }
36  double give_GeomWeight1deg (void) const { return cg->give_GeomWeight1deg(); }
37  bool is_point_in_sphere (const PoinT *point) const { return cg->is_point_in_sphere(point); }
38  double give_characteristic_size(void) const { return cg->give_characteristic_size(); }
39 
40  // docasne kuli lcs
41  ComponentGeometry* give_cg (void) { return cg; }
42 
43 
44 
45  //* *** COMPONENTS ***
46  GPA<const Point> points; // array of pointers to points at Cell
47  GPA<const Edge> edges; // array of pointers to edges at Cell; assembled only when this->connectivity_assembled == true
48  GPA<const Face> faces; // array of pointers to faces at Cell; assembled only when this->connectivity_assembled == true
49 
50  //* *** CONNECTIVITY ***
51  bool connectivity_assembled; // connectivity stats at cell and its components are assembled
52 
53  //* *** DUPLICITY ***
54  // duplmaster == -1 ... potentially duplicated
55  // duplmaster == this ... collapsed
56  // duplmaster != NULL ... duplicated
57  // Duplmaster has lower ID then this. The duplicity can be chained.
58  // So, the chain is descending! More slaves can have same master.
59  Cell *duplmaster; // this Cell has identical nodes with master
60 
61 
62  public:
64  Cell (classID mecg, long gid, long oid, long prop, const Geometry *mg, long nn, long ne, long nf);
66  Cell (classID mecg, const Cell * src);
68  virtual ~Cell();
69 
71  virtual void checkConsistency (void) const {
73  if (duplmaster!=NULL && duplmaster!=((Cell*)-1)) errol;
74  }
75  void check_connectivity_loc (void) const {
76  if (! this->connectivity_assembled)
77  _errorr ("Connectivity on cell is not initiated");
78  }
79 
81 
83  //* *** SET ***
84  void set_point (long i, const Point *val) { points.assign(i, val); }
85  void set_point (long i, long pid) { points.assign(i, Geom->give_Pjnt(pid)); }
86  void set_edge (long i, const Edge *val) { edges.assign (i, val); }
87  void set_face (long i, const Face *val) { faces.assign (i, val); }
88  //* *** GET ***
89  long give_nno (void) const { return points(); }
90  long give_ned (void) const { return edges(); }
91  long give_nfa (void) const { return faces(); }
92  //
93  const Point* give_point (long i) const { return points[i]; }
94  const Edge* give_edge (long i) const { check_connectivity_loc(); return edges[i]; }
95  const Face* give_face (long i) const { check_connectivity_loc(); return faces[i]; }
96  //
97  const GPA<const Point>* give_points (void) const { return &points; } // !!!! zkusit vrati &
98  const GPA<const Edge>* give_edges (void) const { check_connectivity_loc(); return &edges; }
99  const GPA<const Face>* give_faces (void) const { check_connectivity_loc(); return &faces; }
100  //
101  long give_point_indx (const Point* p) const { for (int i=0; i<points(); i++) if (points[i] == p) return i; errol; return 0; }
102  //
103  virtual long give_face_nodes_edges (const Point **&facnodes, const Edge **&facedges) const { errol; return 0; }
104 
105  //* *** CONNECTIVITY ***
107  virtual void connectivity_assembling (bool re=false) = 0;
109  virtual void connectivity_removing (void) = 0;
111  virtual void switch_myself_at_connectivity (Cell *master);
112 
113 
114  //protected: proc to nejde ???
116  bool switch_edge_pointer (Edge *slave, Edge *master);
118  bool switch_face_pointer (Face *slave, Face *master);
119 
120 
122  private:
123  void assure_duplicity_master (void);
124  Cell* last_duplicity_master (void) const;
125  protected:
126  virtual void integrate_duplicated_cell (const Cell *slave);
128  virtual void switch_node_pointer (Point *slave, Point *master, bool duplcheck);
129  public:
130  void setup_duplicity_master (Cell *val);
131  bool invisible_duplicated (char flag='a');
132 
135  bool has_same_geom_with (Cell *slave) const;
136 
138  bool check_collapse (void) { return ! points.is_unique(); }
139 
141  bool cross_abscissa_node (const PoinT *a1, const PoinT *a2, long cunn, const Point **unnod, const Point *&nod, double &ksi, PoinT *cp) const;
142  int cross_abscissa_face (const PoinT *a1, const PoinT *a2, long cunf, const Face **unfac, const Cell *&comp, PoinT *nc, PoinT *cp);
143 };
144 
145 
146 
147 //* ********************************************************************************************
148 //* *** *** *** *** CLASS FACEDGE *** *** *** ***
149 //* ********************************************************************************************
150 class Facedge : public Cell
151 {
152  // empty, only connect face and edge for future features
153  // classy zde budou primitivni, napr ord je zatim pouze 1
154 
155  protected:
157  GPA<const Element> superelems; // array of pointers to superior elements; this array should be sorted!!!
158 
161  GPA<const Element> masterels; // array of pointers to master elements - superior elements with the most low dimension
162 
163  public:
165  Facedge (long gid, long oid, long prop, const Geometry *mg, long nn, long ne, long nf) : Cell (classVoid, gid, oid, prop, mg, nn, ne, nf)
166  {
167  superelems.initialize(0,2);
168  masterel_dim = 7;
169  }
171  //Facedge () : Cell () { superfaces.initialize(0,2); }
173  virtual ~Facedge() { }
174 
176  //virtual classID give_classid() const = 0;
177 
178 
180  //* *** SET ***
181  void setadd_superelem (const Element *comp, bool uniquecheck) { if (uniquecheck) superelems.add_unique(comp); else superelems.add(comp); this->setadd_masterel(comp); }
182  void remove_superelem (const Element *comp) { superelems.free_ptr(comp); superelems.shake_down(); }
184  void setadd_masterel (const Element *comp);
185 
186  //* *** GET ***
187  long give_numsuperelem (void) const { check_connectivity(); return superelems(); }
188  const Element* give_superelem (long i) const { check_connectivity(); return superelems[i]; }
190 
191 
193  const Element* give_masterel (void) const { check_connectivity(); return masterels[0]; }
195  const Element* give_main_masterel_uniq (void) const;
196 
200 
201 
202  protected:
204  virtual void integrate_duplicated_cell (const Facedge *slave);
205 
206  public:
208  virtual long give_ord (void) const = 0;
209 
210 
212  const GPA<const BoundaryCond>* give_loads (const Element *fe) const
213  {
214  return (this->give_masterel() == fe) ? this->give_attributes()->give_loads() : NULL;
215  }
216 
218  long give_cloads (const Element *fe) const
219  {
220  return (this->give_masterel() == fe) ? this->give_attributes()->give_cloads() : 0;
221  }
222 
223 };
224 
225 
226 
227 //* ********************************************************************************************
228 //* *** *** *** *** CLASS EDGE *** *** *** ***
229 //* ********************************************************************************************
230 class Edge : public Facedge //, public ComponentGeometry1D
231 {
232  // nno = nn // number of nodes on Edge
233  // ned = 0 // number of edges on Edge
234  // nfa = 0 // number of faces on Edge
235  // numsuperelem = NAEL_ED // number of superior elements
236  // numsuperface = NAFA_ED // number of superior faces
237 
240  GPA<const Face> superfaces; // array of pointers to superior faces; this array should be sorted!!!
241 
242  public:
244  // Edge (long gid, const Mesh *mg, long nn) : Facedge (gid, gid, -1, mg, nn, 0, 0) { }
246  Edge (long nn, const Point **nods) : Facedge (-1, -1, 0, NULL, nn, 0, 0) //, ComponentGeometry1D ()
247  {
248  superfaces.initialize(0,2);
249 
250  cg = new ComponentGeometry1D(this, ZERO);
251  while (nn--) points.assign(nn, nods[nn]);
252 
253  attributes = new FacedgeAttribs(this, (long)0);
254  }
256  //Edge () : ... () { superelems.initialize(0,2); }
258  virtual ~Edge() { }
259 
261  virtual classID give_classid() const { return classEdge; }
262 
264  //* *** SET ***
265  void setadd_superface (const Face *comp, bool uniquecheck) { if (uniquecheck) superfaces.add_unique(comp); else superfaces.add(comp); } // ma to uniquecheck smyslo? to kdyz se dela re connectivity, ale na co to je??
266  void remove_superface (const Face *comp) { superfaces.free_ptr(comp); superfaces.shake_down(); }
267 
268  //* *** GET ***
269  long give_numsuperface (void) const { check_connectivity(); return superfaces(); }
270  const Face* give_superface (long i) const { check_connectivity(); return superfaces[i]; }
271  const GPA<const Face >* give_superfaces (void) const { check_connectivity(); return &superfaces; }
272 
273 
274  //* *** CONNECTIVITY ***
276  void connectivity_assembling (bool re=false);
277  void connectivity_removing (void);
279  void switch_myself_at_connectivity (Cell *master);
280 
282  virtual void set_model_prop (long val, const Model *model, bool flag=false);
283 
284  protected:
286  virtual void integrate_duplicated_cell (const Edge *slave);
287 
288  public:
290  void transform_nc (const Point* t1, const Point* t2, double &ksi);
292  bool is_nod_on (double norm, const PoinT *point, double &ksi) const;
294  const Face* give_superface (long ne, const Edge **edgs) const;
296  virtual void switch_node_pointer (Point *slave, Point *master, bool duplcheck);
297 
298  virtual long give_ord (void) const { if (this->give_nno() != 2) errol; return -4; }
299 
300  double give_elemSize (void) const;
301 
302  //* *** PRINT ***
303  virtual void print_row (FILE *stream, femFileFormat fff, bool endline=true, long did=0) const;
304 };
305 
306 //* ********************************************************************************************
307 //* *** *** *** *** CLASS FACE *** *** *** ***
308 //* ********************************************************************************************
309 class Face : public Facedge //, public ComponentGeometry2D
310 {
311  // nno = nn // number of nodes on Face
312  // ned = ne // number of edges on Face
313  // nfa = 0 // number of faces on Face
314  // numsuperelem = 2 // number of superior elements
315  // numsuperface = 0 // number of superior faces
316 
318 
319  public:
321  //Face (long gid, const Geometry *mg, long nn, long ne) : Facedge (gid, gid, -1, mg, 1, nn, ne, 0) { }
323  Face (long nn, long ne, const Point **nods, const Edge **edgs) : Facedge (-1, -1, 0, NULL, nn, ne, 0) //, ComponentGeometry2D ()
324  {
325  if (nn == 3) cg = new ComponentGeometry2Dtriangle (this, ZERO);
326  else if (nn == 4) cg = new ComponentGeometry2Dquadrangle(this, ZERO);
327  else if (nn > 4) cg = new ComponentGeometry2Dpolygon (this, ZERO);
328  else errol;
329 
330  while (nn--) points.assign(nn, nods[nn]);
331  while (ne--) edges.assign(ne, edgs[ne]);
332 
333  attributes = new FacedgeAttribs(this, (long)0);
334  }
336  virtual ~Face() { }
337 
339  virtual classID give_classid() const { return classFace; }
340 
341  //* *** CONNECTIVITY ***
343  void connectivity_assembling (bool re=false);
344  void connectivity_removing (void);
346  void switch_myself_at_connectivity (Cell *master);
347 
349  virtual void set_model_prop (long val, const Model *model, bool flag=false);
350 
352  void transform_nc (const Edge *t1, const Edge *t2, PoinT *nc) const;
354  virtual void switch_node_pointer (Point *slave, Point *master, bool duplcheck);
355 
356  virtual long give_ord (void) const { if (this->give_nno() != 3 && this->give_nno() != 4) errol; return -4; }
357 
358  double give_elemSize (void) const;
359 
360  //* *** PRINT ***
361  virtual void print_row (FILE *stream, femFileFormat fff, bool endline=true, long did=0) const;
362 };
363 
364 
365 //* ********************************************************************************************
366 //* *** *** *** *** CLASS ELEMENT *** *** *** ***
367 //* ********************************************************************************************
368 class Element : public Cell
369 {
370  public:
372  Element (classID mecg, long gid, long oid, long prop, const Geometry *mg, long nn, long ne, long nf) : Cell (mecg, gid, oid, prop, mg, nn, ne, nf) { }
374  Element (classID mecg, const Element * src) : Cell (mecg, src) { }
376  virtual ~Element() {}
377 
378  protected:
381  const ElemAttribs *elemAttribs() const { return (ElemAttribs*)attributes; }
382 
383  public:
385  VTKPDtopology give_VTKPDtopology (void) const;
387  const Facedge* give_same_dimension_facedge (void) const;
389  //const Facedge* give_same_dimension_facedge_uniq (void) const;
390 
392  virtual DOFsPerNode give_DOFsPerNode_default (void) const = 0;
394  virtual SStype give_SSType_default (void) const = 0;
395 
396  //* *** SET ***
397  void set_mprop (long val);
398  void set_prop_node_inher (bool everynode);
399  void set_fullhinge_at (const Point *p) { this->elemAttribs()->set_fullhinge_at(this->give_point_indx(p)); }
400 
401  //* *** GET ***
403  const ElemAttribs *give_elemAttribs (void) const { return (ElemAttribs*)attributes; }
404  bool has_fullhinge_at (int point) const;
405 
407  void connectivity_assembling (bool re=false);
408  void connectivity_removing (void);
409 
411  virtual long give_edge_nodes (const Point **&edgnodes) const { errol; return 0; }
412  //
413  void set_load (int i, int indx=-1);
414 
415 
417  protected:
419  virtual void integrate_duplicated_cell (const Element *slave);
420 
421  public:
423  bool is_point_on (const PoinT *point, const GeometryComponent *&comp, PoinT *nc) const;
425  void switch_node_pointer_in_all_components (Point *slave, Point *master, bool duplcheck);
427  virtual void switch_node_pointer (Point *slave, Point *master, bool duplcheck);
428 
429  //* *** COMPUTE ***
431  virtual double give_quality (void) const { return -1; }
433  virtual double give_volume (void) const { errol; return 0.0; }
434 
435  //* tyhle dve fce se mi moc nelibi, nejsou systematicke, ale zatim nevim jak to udelat lepe
437  bool isBeam (void) const { return (this->give_dimension() == 1 && elemAttribs()->give_dpn() == DPN_DxyzRxyz) ? true : false; }
439  bool isTruss (void) const { return (this->give_dimension() == 1 && elemAttribs()->give_dpn() == DPN_DxyzR___) ? true : false; }
440 
441  //* *** PRINT ***
443  void print_row_VTK (FILE *stream) const;
444  virtual void print_row_VTX (char *str) const;
445 };
446 
447 
448 
449 //* ********************************************************************************************
450 //* *** *** *** *** CLASS GELEMENT *** *** *** ***
451 //* ********************************************************************************************
452 class Gelement : public Element
453 {
454  protected:
455  GPA<const Vertex> *fixedVertices; // vertices fixed to gelement
456  GPA<const Gelement> *fixedGelements; // gelements fixed to gelement
457 
458  public:
460  Gelement (classID mecg, long gid, long oid, const Geometry *mg, long nn, long ne, long nf);
462  Gelement (classID mecg, const Gelement *src);
464  virtual ~Gelement() { delete fixedVertices; delete fixedGelements; }
465 
466  //* *** GET ***
468  const GelemAttribs *give_gelemAttribs (void) const { return (GelemAttribs*)attributes; }
469 
471  virtual DOFsPerNode give_DOFsPerNode_default (void) const { return Pd->give_DOFspnod(); }
473  virtual SStype give_SSType_default (void) const { return SST_Void; }
474 
476  const GPA<const Vertex>* give_fixedVertices (void) const { return fixedVertices; }
478 
479  //
480  void set_elemSize (double val);
481  void set_elemCount (double val);
482 
483  //
484  void assign_fixed_entities_by_ID (bool node, long ncn, const long *icn);
485 
486  //* *** PRINT ***
487  virtual void print_row (FILE *stream, femFileFormat fff, bool endline=true, long did=0) const { errol; }
488 };
489 
490 
491 //* ********************************************************************************************
492 //* *** *** *** *** CLASS POLYLINE *** *** *** ***
493 //* ********************************************************************************************
494 class PolyLine : public Gelement
495 {
496  public:
498  PolyLine (long gid, long oid, const Geometry *mg, int nv, classID mecg=classVoid) : Gelement (((mecg == classVoid) ? classComponentGeometry1Dpoly : mecg), gid, oid, mg, nv, (nv ? nv-1 : 0), 0) { }
500  PolyLine (const PolyLine *src, classID mecg=classVoid) : Gelement (((mecg == classVoid) ? classComponentGeometry1Dpoly : mecg), src) { }
502  virtual ~PolyLine() { }
503 
505  virtual classID give_classid() const { return classPolyLine; }
507  virtual void checkConsistency (void) const;
508 
510  void add_point (const Point *val) {
511  points.add(val);
512  edges.resize(points()-1);
513  ((ComponentGeometry1Dpoly*)cg)->reset_nv();
514  }
515  void del_points_down (long val) {
516  points.resizedown(val);
517  edges.resizedown(points()-1);
518  ((ComponentGeometry1Dpoly*)cg)->reset_nv();
519  }
520 
522  virtual long give_edge_nodes (const Point **&edgnodes) const { errol; return 0; }
523 
525  void init_point_on (Mesh* pm, GPA<const Node> &hnodes, const PoinT *point, const GeometryComponent* comp, const PoinT *nc, const Point *parentpoint) const;
526  PolyLine* generate_mesh_RFbyHN (Mesh* pm, GPA<const Node> &hnodes) const;
527  void divide (Mesh* pm, GPA<const Node> &hnodes) const;
528  void findout_segment_domain (Mesh* pm, GPA<const Node> &hnodes) const;
529 
530  //* *** PRINT ***
531 };
532 
533 //* ********************************************************************************************
534 //* *** *** *** *** CLASS LINE *** *** *** ***
535 //* ********************************************************************************************
536 class Line : public PolyLine
537 {
538  public:
540  Line (long gid, long oid, const Geometry *mg) : PolyLine (gid, oid, mg, 2, classComponentGeometry1D) { }
542  virtual ~Line() { }
543 
545  virtual classID give_classid() const { return classLine; }
547  virtual void initialize (void);
548 
550  virtual long give_edge_nodes (const Point **&edgnodes) const;
551  virtual long give_face_nodes_edges (const Point **&facnodes, const Edge **&facedges) const { return 0; }
552 
553  //* *** PRINT ***
554  virtual void print_row (FILE *stream, femFileFormat fff, bool endline=true, long did=0) const { }
555 };
556 
557 
558 
559 //* ********************************************************************************************
560 //* *** *** *** *** CLASS POLYGONMDL *** *** *** ***
561 //* ********************************************************************************************
562 class PolygonMdl : public Gelement //, public ComponentGeometry2Dtriangle
563 {
564  public:
566  PolygonMdl (long gid, long oid, const Geometry *mg) : Gelement (classComponentGeometry2Dpolygon, gid, oid, mg, 1, 1, 1) { }
568  virtual ~PolygonMdl() { }
569 
571  virtual classID give_classid() const { return classPolygonMdl; }
572 
574  virtual long give_edge_nodes (const Point **&edgnodes) const;
576  virtual long give_face_nodes_edges (const Point **&facnodes, const Edge **&facedges) const;
577 
579  void allocNnNe (int n);
580 
581  //* *** PRINT ***
582  virtual void print_row (FILE *stream, femFileFormat fff, bool endline=true, long did=0) const { }
583 };
584 
585 
586 //* ********************************************************************************************
587 //* *** *** *** *** CLASS FELEMENT *** *** *** ***
588 //* ********************************************************************************************
589 class FElement : public Element
590 {
591  protected:
592  long domain; // domain
593  long lid; // local identification number of element
594 
595  const Gelement *mdl_masterel; // master element from master model
596 
597 
598  public:
600  FElement (classID mecg, long gid, long oid, const Geometry *mg, long ord, long nn, long ne, long nf, bool aa, long dom, long lid);
602  FElement (classID mecg, const FElement * src);
604  virtual ~FElement();
605 
607  void attributes_allocation (const GelemAttribs *masterat);
608 
610  virtual void initialize (void);
612  virtual void checkConsistency (void) const;
613 
614  //
615  const Mesh* Msh(void) const { return (Mesh*)Geom; }
616 
618  virtual void set_model_prop (long val, const Model *model, bool flag=false);
619 
621  //virtual FiniteElementType give_fe (enumSolver sol) const = 0;
623  virtual SPRpatchType give_spr_patch_type (void) const { errol; return SPRPT_Void; }
625  int give_nDOFs (void) const { return this->give_nno() * DOFsPerNode2nDOFs(this->elemAttribs()->give_dpn()); }
627  IntPointSet give_IPset_comp (Solver sol) const;
629  IntPointSet give_IPset_rslts (Solver sol) const;
630  //int give_NIP (enumSolver sol, ResultTypesAtElem rte) const { return IntPointSet_e2i (this->give_IPset(sol), sol, rte); }
631  int give_rslt_NIP (Solver sol) const { return IntPointSet_give_number_ips (this->give_IPset_rslts(sol)); }
632  //IntPointSet_give_number_ips_result (, sol, RTE_stress); }
633 
635  IntPointSet give_IPset2 (void) const;
636 
637  //* *** SET ***
638  void set_lid (long val) { lid = val; }
639  int give_ord (void) const { return this->elemAttribs()->give_ord(); }
640  long give_nnoed (int i) const { if (this->elemAttribs()->give_ord() != -4) errol; return 2; } // number of nodes on edge
641  //* *** GET ***
642  long give_domain (void) const { return domain; }
643  long give_lid (void) const { return lid; }
644  //bool is_pl_orig (void) const { return ( (this->mdl_masterel && this->mdl_masterel->give_Geom()->give_gp() == MMP_RFbyHN)); }
645  const Gelement* give_mdl_masterel (void) const { return mdl_masterel; }
646 
648  //* *** SET ***
649  void set_node (long i, long nid) { points.assign(i, (Point*)Msh()->give_Node(nid)); }
650  void set_node (long i, const Node* nod) { points.assign(i, (Point*)nod); }
651  //* *** GET ***
652  const Node* give_node (long i) const { return (const Node*)points[i]; }
653  //const GPA<const Node>* give_nodes (void) const { return &nodes; } // !!!! zkusit vrati &
654  // pokud uz existuje "master geometry", tak existuji i mdl_masterel-y elementu
655  //long give_parent_id (void) const { _errorr("tuto fci opravit"); return (mdl_masterel ? : this->give_origID() ); }
656  long give_parent_id (void) const { if (!mdl_masterel) _errorr("existuje master model?"); return this->give_mproperty() - 1; } // mdl_masterel->give_origID()
657  long give_parent_prop (void) const { if (!mdl_masterel) _errorr("existuje master model?"); return mdl_masterel->give_mpropertyORzero(); }
658 
659  protected:
661  virtual void integrate_duplicated_cell (const Element *slave);
662 
663 
664  //* *******************
665  //* *** RESULTS ***
666  //* *******************
667  private:
671  long regid; // adaptivity region number
672  protected:
673  double *maxSigmaEq; // maximal stress equivalent at element
674 
675  public:
676  //* *** SET ***
677  void set_regid (long val) { regid = val; }
678  //void set_resultN (long s, double *rslt, long step, ResultTypesAtNode rt);
679 
680 
681  //* *** GET ***
682  long give_regid (void) const { return regid; }
684  void allocate_results (void);
685  void add_result (Array *rslt, long step, ResultTypesAtElem rt);
686  void set_result (long s, double *rslt, long step, ResultTypesAtElem rt);
687  void set_result ( double rslt, long step, ResultTypesAtElem rt);
688  void set_result ( const VectoR *rslt, long step, ResultTypesAtElem rt);
689  const Dscal* give_results_ds (long step, ResultTypesAtElem rt) const;
690  const Dvctr* give_results_dv (long step, ResultTypesAtElem rt) const;
691  const Dmtrx* give_results_dm (long step, ResultTypesAtElem rt) const;
692  const Array* give_results (long step, ResultTypesAtElem rt) const { return results[step][rt]; }
693  // //double give_displ (int i, int j) const { return displ[i][j]; }
694  // Dvctr* give_full_alloc_displcmnt_at (long step) const;
695  // Dvctr* give_full_alloc_reactions_at (long step) const;
696  // void give_displcmnt_in_all_steps(Dvctr *data, int indx) const;
697  virtual void compute_maxSigmaEq (void) { _errorr2("CS usage computation is not supported at element %ld", ID+1); }
698  void setup_maxSigmaEq (void);
699  double give_CSusage_elast (void);
700  double give_CSusage_elast_rel (void);
701  int give_CSusage_elast_bool (void);
702 
704  virtual double give_ssstate (Dvctr *data, SStype SST, RVType rvtype, char type, long step, const Node *node = NULL) = 0;
706  //const Dmtrx** give_plaststrain (void) const { return (const Dmtrx**)plaststrain; }
707  //virtual void rotate2local(Dvctr *data) { _errorr ("not implemented"); }
709  void check_rslts (long step, ResultTypesAtElem rt) const { if (!results || !results[step][rt])
710  _errorr3 ("no result %d at step %ld", (int)rt, step); }
712  double fillupbyzero (Dvctr *data, SStype SST) const;
714  long give_result_ncomp (long time_step, ResultTypesAtElem rte) const;
715 
716 
718  void initialize_CSL (int c, long *fID, long *tCSL);
719 
720  //* *** READ ***
721  virtual void read_input (const char *&str, femFileFormat fff);
722  virtual void read_output_OOFEM (FILE *stream, long step) { _errorr ("not implemented"); }
723  virtual void read_output_SIFEL (FILE *stream, long step, ResultTypesAtElem rt) { _errorr ("not implemented"); }
724 
725  //* *** PRINT ***
727  virtual void print_row (FILE *stream, femFileFormat fff, bool endline=true, long did=0) const;
729  //void print_row_VTK (FILE *stream) const;
730  //virtual void print_row_VTX (char *str) const;
731 
732  //* *** READ ***
734  void read_nodes (const char *&str, femFileFormat fff);
735  //* *** PRINT ***
736 
738  bool is_cmfr (void);
739 
741  virtual void give_ip_coords_global (IntPointSet ips, int i, PoinT &coords) const { _errorr("not implemented"); }
742 };
743 
744 
745 //* ********************************************************************************************
746 //* *** *** *** *** CLASS BEAM *** *** *** ***
747 //* ********************************************************************************************
748 class Beam : public FElement //, public ComponentGeometry1D
749 {
750  public:
752  Beam (long gid, long oid, const Geometry *mg, bool aa, long dom, long lid) : FElement (classComponentGeometry1D, gid,oid, mg,1 ,2 ,1 ,0 ,aa,dom,lid) {}
754  virtual ~Beam() { }
755 
757  virtual classID give_classid() const { return classBeam; }
759  virtual void checkConsistency (void) const;
760 
762  virtual void initialize (void) {
764  }
765 
767  virtual DOFsPerNode give_DOFsPerNode_default (void) const;
769  virtual SStype give_SSType_default (void) const;
771  //virtual FiniteElementType give_fe (Solver sol) const;
772 
774  virtual long give_edge_nodes (const Point **&edgnodes) const;
775  virtual long give_face_nodes_edges (const Point **&facnodes, const Edge **&facedges) const { return 0; }
777  void give_vector (VectoR *v) const;
778 
779 
780  //* *******************
781  //* *** RESULTS ***
782  //* *******************
784  virtual double give_ssstate (Dvctr *data, SStype SST, RVType rvtype, char type, long step, const Node *node = NULL);
786  double give_normal_force (long step) const;
788  virtual void compute_maxSigmaEq (void);
789 
790  //* *** READ ***
791  void read_output_OOFEM (FILE *stream, long step);
792  void read_output_SIFEL (FILE *stream, long step, ResultTypesAtElem rt);
793 
794  //* *** PRINT ***
796  virtual void print_row (FILE *stream, femFileFormat fff, bool endline=true, long did=0) const;
797 };
798 
799 
800 //* ********************************************************************************************
801 //* *** *** *** *** CLASS TRIANGLE *** *** *** ***
802 //* ********************************************************************************************
803 class Triangle : public FElement //, public ComponentGeometry2Dtriangle
804 {
805  protected:
806  Dmtrx *rotMg2l; // rotation matrix from global to local SS
807 
808  public:
810  Triangle (long gid, long oid, const Geometry *mg, bool aa, long dom, long lid) : FElement (classComponentGeometry2Dtriangle, gid,oid,mg,1 ,3 ,3 ,1 , aa, dom,lid) { rotMg2l = NULL; }
812  Triangle (const Quadrangle * src, bool firstr, bool firstdiag);
814  virtual ~Triangle() { delete rotMg2l; }
815 
817  virtual classID give_classid() const { return classTriangle; }
819  virtual void checkConsistency (void) const;
820 
822  virtual DOFsPerNode give_DOFsPerNode_default (void) const;
824  virtual SStype give_SSType_default (void) const;
826  //virtual FiniteElementType give_fe (Solver sol) const;
828  virtual SPRpatchType give_spr_patch_type (void) const { return SPRPT_2d; }
830  virtual long give_edge_nodes (const Point **&edgnodes) const;
831  virtual long give_face_nodes_edges (const Point **&facnodes, const Edge **&facedges) const;
832 
833  //* *******************
834  //* *** RESULTS ***
835  //* *******************
837  virtual double give_ssstate (Dvctr *data, SStype SST, RVType rvtype, char type, long step, const Node *node = NULL);
839  virtual void compute_maxSigmaEq (void);
840 
841  //* *** COMPUTE ***
843  virtual double give_quality (void) const;
845  virtual double give_volume (void) const { return this->cg->give_lav() * this->elemAttribs()->give_cs()->give_thickness(); }
846 
848  void compute_rotMg2l(void);
850  virtual void rotate2local(Dvctr *data);
851 
853  virtual void give_ip_coords_global (IntPointSet ips, int i, PoinT &coords) const;
854 
855  //* *** READ ***
856  void read_input (const char *&str, femFileFormat fff);
857  void read_output_OOFEM (FILE *stream, long step);
858  void read_output_SIFEL (FILE *stream, long step, ResultTypesAtElem rt);
859 };
860 
861 
862 //* ********************************************************************************************
863 //* *** *** *** *** CLASS QUADRANGLE *** *** *** ***
864 //* ********************************************************************************************
865 class Quadrangle : public FElement //, public ComponentGeometry2Dquadrangle
866 {
867  protected:
868  Dmtrx *rotMg2l; // rotation matrix from global to local SS
869 
870  public:
872  Quadrangle (long gid, long oid, const Geometry *mg, bool aa, long dom, long lid) : FElement (classComponentGeometry2Dquadrangle, gid,oid,mg,1 ,4 ,4 ,1 , aa, dom,lid)
873  {
874  rotMg2l = NULL;
875  }
877  virtual ~Quadrangle() { delete rotMg2l; }
878 
880  virtual classID give_classid() const { return classQuadrangle; }
882  virtual void checkConsistency (void) const;
883 
885  virtual DOFsPerNode give_DOFsPerNode_default (void) const;
887  virtual SStype give_SSType_default (void) const;
889  //virtual FiniteElementType give_fe (Solver sol) const;
891  virtual SPRpatchType give_spr_patch_type (void) const { return SPRPT_2d; }
892 
894  virtual long give_edge_nodes (const Point **&edgnodes) const;
896  virtual long give_face_nodes_edges (const Point **&facnodes, const Edge **&facedges) const;
897 
899  bool is_first_diag_short (void);
900 
902  virtual double give_ssstate (Dvctr *data, SStype SST, RVType rvtype, char type, long step, const Node *node = NULL);
903 
904  //* *** COMPUTE ***
906  //virtual double give_quality (void);
908  virtual double give_volume (void) const { return this->cg->give_lav() * this->elemAttribs()->give_cs()->give_thickness(); }
909 
911  //void compute_rotMg2l(void);
913  //virtual void rotate2local(Dvctr *data);
914 
916  virtual void give_ip_coords_global (IntPointSet ips, int i, PoinT &coords) const;
917 
919  void read_input (const char *&str, femFileFormat fff);
920  void read_output_OOFEM (FILE *stream, long step);
921 };
922 
923 
924 //* ********************************************************************************************
925 //* *** *** *** *** CLASS TETRA *** *** *** ***
926 //* ********************************************************************************************
927 class Tetra : public FElement
928 {
929  long *surfprop; // property of surfaces (specially for t3d mesh input)
930 
931  public:
933  Tetra (long gid, long oid, const Geometry *mg, bool aa, long dom, long lid) : FElement (classComponentGeometry3Dtetrahedron, gid,oid,mg,1 ,4 ,6 ,4 , aa, dom,lid)
934  {
935  surfprop = NULL;
936  }
938  virtual ~Tetra() { delete [] surfprop; }
939 
941  virtual classID give_classid() const { return classTetra; }
943  virtual void checkConsistency (void) const;
944 
946  virtual DOFsPerNode give_DOFsPerNode_default (void) const;
948  virtual SStype give_SSType_default (void) const;
950  //virtual SStype give_SStype (void) const {
951  // if (attributes->give_sst() == SST_3d) return RSLTSST_3dshell_nodes;
952  // else errol; return RSLTSST_Void;
953  //}
955  //virtual FiniteElementType give_fe (Solver sol) const;
956 
958  virtual long give_edge_nodes (const Point **&edgnodes) const;
960  virtual long give_face_nodes_edges (const Point **&facnodes, const Edge **&facedges) const;
961 
963  //void renumbering(void);
965  virtual double give_ssstate (Dvctr *data, SStype SST, RVType rvtype, char type, long step, const Node *node = NULL) { errol; return 0.; }
966 
967  //* *** READ ***
969  //void read_output_OOFEM (FILE *stream, long step);
971  //virtual void read_T3d_input (const char *str);
972 
973  //* *** PRINT ***
975  virtual void print_row_VTX (char *str) const;
976 };
977 
978 //* ********************************************************************************************
979 //* *** *** *** *** CLASS BRICK *** *** *** ***
980 //* ********************************************************************************************
981 class Brick : public FElement //, public ComponentGeometry3Dhexahedron
982 {
983  public:
985  Brick (long gid, long oid, const Geometry *mg, bool aa, long dom, long lid) : FElement (classComponentGeometry3Dhexahedron, gid,oid,mg,1 ,8 ,12,6 , aa, dom,lid) //, ComponentGeometry3Dhexahedron ()
986  { }
988  virtual ~Brick() { }
989 
991  virtual classID give_classid() const { return classBrick; }
993  virtual void checkConsistency (void) const;
994 
996  virtual DOFsPerNode give_DOFsPerNode_default (void) const;
998  virtual SStype give_SSType_default (void) const;
1000  //virtual SStype give_SStype (void) const {
1001  // if (attributes->give_sst() == SST_3d) return RSLTSST_3dshell_nodes;
1002  // else errol; return RSLTSST_Void;
1003  //}
1005  //virtual FiniteElementType give_fe (Solver sol) const;
1006 
1008  virtual long give_edge_nodes (const Point **&edgnodes) const;
1010  virtual long give_face_nodes_edges (const Point **&facnodes, const Edge **&facedges) const;
1011 
1013  void renumbering(void);
1015  virtual double give_ssstate (Dvctr *data, SStype SST, RVType rvtype, char type, long step, const Node *node = NULL);
1016 
1017  //* *** READ ***
1019  void read_output_OOFEM (FILE *stream, long step);
1020  void read_output_SIFEL (FILE *stream, long step, ResultTypesAtElem rt);
1022  virtual void read_input (const char *&str, femFileFormat fff);
1023 
1024  //* *** PRINT ***
1026  virtual void print_row_VTX (char *str) const;
1027 };
1028 
1029 
1030 } // namespace midaspace
1031 
1032 #endif // MIDAS_CELL_H
const GPA< const Element > * give_superelems(void) const
Definition: cell.h:189
long give_cloads(const Element *fe) const
Definition: cell.h:218
bool has_same_geom_with(Cell *slave) const
ASSORTED check same geometry.
Definition: cell.cpp:231
const GPA< const Gelement > * give_fixedGelements(void) const
Definition: cell.h:477
void compute_rotMg2l(void)
activate rotMg2l
Definition: cell.cpp:2715
virtual SStype give_SSType_default(void) const
give default type of stress state
Definition: cell.cpp:2639
const ElemAttribs * give_elemAttribs(void) const
Definition: cell.h:403
GPA< const Element > superelems
CONNECTIVITY - full connectivity initiated only when Geom->connectivity_is_assembled() == true...
Definition: cell.h:157
void read_input(const char *&str, femFileFormat fff)
Definition: cell.cpp:2768
femFileFormat
Definition: alias.h:632
virtual SStype give_SSType_default(void) const
give default type of stress state
Definition: cell.cpp:3538
virtual double give_ssstate(Dvctr *data, SStype SST, RVType rvtype, char type, long step, const Node *node=NULL)
give stress-strain state
Definition: cell.cpp:3807
VTKPDtopology give_VTKPDtopology(void) const
Definition: cell.cpp:814
int cross_abscissa_face(const PoinT *a1, const PoinT *a2, long cunf, const Face **unfac, const Cell *&comp, PoinT *nc, PoinT *cp)
Function finds out whether abscissa intersects any face.
Definition: cell.cpp:280
GPA< const Face > superfaces
CONNECTIVITY - full connectivity initiated only when Geom->connectivity_is_assembled() == true these ...
Definition: cell.h:240
virtual ~Element()
DESTRUCTOR.
Definition: cell.h:376
virtual SPRpatchType give_spr_patch_type(void) const
return type of element for OOFEM solver
Definition: cell.h:623
const PoinT * give_centercoords(void) const
*** GET ***
Definition: compgeom.h:62
virtual ~Edge()
CONSTRUCTOR COPY.
Definition: cell.h:258
virtual void print_row(FILE *stream, femFileFormat fff, bool endline=true, long did=0) const
*** PRINT ***
Definition: cell.cpp:702
virtual void switch_node_pointer(Point *slave, Point *master, bool duplcheck)
switch node pointer form slave to master
Definition: cell.cpp:686
Solver
Solver.
Definition: alias.h:188
virtual void checkConsistency(void) const
Checks data consistency.
Definition: cell.cpp:1165
void read_output_OOFEM(FILE *stream, long step)
Definition: cell.cpp:3383
virtual void compute_maxSigmaEq(void)
Definition: cell.cpp:2482
virtual void initialize(void)
initiate/sets data
Definition: cell.cpp:1473
virtual ~PolygonMdl()
DESTRUCTOR.
Definition: cell.h:568
void read_output_OOFEM(FILE *stream, long step)
Definition: cell.cpp:2783
virtual void read_output_SIFEL(FILE *stream, long step, ResultTypesAtElem rt)
Definition: cell.h:723
const Array * give_results(long step, ResultTypesAtElem rt) const
Definition: cell.h:692
PolyLine * generate_mesh_RFbyHN(Mesh *pm, GPA< const Node > &hnodes) const
Definition: cell.cpp:1221
void renumbering(void)
int DOFsPerNode2nDOFs(DOFsPerNode od)
Definition: alias.h:755
DOFsPerNode
Definition: alias.h:700
long give_point_indx(const Point *p) const
Definition: cell.h:101
virtual long give_edge_nodes(const Point **&edgnodes) const
Definition: cell.cpp:1512
virtual double give_ssstate(Dvctr *data, SStype SST, RVType rvtype, char type, long step, const Node *node=NULL)
give stress-strain state
Definition: cell.cpp:3139
void add_point(const Point *val)
Definition: cell.h:510
long give_parent_prop(void) const
Definition: cell.h:657
virtual ~Triangle()
DESTRUCTOR.
Definition: cell.h:814
bool connectivity_assembled
Definition: cell.h:51
virtual classID give_classid() const
Returns classID - class identification.
Definition: cell.h:505
virtual DOFsPerNode give_DOFsPerNode_default(void) const
give default DOFs per node
Definition: cell.cpp:3529
virtual classID give_classid() const
Returns classID - class identification.
Definition: cell.h:880
void remove_superface(const Face *comp)
Definition: cell.h:266
long give_domain(void) const
Definition: cell.h:642
virtual ~Brick()
DESTRUCTOR.
Definition: cell.h:988
void transform_nc(const Point *t1, const Point *t2, double &ksi)
Definition: cell.cpp:468
#define ZERO
Definition: alias.h:51
virtual classID give_classid() const
Returns classID - class identification.
Definition: cell.h:571
General functions.
void allocate_results(void)
RESULTS.
Definition: cell.cpp:1694
IntPointSet give_IPset_comp(Solver sol) const
basic set = for displacement computation
Definition: cell.cpp:1635
PolygonMdl(long gid, long oid, const Geometry *mg)
CONSTRUCTOR.
Definition: cell.h:566
virtual long give_edge_nodes(const Point **&edgnodes) const
Definition: cell.cpp:1489
const GPA< const Face > * give_superfaces(void) const
Definition: cell.h:271
virtual void checkConsistency(void) const
Checks data consistency.
Definition: cell.h:71
Cell(classID mecg, long gid, long oid, long prop, const Geometry *mg, long nn, long ne, long nf)
CONSTRUCTOR.
Definition: cell.cpp:34
virtual ~Quadrangle()
DESTRUCTOR.
Definition: cell.h:877
const PoinT * give_centercoords(void) const
Definition: cell.h:33
virtual double give_ssstate(Dvctr *data, SStype SST, RVType rvtype, char type, long step, const Node *node=NULL)
give stress-strain state
Definition: cell.cpp:2388
const Face * give_face(long i) const
Definition: cell.h:95
GPA< const Point > points
Definition: cell.h:46
Element(classID mecg, const Element *src)
CONSTRUCTOR COPY.
Definition: cell.h:374
double fillupbyzero(Dvctr *data, SStype SST) const
Definition: cell.cpp:1785
Geometry components.
void print_row_VTK(FILE *stream) const
print element row output for VTK
Definition: cell.cpp:1091
Quadrangle(long gid, long oid, const Geometry *mg, bool aa, long dom, long lid)
CONSTRUCTOR ord nn ne nf.
Definition: cell.h:872
int give_dimension(void) const
return type of element geometry, is identical with class derived from FElement
Definition: cell.h:32
Cell * last_duplicity_master(void) const
return the last one in the duplicity master chain
Definition: cell.cpp:102
Edge(long nn, const Point **nods)
CONSTRUCTOR.
Definition: cell.h:246
const FacedgeAttribs * give_facedgeAttribs(void) const
Definition: cell.h:199
const GPA< const BoundaryCond > * give_loads(void) const
Definition: attribute.h:594
void check_connectivity(void) const
Definition: geomcomp.h:146
virtual long give_face_nodes_edges(const Point **&facnodes, const Edge **&facedges) const
Definition: cell.h:775
void set_face(long i, const Face *val)
Definition: cell.h:87
void read_input(const char *&str, femFileFormat fff)
Definition: cell.cpp:3368
virtual void checkConsistency(void) const
Checks data consistency.
Definition: cell.cpp:1594
long give_nfa(void) const
Definition: cell.h:91
const GelemAttribs * give_gelemAttribs(void) const
Definition: cell.h:468
double give_GeomWeight1deg(void) const
Definition: compgeom.h:65
virtual void connectivity_assembling(bool re=false)=0
Function setups connectivity of element and its components == nodes, edges and faces; re == reassembl...
virtual void switch_node_pointer(Point *slave, Point *master, bool duplcheck)
switch node pointer form slave to master
Definition: cell.cpp:501
ElemAttribs * elemAttribs()
Gives attribute attributes, data type changed to ElemAttribs*.
Definition: cell.h:380
virtual void read_input(const char *&str, femFileFormat fff)
Definition: cell.cpp:1816
double give_CSusage_elast_rel(void)
Definition: cell.cpp:1757
virtual void print_row(FILE *stream, femFileFormat fff, bool endline=true, long did=0) const
*** PRINT ***
Definition: cell.cpp:517
bool has_fullhinge_at(int point) const
virtual void integrate_duplicated_cell(const Element *slave)
DUPLICITY.
Definition: cell.cpp:990
virtual ~Tetra()
DESTRUCTOR.
Definition: cell.h:938
void set_node(long i, long nid)
ATRIBUTES.
Definition: cell.h:649
void connectivity_assembling(bool re=false)
Function assembles connectivity between face and its nodes and edges.
Definition: cell.cpp:598
Element(classID mecg, long gid, long oid, long prop, const Geometry *mg, long nn, long ne, long nf)
CONSTRUCTOR.
Definition: cell.h:372
long give_cloads(void) const
Definition: attribute.h:596
long ID
(global) identification number == position in list of members; zero-based numbering.
Definition: subject.h:22
int give_CSusage_elast_bool(void)
Definition: cell.cpp:1778
Alias.
double give_thickness(void) const
Definition: attribute.h:222
virtual void checkConsistency(void) const
Checks data consistency.
Definition: cell.cpp:2124
void check_connectivity_loc(void) const
Definition: cell.h:75
void connectivity_assembling(bool re=false)
Function assembles connectivity between element and its nodes, edges and faces (which are allocated i...
Definition: cell.cpp:852
virtual ~FElement()
DESTRUCTOR.
Definition: cell.cpp:1571
virtual void compute_maxSigmaEq(void)
Definition: cell.cpp:3189
GPA< const Gelement > * fixedGelements
Definition: cell.h:456
#define errol
Definition: gelib.h:142
GPA< const Face > faces
Definition: cell.h:48
void set_fullhinge_at(const Point *p)
Definition: cell.h:399
void connectivity_removing(void)
Function removes connectivity between element and its components == nodes, edges and faces...
Definition: cell.cpp:939
void switch_node_pointer_in_all_components(Point *slave, Point *master, bool duplcheck)
switch node pointer from oldnode/slave to newnode/master on this and all components (edges...
Definition: cell.cpp:1001
virtual void switch_node_pointer(Point *slave, Point *master, bool duplcheck)
switch node pointer form slave to master
Definition: cell.cpp:140
double give_normal_force(long step) const
give normal force
virtual long give_ord(void) const
Definition: cell.h:356
#define _errorr2(_1, _2)
Definition: gelib.h:145
long give_numsuperface(void) const
Definition: cell.h:269
Attributes * attributes
ATTRIBUTES.
Definition: geomcomp.h:73
GPA< const Vertex > * fixedVertices
Definition: cell.h:455
double give_elemSize(void) const
Definition: cell.cpp:784
CellGeometry give_cellGeom(void) const
Definition: cell.h:31
virtual classID give_classid() const
Returns classID - class identification.
Definition: cell.h:991
const GPA< const BoundaryCond > * give_loads(const Element *fe) const
Definition: cell.h:212
void connectivity_removing(void)
Function removes connectivity between edge and its nodes.
Definition: cell.cpp:405
long give_ned(void) const
Definition: cell.h:90
virtual classID give_classid() const
Returns classID - class identification.
Definition: cell.h:261
CellGeometry
Definition: alias.h:840
virtual void print_row(FILE *stream, femFileFormat fff, bool endline=true, long did=0) const
print element row output in fff format
Definition: cell.cpp:2531
virtual ~Face()
DESTRUCTOR.
Definition: cell.h:336
Face(long nn, long ne, const Point **nods, const Edge **edgs)
GEOMETRIC CHARAKTERISTICS.
Definition: cell.h:323
ComponentGeometry * cg
Definition: cell.h:28
virtual void rotate2local(Dvctr *data)
Definition: cell.cpp:2740
virtual classID give_classid() const
Returns classID - class identification.
Definition: cell.h:941
void setup_duplicity_master(Cell *val)
Definition: cell.cpp:159
virtual double give_quality(void) const
compute quality of element
Definition: cell.h:431
bool is_cmfr(void)
Definition: cell.cpp:2039
virtual void set_model_prop(long val, const Model *model, bool flag=false)
Definition: cell.cpp:627
PolyLine(const PolyLine *src, classID mecg=classVoid)
CONSTRUCTOR COPY.
Definition: cell.h:500
IntPointSet
Definition: alias.h:1248
virtual double give_volume(void) const
compute volume of element
Definition: cell.h:845
int give_ord(void) const
Definition: attribute.h:821
const ElemAttribs * elemAttribs() const
Definition: cell.h:381
const Element * give_superelem(long i) const
Definition: cell.h:188
virtual void integrate_duplicated_cell(const Element *slave)
DUPLICITY.
Definition: cell.cpp:1665
SPRpatchType
typ spr patche, závisí na typu/geometrii elementů
Definition: alias.h:338
virtual void set_model_prop(long val, const Model *model, bool flag=false)
Definition: cell.cpp:1620
const Point * give_point(long i) const
Definition: cell.h:93
void transform_nc(const Edge *t1, const Edge *t2, PoinT *nc) const
Definition: cell.cpp:668
void set_point(long i, long pid)
Definition: cell.h:85
Structs Elem3D, PoinT and VectoR; classes Array, Array1d, Xscal, Dscal, Xvctr, Lvctr, Dvctr, Xmtrx, Lmtrx and Dmtrx.
const GPA< const Vertex > * give_fixedVertices(void) const
Definition: cell.h:476
int give_nDOFs(void) const
give number of DOFs
Definition: cell.h:625
Geometry components.
const Element * give_main_masterel_uniq(void) const
main masterel is Element (not Facedge) with same dimension as face/edge
Definition: cell.cpp:367
virtual void print_row_VTX(char *str) const
Definition: cell.cpp:3557
virtual ~PolyLine()
DESTRUCTOR.
Definition: cell.h:502
void give_vector(VectoR *v) const
Definition: cell.cpp:2199
virtual double give_volume(void) const
compute volume of element
Definition: cell.h:433
void read_output_SIFEL(FILE *stream, long step, ResultTypesAtElem rt)
Definition: cell.cpp:2336
double * maxSigmaEq
Definition: cell.h:673
virtual void give_ip_coords_global(IntPointSet ips, int i, PoinT &coords) const
Definition: cell.cpp:2756
GelemAttribs * give_gelemAttribs(void)
Definition: cell.h:467
void allocNnNe(int n)
Definition: cell.cpp:1504
void add_result(Array *rslt, long step, ResultTypesAtElem rt)
Definition: cell.cpp:1708
const Face * give_superface(long i) const
Definition: cell.h:270
const Dmtrx * give_results_dm(long step, ResultTypesAtElem rt) const
Definition: cell.cpp:1716
double give_elemSize(void) const
Definition: cell.cpp:559
const GPA< const Face > * give_faces(void) const
Definition: cell.h:99
const Edge * give_edge(long i) const
Definition: cell.h:94
virtual SStype give_SSType_default(void) const
give default type of stress state
Definition: cell.h:473
*** *** *** *** CLASS ComponentGeometry 1D *** *** *** ***
Definition: compgeom.h:76
ComponentGeometry * give_cg(void)
Definition: cell.h:41
void connectivity_removing(void)
Function removes connectivity between face and its nodes and edges.
Definition: cell.cpp:608
virtual void print_row_VTX(char *str) const
Definition: cell.cpp:3831
virtual void give_ip_coords_global(IntPointSet ips, int i, PoinT &coords) const
activate rotMg2l
Definition: cell.cpp:3496
const Problem * Pd
Pointer to owner = parent problem.
Definition: subject.h:24
void init_point_on(Mesh *pm, GPA< const Node > &hnodes, const PoinT *point, const GeometryComponent *comp, const PoinT *nc, const Point *parentpoint) const
RFbyHN.
Definition: cell.cpp:1183
virtual SPRpatchType give_spr_patch_type(void) const
return type of element for OOFEM solver
Definition: cell.h:891
virtual double give_volume(void) const
compute quality of element
Definition: cell.h:908
const Mesh * Msh(void) const
Definition: cell.h:615
long give_nnoed(int i) const
Definition: cell.h:640
virtual long give_ord(void) const =0
virtual long give_face_nodes_edges(const Point **&facnodes, const Edge **&facedges) const
Definition: cell.cpp:3669
bool cross_abscissa_node(const PoinT *a1, const PoinT *a2, long cunn, const Point **unnod, const Point *&nod, double &ksi, PoinT *cp) const
Function finds out whether some element node lays on abscissa.
Definition: cell.cpp:251
virtual void checkConsistency(void) const
Checks data consistency.
Definition: cell.cpp:2604
virtual void checkConsistency(void) const
Checks data consistency.
Definition: cell.cpp:3607
virtual SPRpatchType give_spr_patch_type(void) const
return type of element for OOFEM solver
Definition: cell.h:828
virtual void read_input(const char *&str, femFileFormat fff)
Definition: cell.cpp:3801
virtual void print_row(FILE *stream, femFileFormat fff, bool endline=true, long did=0) const
*** PRINT ***
Definition: cell.h:582
virtual long give_edge_nodes(const Point **&edgnodes) const
Definition: cell.cpp:2668
void assure_duplicity_master(void)
DUPLICITY.
Definition: cell.cpp:77
virtual void give_ip_coords_global(IntPointSet ips, int i, PoinT &coords) const
Definition: cell.h:741
virtual long give_edge_nodes(const Point **&edgnodes) const
Definition: cell.h:522
Geometry description.
Definition: geometry.h:29
virtual CellGeometry give_elemGeom(void) const =0
virtual void checkConsistency(void) const
Checks data consistency.
Definition: geomcomp.h:98
virtual void connectivity_removing(void)=0
Function removes connectivity of element and its components == nodes, edges and faces; re == reassemb...
virtual void checkConsistency(void) const
Checks data consistency.
Definition: cell.cpp:3519
virtual ~Cell()
DESTRUCTOR.
Definition: cell.cpp:67
void setadd_masterel(const Element *comp)
Set master element if it is.
Definition: cell.cpp:352
virtual classID give_classid() const
Returns classID - class identification.
Definition: cell.h:817
virtual int give_dimension(void) const =0
STATIC.
virtual double give_quality(void) const
compute quality of element
Definition: cell.cpp:2691
void remove_superelem(const Element *comp)
Definition: cell.h:182
void read_output_OOFEM(FILE *stream, long step)
Definition: cell.cpp:2206
Tetra(long gid, long oid, const Geometry *mg, bool aa, long dom, long lid)
CONSTRUCTOR ord nn ne nf.
Definition: cell.h:933
virtual double give_characteristic_size(void) const
Definition: compgeom.h:68
void check_rslts(long step, ResultTypesAtElem rt) const
Definition: cell.h:709
virtual void print_row_VTX(char *str) const
Definition: cell.cpp:1100
void set_load(int i, int indx=-1)
Definition: cell.cpp:956
GPA< const Element > masterels
Definition: cell.h:161
long give_mproperty() const
*** GET ***
Definition: geomcomp.h:126
virtual double give_ssstate(Dvctr *data, SStype SST, RVType rvtype, char type, long step, const Node *node=NULL)
give stress-strain state
Definition: cell.h:965
ElemAttribs * give_elemAttribs(void)
Definition: cell.h:402
bool is_point_in_sphere(const PoinT *point) const
Definition: compgeom.h:70
void read_output_SIFEL(FILE *stream, long step, ResultTypesAtElem rt)
Definition: cell.cpp:3747
void switch_myself_at_connectivity(Cell *master)
switch receiver to master in connectivity system
Definition: cell.cpp:415
bool is_point_in_sphere(const PoinT *point) const
Definition: cell.h:37
FacedgeAttribs * give_facedgeAttribs(void)
Definition: cell.h:198
Facedge(long gid, long oid, long prop, const Geometry *mg, long nn, long ne, long nf)
CONSTRUCTOR.
Definition: cell.h:165
const GPA< const Point > * give_points(void) const
Definition: cell.h:97
const Geometry * Geom
Pointer to owner == parent geometry.
Definition: subject.h:59
double give_lav(void) const
Definition: compgeom.h:64
virtual ~Gelement()
DESTRUCTOR.
Definition: cell.h:464
virtual DOFsPerNode give_DOFsPerNode_default(void) const
give default DOFs per node
Definition: cell.h:471
const GPA< const Edge > * give_edges(void) const
Definition: cell.h:98
GPA - Generic Pointer Array, template class manages 1d array of pointers to objects of type T...
Definition: gpa.h:23
virtual DOFsPerNode give_DOFsPerNode_default(void) const
give default DOFs per node
Definition: cell.cpp:2627
const Dvctr * give_results_dv(long step, ResultTypesAtElem rt) const
Definition: cell.cpp:1715
void set_node(long i, const Node *nod)
Definition: cell.h:650
#define _errorr(_1)
Definition: gelib.h:151
void set_elemCount(double val)
Definition: cell.cpp:1143
void divide(Mesh *pm, GPA< const Node > &hnodes) const
Function splits polyline segments up subsegments, one subsegment belongs to one element.
Definition: cell.cpp:1299
GPA< const Edge > edges
Definition: cell.h:47
const Element * give_masterel(void) const
masterel is Element (not Facedge), the first one, with lowest dimension
Definition: cell.h:193
Attributes * give_attributes(void)
Definition: geomcomp.h:139
SStype
type of stress/strain state of element; especially results depends on this variable => described at M...
Definition: alias.h:954
PolyLine(long gid, long oid, const Geometry *mg, int nv, classID mecg=classVoid)
CONSTRUCTOR.
Definition: cell.h:498
#define _errorr3(_1, _2, _3)
Definition: gelib.h:146
const Gelement * give_mdl_masterel(void) const
Definition: cell.h:645
virtual double give_ssstate(Dvctr *data, SStype SST, RVType rvtype, char type, long step, const Node *node=NULL)
give stress-strain state
Definition: cell.cpp:3472
virtual classID give_classid() const
Returns classID - class identification.
Definition: cell.h:545
virtual long give_face_nodes_edges(const Point **&facnodes, const Edge **&facedges) const
Definition: cell.cpp:3347
void set_point(long i, const Point *val)
ATRIBUTES.
Definition: cell.h:84
bool is_nod_on(double norm, const PoinT *point, double &ksi) const
Function finds out mutual position of node and edge.
Definition: cell.cpp:484
long give_regid(void) const
Definition: cell.h:682
void set_prop_node_inher(bool everynode)
inherit property from element to nodes, only if node has one superelem
Definition: cell.cpp:977
virtual long give_face_nodes_edges(const Point **&facnodes, const Edge **&facedges) const
Definition: cell.cpp:1526
const Gelement * mdl_masterel
Definition: cell.h:595
virtual DOFsPerNode give_DOFsPerNode_default(void) const
give default DOFs per node
Definition: cell.cpp:3297
void read_output_OOFEM(FILE *stream, long step)
Definition: cell.cpp:3692
IntPointSet give_IPset2(void) const
higher set = for displacement^2 computation, or mass matrix or sigma error ...
virtual long give_edge_nodes(const Point **&edgnodes) const
return type of element for OOFEM solver
Definition: cell.cpp:3567
bool switch_edge_pointer(Edge *slave, Edge *master)
switch pointer to component edge - slave is replaced be master
Definition: cell.cpp:147
virtual ~Facedge()
CONSTRUCTOR COPY.
Definition: cell.h:173
virtual void switch_node_pointer(Point *slave, Point *master, bool duplcheck)
switch node pointer form slave to master
Definition: cell.cpp:1010
int give_ord(void) const
Definition: cell.h:639
Dmtrx * rotMg2l
Definition: cell.h:806
DOFsPerNode give_DOFspnod(void) const
Definition: problem.h:256
double give_circum(void) const
Definition: cell.h:34
double give_GeomWeight1deg(void) const
Definition: cell.h:36
const Dscal * give_results_ds(long step, ResultTypesAtElem rt) const
Definition: cell.cpp:1714
ResultTypesAtElem
Result type at element.
Definition: alias.h:240
bool check_collapse(void)
check any two nodes are same = element is collapsed
Definition: cell.h:138
virtual void read_output_OOFEM(FILE *stream, long step)
Definition: cell.h:722
virtual long give_ord(void) const
Definition: cell.h:298
void setadd_superface(const Face *comp, bool uniquecheck)
CONNECTIVITY initiated only when Geom->connectivited() == true.
Definition: cell.h:265
void connectivity_assembling(bool re=false)
Function assembles connectivity between edge and its nodes.
Definition: cell.cpp:396
long give_result_ncomp(long time_step, ResultTypesAtElem rte) const
Definition: cell.cpp:1803
virtual DOFsPerNode give_DOFsPerNode_default(void) const
give default DOFs per node
Definition: cell.cpp:2149
virtual void print_row(FILE *stream, femFileFormat fff, bool endline=true, long did=0) const
*** PRINT ***
Definition: cell.h:554
void read_output_SIFEL(FILE *stream, long step, ResultTypesAtElem rt)
Definition: cell.cpp:3086
void set_edge(long i, const Edge *val)
Definition: cell.h:86
void del_points_down(long val)
Definition: cell.h:515
const Facedge * give_same_dimension_facedge(void) const
Returns edge/face/volume of same dimension as receiver (Beam returns edge, etc.)
Definition: cell.cpp:836
Triangle(long gid, long oid, const Geometry *mg, bool aa, long dom, long lid)
CONSTRUCTOR ord nn ne nf.
Definition: cell.h:810
virtual long give_face_nodes_edges(const Point **&facnodes, const Edge **&facedges) const
Definition: cell.h:551
void findout_segment_domain(Mesh *pm, GPA< const Node > &hnodes) const
Definition: cell.cpp:1438
void set_lid(long val)
Definition: cell.h:638
virtual void switch_myself_at_connectivity(Cell *master)
switch receiver to master in connectivity system
Definition: cell.cpp:217
*** *** *** *** CLASS COMPONENT *** *** *** ***
Definition: geomcomp.h:22
virtual long give_face_nodes_edges(const Point **&facnodes, const Edge **&facedges) const
Definition: cell.cpp:2679
virtual void print_row(FILE *stream, femFileFormat fff, bool endline=true, long did=0) const
print element row output for OOFEM
Definition: cell.cpp:1935
void initialize_CSL(int c, long *fID, long *tCSL)
initializes Constant Surface Load
IntPointSet give_IPset_rslts(Solver sol) const
basic set = for results
Definition: cell.cpp:1647
long give_nno(void) const
Definition: cell.h:89
bool is_point_on(const PoinT *point, const GeometryComponent *&comp, PoinT *nc) const
Function finds out mutual position of point with coords and 'element'.
Definition: cell.cpp:1028
void set_mprop(long val)
*** SET ***
Definition: cell.cpp:971
Beam(long gid, long oid, const Geometry *mg, bool aa, long dom, long lid)
CONSTRUCTOR ord nn ne nf.
Definition: cell.h:752
virtual long give_edge_nodes(const Point **&edgnodes) const
Definition: cell.cpp:3335
virtual classID give_classid() const
Returns classID - class identification.
Definition: cell.h:757
virtual DOFsPerNode give_DOFsPerNode_default(void) const
give default DOFs per node
Definition: cell.cpp:3619
virtual void compute_maxSigmaEq(void)
Definition: cell.h:697
void switch_myself_at_connectivity(Cell *master)
switch receiver to master in connectivity system
Definition: cell.cpp:619
virtual void print_row(FILE *stream, femFileFormat fff, bool endline=true, long did=0) const
*** PRINT ***
Definition: cell.h:487
bool isTruss(void) const
Definition: cell.h:439
virtual void checkConsistency(void) const
Checks data consistency.
Definition: cell.cpp:3277
void set_result(long s, double *rslt, long step, ResultTypesAtElem rt)
Definition: cell.cpp:1709
int masterel_dim
MASTER ELEMENT.
Definition: cell.h:160
double give_circum(void) const
Definition: compgeom.h:63
*** *** *** *** CLASS ComponentGeometry *** *** *** ***
Definition: compgeom.h:22
bool switch_face_pointer(Face *slave, Face *master)
switch pointer to component face - slave is replaced be master
Definition: cell.cpp:152
long * surfprop
Definition: cell.h:929
Cell * duplmaster
Definition: cell.h:59
virtual ~Beam()
DESTRUCTOR.
Definition: cell.h:754
double give_lav(void) const
Definition: cell.h:35
bool is_first_diag_short(void)
if the first diagonal is shorter then the second
Definition: cell.cpp:3359
virtual void integrate_duplicated_cell(const Facedge *slave)
DUPLICITY.
Definition: cell.cpp:382
virtual double give_ssstate(Dvctr *data, SStype SST, RVType rvtype, char type, long step, const Node *node=NULL)=0
give stress-strain state
virtual long give_edge_nodes(const Point **&edgnodes) const
return type of element for OOFEM solver
Definition: cell.cpp:3647
virtual DOFsPerNode give_DOFsPerNode_default(void) const =0
Returns edge/face/volume of same dimension as receiver (Beam returns edge, etc.)
double give_characteristic_size(void) const
Definition: cell.h:38
virtual SStype give_SSType_default(void) const
give default type of stress state
Definition: cell.cpp:2159
long give_parent_id(void) const
Definition: cell.h:656
virtual void initialize(void)
initiate/sets data
Definition: cell.h:762
RVType
Result variable type.
Definition: alias.h:194
void setup_maxSigmaEq(void)
Definition: cell.cpp:1719
const CrossSection * give_cs(void) const
Definition: attribute.h:845
virtual SStype give_SSType_default(void) const =0
give default type of stress state
void read_nodes(const char *&str, femFileFormat fff)
print element row output for VTK
Definition: cell.cpp:2027
virtual SStype give_SSType_default(void) const
give default type of stress state
Definition: cell.cpp:3628
virtual long give_face_nodes_edges(const Point **&facnodes, const Edge **&facedges) const
Definition: cell.h:103
virtual long give_edge_nodes(const Point **&edgnodes) const
return type of element for OOFEM solver
Definition: cell.cpp:2189
FElement(classID mecg, long gid, long oid, const Geometry *mg, long ord, long nn, long ne, long nf, bool aa, long dom, long lid)
CONSTRUCTOR.
Definition: cell.cpp:1544
Brick(long gid, long oid, const Geometry *mg, bool aa, long dom, long lid)
CONSTRUCTOR ord nn ne nf.
Definition: cell.h:985
long give_mpropertyORzero(void) const
Definition: geomcomp.h:132
classID
Type introduced to distinguish between classes.
Definition: alias.h:142
int IntPointSet_give_number_ips(IntPointSet ips)
give number of int. points
Definition: alias.h:1316
virtual void integrate_duplicated_cell(const Cell *slave)
Definition: cell.cpp:118
Array *** results
2d array of pointers to Array (Xvctr or Xmtrx)
Definition: cell.h:670
virtual void integrate_duplicated_cell(const Edge *slave)
DUPLICITY.
Definition: cell.cpp:453
void set_regid(long val)
Definition: cell.h:677
virtual SStype give_SSType_default(void) const
give default type of stress state
Definition: cell.cpp:3308
VTKPDtopology
VTK type of cell topology for POLYDATA.
Definition: alias.h:931
virtual void set_model_prop(long val, const Model *model, bool flag=false)
flag==1 master is element, flag==0 master is facedge
Definition: cell.cpp:424
const Point * give_Pjnt(long i) const
Definition: geometry.h:68
const Node * give_node(long i) const
Definition: cell.h:652
bool isBeam(void) const
Definition: cell.h:437
double give_CSusage_elast(void)
Definition: cell.cpp:1737
int give_rslt_NIP(Solver sol) const
Definition: cell.h:631
virtual classID give_classid() const
Returns classID - class identification.
Definition: cell.h:339
bool invisible_duplicated(char flag='a')
make invisible if duplicated
Definition: cell.cpp:192
long give_lid(void) const
Definition: cell.h:643
assignment of attributes to element
Definition: attribute.h:707
void attributes_allocation(const GelemAttribs *masterat)
Definition: cell.cpp:1578
Gelement(classID mecg, long gid, long oid, const Geometry *mg, long nn, long ne, long nf)
CONSTRUCTOR.
Definition: cell.cpp:1114
virtual void initialize(void)
initiate/sets data
Definition: cell.cpp:1588
virtual long give_face_nodes_edges(const Point **&facnodes, const Edge **&facedges) const
Definition: cell.cpp:3583
Line(long gid, long oid, const Geometry *mg)
CONSTRUCTOR.
Definition: cell.h:540
Dmtrx * rotMg2l
Definition: cell.h:868
void assign_fixed_entities_by_ID(bool node, long ncn, const long *icn)
Definition: cell.cpp:1151
virtual long give_edge_nodes(const Point **&edgnodes) const
Definition: cell.h:411
void setadd_superelem(const Element *comp, bool uniquecheck)
Returns classID - class identification.
Definition: cell.h:181
void set_fullhinge_at(int point)
Definition: attribute.cpp:1321
virtual ~Line()
DESTRUCTOR.
Definition: cell.h:542
void set_elemSize(double val)
Definition: cell.cpp:1128
long give_numsuperelem(void) const
Definition: cell.h:187