MIDAS  0.75
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros
substructs.cpp
Go to the documentation of this file.
1 #include "substructs.h"
2 
3 #include "cell.h"
4 
5 
6 namespace midaspace {
7 
8 // ********************************************************************************************
9 // *** *** *** *** CLASS DOFatt_cond *** *** *** ***
10 // ********************************************************************************************
11 
14 {
16  att = new int[ndofs];
17  memset(att, 0, ndofs*sizeof(int));
18  mask = NULL;
19 }
22 {
23  if (att == NULL) errol;
24 
25  switch (((Element*)GC)->give_elemAttribs()->give_dpn()) {
26  case DPN_DxyzRxyz:
27  att[0] = att[1] = att[2] = 0;
28  att[3] = att[4] = att[5] = 1;
29  if (noXrot) att[3] = 0;
30  break;
31  default: errol;
32  }
33 }
36 {
37  if (att == NULL) errol;
38 
39  switch (((Element*)GC)->give_elemAttribs()->give_dpn()) {
40  case DPN_DxyzRxyz:
41  if (att[0] + att[1] + att[2] == 0 &&
42  att[3] + att[4] + att[5] == 3)
43  return true;
44  break;
45  default: errol;
46  }
47 
48  return false;
49 }
50 
51 } // namespace midaspace
void set_full_hinge(bool noXrot)
Sets all rotation DOFs to be condensed.
Definition: substructs.cpp:21
int DOFsPerNode2nDOFs(DOFsPerNode od)
Definition: alias.h:755
DOFsPerNode give_dpn(void) const
Definition: attribute.h:837
bool is_full_hinge(void) const
Returns true if all rotation DOFs are condensed.
Definition: substructs.cpp:35
#define errol
Definition: gelib.h:142
Classes Cell, Facedge, Edge, Face, Element, Gelement, PolyLine, Line, PolygonMdl, FElement...
int * mask
Mask array is "ndofs" long.
Definition: substructs.h:40
PointDOFsCondense(long gid, const Element *owner)
CONSTRUCTOR.
Definition: substructs.cpp:13
Base class for management of DOF (Degrees Of Freedom) attributes at a node.
Definition: substructs.h:32
ElemAttribs * give_elemAttribs(void)
Definition: cell.h:402
*** *** *** *** CLASS COMPONENT *** *** *** ***
Definition: geomcomp.h:22
int * att
Attribute array is "ndofs" long.
Definition: substructs.h:38
int ndofs
Number of DOFs at a node.
Definition: substructs.h:36
const GeometryComponent * GC
Pointer to owner == parent geometry component.
Definition: subject.h:85
Classes PointDOFsAttributes, PointDOFsBCPM, PointDOFsRANHN and PointDOFsCondense. ...