34 Cell :: Cell (
classID mecg,
long gid,
long oid,
long prop,
const Geometry *mg,
long nn,
long ne,
long nf) :
GeometryComponent (mg, gid, oid, prop)
38 if (ne)
edges. resizeup(ne);
39 if (nf)
faces. resizeup(nf);
80 if ( dynamic_cast<FElement *>(
this) == NULL )
_errorr (
"Error");
86 for (i=0; i<
edges[0]->give_numsuperelem(); i++) {
88 if (master ==
this)
continue;
96 if (i ==
edges[0]->give_numsuperelem())
107 ((
Cell*)
this)->assure_duplicity_master();
122 if (!
points.has_same_members_as(slave->
points))
_errorr (
"Duplicity slave and master differ in list of nodes");
126 for (i=0; i<
edges(); i++)
128 (slave->
edges[i]->last_duplicity_master() ? slave->
edges[i]->last_duplicity_master() : slave->
edges[i]) )
129 _errorr (
"Duplicity slave and master differ in list of edges");
132 for (i=0; i<
faces(); i++)
134 (slave->
faces[i]->last_duplicity_master() ? slave->
faces[i]->last_duplicity_master() : slave->
faces[i]) )
135 _errorr (
"Duplicity slave and master differ in list of faces");
142 if (
points.replace_member_by (slave, master))
149 return edges.replace_member_by (slave, master);
154 return faces.replace_member_by (slave, master);
161 if ( newmaster == ((
Cell*)-1) ) {
177 if ( newmaster == oldmaster )
return;
179 if (oldmaster == NULL) {
194 if (flag !=
'a' && flag !=
'c' && flag !=
'r')
_errorr(
"forbidden flag");
203 if (flag ==
'r')
return false;
208 if (flag ==
'c')
return false;
233 if (
this == slave)
return false;
254 for (i=0; i<
points(); i++) {
255 for (j=0; j<cunn; j++)
256 if (points[i] == unnod[j])
break;
258 if (j==cunn && points[i]->give_coords()->give_ksiAtAbscissa(
ZERO, this->
give_circum(), a1, a2, ksi)) {
284 double ksi[2],eta[2],t[2];
287 for (i=0; i<
faces(); i++) {
288 for (j=0; j<cunf; j++)
if (faces[i] == unfac[j])
break;
289 if (j!=cunf)
continue;
292 faces[i]->
points[0]->give_coords(),faces[i]->
points[1]->give_coords(),
293 faces[i]->
points[2]->give_coords(),faces[i]->
points[3]->give_coords(),
294 a1,a2,ksi,eta,t,&i1,&i2);
297 _errorr(
"Something is wrong in function cross_abscissa_face");
299 if ( fabs(ksi[0])<(1.0+
ZERO) && fabs(eta[0])<(1.0+
ZERO) && fabs(t[0])<(1.0+
ZERO) ){
309 if ( fabs(ksi[1])<(1.0+
ZERO) && fabs(eta[1])<(1.0+
ZERO) && fabs(t[1])<(1.0+
ZERO) ){
322 if (i==
faces())
return 0;
324 const Face *fac = faces[i];
329 const Point *t1, *t2;
402 for (i=0; i<points(); i++) const_cast<Point*>(
points[i])->setadd_superedge(
this, re);
411 for (i=0; i<points(); i++) const_cast<Point*>(
points[i])->remove_superedge(
this);
426 const Edge *mdl_master_edge;
441 val = mdl_master_edge->
give_ID()+1;
444 mdl_master_edge = model->
give_Edge(val-1);
493 if (superfaces[i]->
give_ned() == ne)
494 if ( superfaces[i]->
give_edges()->has_these_members(ne, edgs) )
495 return superfaces[i];
524 fprintf (stream,
"curve %3ld vertex ", this->
give_ID()+1);
535 if (master && master->
isTruss()) {
539 if (size > 0.0) fprintf (stream,
" size %lf", size);
540 else fprintf (stream,
" count %d", (
int)-size);
547 if (gatt->
give_virtual()) fprintf (stream,
" output no");
548 else fprintf (stream,
" output yes");
556 if (endline) fprintf (stream,
"\n");
604 for (i=0; i<points(); i++) const_cast<Point*>(
points[i])->setadd_superface(
this, re);
605 for (i=0; i<edges(); i++) const_cast<Edge*> (
edges[i]) ->setadd_superface(
this, re);
614 for (i=0; i<points(); i++) const_cast<Point*>(
points[i])->remove_superface(
this);
615 for (i=0; i<edges(); i++) const_cast<Edge*> (
edges[i]) ->remove_superface(
this);
629 const Face *mdl_master_face;
644 val = mdl_master_face->
give_ID()+1;
647 mdl_master_face = model->
give_Face(val-1);
671 if (t1==edges[0]) { nc->z=nc->y; nc->y= nc->x;
if (t2==edges[1]) nc->x=-nc->z;
672 else if (t2==edges[3]) nc->x= nc->z;
674 else if (t1==edges[1]) { nc->x=-nc->x;
if (t2==edges[2]) nc->y=-nc->y;
675 else if (t2!=edges[0]) exit (4); }
676 else if (t1==edges[2]) { nc->z=nc->y; nc->y=-nc->x;
if (t2==edges[3]) nc->x= nc->z;
677 else if (t2==edges[1]) nc->x=-nc->z;
679 else if (t1==edges[3])
if (t2==edges[2]) nc->y=-nc->y;
680 else {
if (t2!=edges[0]) exit (6); }
706 const VectoR *norm = NULL;
716 fprintf (stream,
"patch %3ld", this->
give_ID()+1);
720 fprintf (stream,
" normal %21.14e %21.14e %21.14e", norm->
x, norm->
y, norm->
z);
726 fprintf (stream,
" boundary curve ");
728 for (i=0; i<
edges()-1; i++) {
732 fprintf (stream,
" %3ld", frwd*(
edges[i]->
give_ID()+1));
737 fprintf (stream,
" %3ld", frwd*(
edges[i]->
give_ID()+1));
747 if (gatt->
give_virtual()) fprintf (stream,
" output no");
748 else fprintf (stream,
" output yes");
755 fprintf (stream,
" fixed vertex");
756 for (i=0; i<fixvers[0](); i++)
757 fprintf (stream,
" %ld", fixvers[0][i]->
give_ID()+1);
761 fprintf (stream,
" fixed curve");
762 for (i=0; i<fixgelems[0](); i++)
763 fprintf (stream,
" %ld", fixgelems[0][i]->give_same_dimension_facedge()->give_ID()+1);
769 fprintf (stream,
" quad map yes equidistant");
781 if (endline) fprintf (stream,
"\n");
820 default:
_errorr (
"element is not polydata unsuported VTK cell type");
859 for (
int i=0; i<
points(); i++)
860 const_cast<Point*>(points[i])->setadd_superelem(
this, re);
865 const Point **subnodes = NULL;
866 const Edge **subedges = NULL;
874 all_exist_subs =
true;
876 for (i=0; i<
edges(); i++) {
881 if (!edges[i]->
give_points()->has_these_members(nned, subnodes+nned*i) )
errol;
882 edg = (
Edge*)edges[i];
886 edg = (
Edge*) subnodes[nned*i]->give_superedge (nned, subnodes+nned*i);
888 edg =
new Edge(nned, subnodes+nned*i);
890 all_exist_subs =
false;
902 delete [] subnodes; subnodes = NULL;
907 all_exist_subs =
true;
909 for (i=0; i<
faces(); i++) {
914 if (!faces[i]->
give_edges()->has_these_members(nnfa, subedges+nnfa*i) )
errol;
915 fac = (
Face*)faces[i];
919 fac = (
Face*) subedges[nnfa*i]->give_superface (nnfa, subedges+nnfa*i);
921 fac =
new Face(nnfa, nnfa, subnodes+nnfa*i, subedges+nnfa*i);
923 all_exist_subs =
false;
945 for (i=0; i<points(); i++) const_cast<Point*>(
points[i])->remove_superelem (
this);
946 for (i=0; i<edges(); i++) const_cast<Edge*> (
edges[i]) ->remove_superelem (
this);
947 for (i=0; i<faces(); i++) const_cast<Face*> (
faces[i]) ->remove_superelem (
this);
965 default:
_errorr(
"unsupported bc type");
983 for (i=0; i<
points(); i++)
984 if (everynode || points[i]->give_numsuperelem() == 1)
1014 if (
duplmaster ==
this || !duplcheck)
return;
1037 for (i=0; i<
points(); i++)
1038 if ( points[i]->is_identical_to (this->
give_circum(), point) ) {
1044 for (i=0; i<
edges(); i++)
1045 if (edges[i]->is_nod_on (this->
give_circum(), point, nc->
x)) {
1051 const Face *fac=NULL;
1052 const Edge *t1, *t2; t1 = t2 = NULL;
1056 double x[8],y[8],z[8];
1063 if ( fabs(nc->
x-1.0) <
ZERO ) { fac=
faces[4]; nc->
x=nc->
y; nc->
y=nc->
z; t1=edges[10]; t2=edges[ 2]; }
1064 else if ( fabs(nc->
x+1.0) <
ZERO ) { fac=
faces[2]; nc->
x=nc->
y; nc->
y=nc->
z; t1=edges[ 9]; t2=edges[ 0]; }
1065 else if ( fabs(nc->
y-1.0) <
ZERO ) { fac=
faces[3]; nc->
y=nc->
z; t1=edges[10]; t2=edges[ 1]; }
1066 else if ( fabs(nc->
y+1.0) <
ZERO ) { fac=
faces[5]; nc->
y=nc->
z; t1=edges[11]; t2=edges[ 3]; }
1067 else if ( fabs(nc->
z-1.0) <
ZERO ) { fac=
faces[0]; t1=edges[ 2]; t2=edges[ 1]; }
1068 else if ( fabs(nc->
z+1.0) <
ZERO ) { fac=
faces[1]; t1=edges[ 6]; t2=edges[ 5]; }
1084 default:
_errorr(
"Unknown element type is required in function is_point_on_el");
1094 fprintf (stream,
"%ld",
points());
1095 for (
int i=0; i<
points(); i++)
1096 fprintf (stream,
" %ld", ((
Node*)points[i])->give_lid_id(0));
1098 fprintf (stream,
"\n");
1104 for (
int i=0; i<
points(); i++)
1105 sprintf (strchr(str,
'\0'),
" %ld", ((
Node*)points[i])->give_lid_id(0));
1114 Gelement :: Gelement (
classID mecg,
long gid,
long oid,
const Geometry *mg,
long nn,
long ne,
long nf) :
Element (mecg, gid, oid, 0, mg, nn, ne, nf)
1131 if (this->
give_nfa() != 1)
_errorr(
"elemSize at element with more than 1 face");
1133 ((
Face*)this->
give_face(0))->give_facedgeAttribs()->set_elemSize(val);
1136 if (this->
give_ned() != 1)
_errorr(
"elemSize at element with more than 1 edge");
1138 ((
Edge*)this->
give_edge(0))->give_facedgeAttribs()->set_elemSize(val);
1145 if (this->
give_ned() != 1)
_errorr(
"elemCount at element with more than 1 edge");
1147 ((
Edge*)this->
give_edge(0))->give_facedgeAttribs()->set_elemCount(val);
1176 _errorr2(
"Rotation DOFs condensed at both ends of Polyline - forbidden kinematic mechanism at elemnet %ld.",
ID+1);
1185 const Node* node =
dynamic_cast<const Node *
> (comp);
1191 const Cell* cell =
dynamic_cast<const Cell *
> (comp);
if (!cell)
errol;
1217 ((
Mesh*)pm)->add_another_Pjnt ((
Point*)hn);
1237 else if (stpid ==
points()-1) {
1238 ((
PolyLine*)
this)->points.reverse();
1261 if (stpid == 0) stpid =
points()-1;
1263 else if (stpid ==
points()-1) stpid = 1;
1265 else if (stpid ==
points()-2) {
_warningg2(
"Entire polygon (id %ld) lies outside of primary mesh", this->
give_ID()); }
1271 _errorr2 (
"Start point of RF bar %ld doesn't lay inside of domain", this->
give_ID());
1277 this->
divide(pm, hnodes);
1283 for (i=0; i<hnodes(); i++) {
1302 long i,j,tc,konec,clastelem;
1303 long csuperel=0,cunwnod=0,cunwfac=0;
1305 const PoinT *curvert;
1306 const Node *nod, *curnod;
1307 const Point *auxnod, **unwnod=NULL;
1310 const Face *face, **unwfac=NULL;
1312 const Element *elem, **superel=NULL, **lastelem;
1318 for (i=1; i<
points(); i++) {
1319 curvert = points[i]->give_coords();
1326 curnod = hnodes.
last();
1327 curhnod =
dynamic_cast<const HangingNode *
> (curnod);
1339 cunwnod = 1; unwnod = (
const Point**)&nod;
1348 else { cunwnod = 0; unwnod = NULL; }
1354 cunwfac = 1; unwfac = &face;
1356 else { cunwnod = 0; unwnod = NULL; }
1361 csuperel = 1; superel = (
const Element**)&elem;
1362 cunwnod = 0; unwnod = NULL;
1363 cunwfac = 0; unwfac = NULL;
1365 default:
_errorr (
"Unknown dimension of master node");
1369 for (j=0; j<csuperel; j++){
1375 this->
init_point_on (pm, hnodes, curvert, comp, &nc, points[i]);
1388 tc = ((
FElement*)superel[j])->cross_abscissa_face (curnod->
give_coords(), curvert, cunwfac, unwfac, compid, &nc, &ip);
1390 if (tc==1 || tc==2) { this->
init_point_on (pm, hnodes, &ip, compid, &nc, NULL);
break; }
1398 if (dimMC==2 && csuperel==1 && superel[0]->
give_dimension()==3) {
1413 _errorr (
"Something is wrong in function polyline_dividing");
1417 clastelem = csuperel;
1443 for (i=1; i<hnodes(); i++) {
1447 if (!hnodes[i-1]->is_shared()) dom = hnodes[i-1]->give_domain();
1448 else if (!hnodes[i ]->is_shared()) dom = hnodes[i ]->give_domain();
1451 if (hnodes[i-1]->give_lid(j)>=0 && hnodes[i ]->give_lid(j)>=0)
1458 elem =
new Beam (-1, -1, pm,
this, dom, -1);
1492 edgnodes =
new const Point*[2];
1517 for (i=0; i<
edges()-1; i++) {
1518 edgnodes[2*i ] =
points[i ];
1519 edgnodes[2*i+1] =
points[i+1];
1521 edgnodes[2*i ] =
points[i];
1522 edgnodes[2*i+1] =
points[0];
1531 for (
int i=0; i<
points(); i++) {
1532 facnodes[i] = points[i];
1533 facedges[i] =
edges[i];
1544 FElement :: FElement (
classID mecg,
long gid,
long oid,
const Geometry *mg,
long o,
long nn,
long ne,
long nf,
bool aa,
long dom,
long lid) :
Element (mecg, gid, oid, 0, mg, nn, ne, nf)
1599 _errorr(
"odkomentuj nasledujici");
1638 if (IPset !=
IPS_Void)
return IPset;
1672 if (! fets1.
is_equal_to(fets2))
_errorr (
"Duplicity slave and master differ in rot atribut");
1675 if (!slv)
_errorr (
"The slave is not same type as this");
1749 for (
int i=0; i<nl; i++)
1767 double val, max = 0.0;
1769 for (
int i=0; i<nl; i++) {
1782 return ( answer > 0.0 ? answer > 1.0 : -1 );
1796 default:
_errorr2(
"unsupported SST_* %d", SST);
1807 if (
results[time_step][rte] == NULL)
return 0;
1810 if (mtrx == NULL)
errol;
1820 long parentdim, auxl, prop;
1832 if (model && prop<1)
errol;
1848 case CG_Line:
if (model) ((
Edge*)
edges[0])->set_model_prop (prop, model,
true);
break;
1853 for (
int i, e=0; e<
edges(); e++) {
1857 if (model) ((
Edge*)edges[i])->set_model_prop (prop, model,
false);
1858 else ((
Edge*)edges[i])->checkset_mprop(prop);
1867 for (
int i, e=0; e<
faces(); e++) {
1871 if (model) ((
Face*)faces[i])->set_model_prop (prop, model,
false);
1872 else ((
Face*)faces[i])->checkset_mprop(prop);
1912 for (e=0; e<
edges(); e++) {
1915 if (prop) ((
Edge*)edges[i])->checkset_mprop(prop);
1920 for (e=0; e<
faces(); e++) {
1923 if (prop) ((
Face*)faces[i])->checkset_mprop(prop);
1929 default:
_errorr(
"unsupported fem file format");
1949 else fprintf (stream,
" %4ld nodes %ld ",
ID+1,
points());
1951 for (e=0; e<
points(); e++) {
1953 fprintf (stream,
"%4ld ", ((
Node*)points[i])->give_lid_id(
domain)+1);
1961 fprintf (stream,
"%6ld", this->
ID+1);
1966 for (e=0; e<
points(); e++) {
1968 fprintf (stream,
" %6ld", points[i]->
give_ID()+1);
1981 fprintf (stream,
"E");
1982 for (e=0; e<
points(); e++) {
1984 fprintf (stream,
",%6ld", points[i]->
give_ID()+1);
1987 fprintf (stream,
"\n");
1993 if (!m) fprintf (stream,
"%8ld", this->
ID+1);
1994 else fprintf (stream,
"%ld", this->
ID+1);
1996 if (!m) fprintf (stream,
" ");
1998 for (e=0; e<
points(); e++) {
2000 if (!m) fprintf (stream,
"%7ld", points[i]->
give_ID()+1);
2001 else fprintf (stream,
" %ld", points[i]->
give_ID()+1);
2007 if (!m) {
if (
edges()) fprintf (stream,
" "); }
2008 for (e=0; e<
edges(); e++) {
2012 if (!m) {
if (
faces()) fprintf (stream,
" "); }
2013 for (e=0; e<
faces(); e++) {
2023 if (endline) fprintf (stream,
"\n");
2031 for (e=0; e<
points(); e++) {
2101 if (old) sprintf (GP,
"%d", i);
2102 else sprintf (GP,
"1.%d", i);
2111 if (old) sprintf (GP,
"%d", i);
2112 else sprintf (GP,
"1.%d", i);
2133 _errorr2(
"Rotation DOFs condensed at both ends of Beam - forbidden kinematic mechanism at elemnet %ld.",
ID+1);
2192 edgnodes =
new const Point*[2];
2217 if (NIP != 1)
errol;
2228 vald =
new double[6];
2231 fgets (LINE, 1023, stream); str=LINE;
2235 fgets (LINE, 1023, stream); str=LINE;
2239 if (!
isZero(1e-10, vald[1]+vald[2]+vald[3]+vald[4]+vald[5]))
_errorr (
"Invalid structure of OOFEM output file");
2240 (*strain)(0,0) = vald[0];
2243 fgets (LINE, 1023, stream); str=LINE;
2246 if (!
isZero(1e-10, vald[1]+vald[2]+vald[3]+vald[4]+vald[5]))
_errorr (
"Invalid structure of OOFEM output file");
2247 (*stress)(0,0) = vald[0];
2257 fgets (LINE, 1023, stream); str=LINE;
2262 fgets (LINE, 1023, stream); str=LINE;
2266 if (!
isZero(1e-10, vald[1]+vald[2]+vald[3]+vald[9]+vald[10]+vald[11]))
_errorr (
"Invalid structure of OOFEM output file");
2267 vald[ 9] = l * vald[6];
2268 vald[10] = l * vald[7];
2269 vald[11] = l * vald[8];
2270 vald[ 6] = l * vald[0];
2271 vald[ 7] = l * vald[5];
2272 vald[ 8] = l * vald[4];
2273 vald[0] = vald[4] = vald[5] = 0.0;
2275 vald[7] = vald[7] + 0.5 * l * vald[11];
2276 vald[8] = vald[8] - 0.5 * l * vald[10];
2280 fgets (LINE, 1023, stream); str=LINE;
2283 if (!
isZero(1e-10, vald[1]+vald[2]+vald[3]+vald[9]+vald[10]+vald[11]))
_errorr (
"Invalid structure of OOFEM output file");
2286 vald[3] = vald[ 9] = vald[6];
2287 vald[4] = vald[10] = vald[7];
2288 vald[5] = vald[11] = vald[8];
2299 fgets (LINE, 1023, stream); str=LINE;
2324 for (
int i=0; i<6; i++) vald[i] *= -1;
2329 default:
_errorr(
"unsupported type of beam element");
2339 char LINE[1023], msg[60];
2341 sprintf (msg,
"Invalid structure of SIFEL output file, element %ld",
origid+1);
2346 if (NIP != 1)
errol;
2350 fgets (LINE, 1023, stream); str=LINE;
2358 if (ip2-ip1+1 != NIPa)
_errorr(msg);
2367 for (
int i=0; i<NIP; i++) {
2368 fgets (LINE, 1023, stream); str=LINE;
2371 for (j=0; j<nstrcomp; j++) {
2406 const Dmtrx *s=NULL;
2412 if (rvtype==
RVTstrn)
for (
int i=0; i<6; i++) data[0][i+3] = s[0](0,i+6) - s[0](0,i) ;
2413 else for (
int i=0; i<6; i++) data[0][i+3] = ( s[0](0,i+6) + s[0](0,i) ) / 2.0;
2415 data[0][0] = data[0][3];
2416 data[0][1] = sqrt( data[0][4] * data[0][4] + data[0][5] * data[0][5] );
2417 data[0][2] = sqrt( data[0][7] * data[0][7] + data[0][8] * data[0][8] );
2475 return 0.5 * sqrt ( 2.0 * ( (s.
x-s.
y)*(s.
x-s.
y) +
2476 (s.
y-s.
z)*(s.
y-s.
z) +
2477 (s.
z-s.
x)*(s.
z-s.
x) +
2478 6.0 * (t.
x*t.
x + t.
y*t.
y + t.
z*t.
z)));
2485 double answer = 0.0;
2491 if (answer < 0) answer *= -1;
2495 double A, y, z, Iy, Iz;
2503 double N, Vy, Vz, Mx, My, Mz, val;
2506 for (
int i=0; i<2; i++) {
2518 s.
x = N + My + Mz; t.
y = 0; t.
z = 0; val =
SigmaEq(s, t);
if (answer < val) answer = val;
2519 s.
x = N + My ; t.
y = 0; t.
z = Vy; val =
SigmaEq(s, t);
if (answer < val) answer = val;
2520 s.
x = N + Mz; t.
y = Vz; t.
z = 0; val =
SigmaEq(s, t);
if (answer < val) answer = val;
2521 s.
x = N ; t.
y = Vz; t.
z = Vy; val =
SigmaEq(s, t);
if (answer < val) answer = val;
2544 int i,j, n=0, ndofs=0;
2545 if ((*con)[0]) ndofs = (*con)[0]->give_ndofs();
2546 else if ((*con)[1]) ndofs = (*con)[1]->give_ndofs();
2549 for (i=0; i<2; i++) {
if (!(*con)[i])
continue;
for (j=0; j<ndofs; j++)
if ((*con)[i]->give_att(j)) n++; }
2550 fprintf (stream,
" dofsToCondense %d", n);
2551 for (i=0; i<2; i++) {
if (!(*con)[i])
continue;
for (j=0; j<ndofs; j++)
if ((*con)[i]->give_att(j)) fprintf (stream,
" %d", i*ndofs+j+1); }
2557 if (endline) fprintf (stream,
"\n");
2567 FElement (
classComponentGeometry2Dtriangle, src->give_ID(), src->give_origID(), src->give_Geom(),1 ,3 ,3 ,1 , true, src->give_domain(), src->give_ID())
2570 if (
Msh()->connectivity_is_assembled())
errol;
2579 points.assign(0, (*nds)[0]);
2580 points.assign(1, (*nds)[1]);
2581 if (firstdiag)
points.assign(2, (*nds)[2]);
2582 else points.assign(2, (*nds)[3]);
2585 points.assign(0, (*nds)[2]);
2586 points.assign(1, (*nds)[3]);
2587 if (firstdiag)
points.assign(2, (*nds)[0]);
2588 else points.assign(2, (*nds)[1]);
2671 edgnodes =
new const Point*[6];
2682 facnodes =
new const Point* [3];
2683 facedges =
new const Edge* [3];
2686 facedges[0] =
edges[0]; facedges[ 1] =
edges[1]; facedges[ 2] =
edges[2];
2706 return 6.9282032302755088 * this->
give_lav() / ( l1*l1 + l2*l2 + l3*l3 );
2746 double a = 0.5 * atan ( 2*data[0][5] / (data[0][1] - data[0][0]) );
2748 if (fabs(a) > 1.e-6)
2751 if (data[0][0] < data[0][1])
2762 coords.
x = l[0] *
points[0]->give_coord(0) + l[1] *
points[1]->give_coord(0) + l[2] *
points[2]->give_coord(0);
2763 coords.
y = l[0] *
points[0]->give_coord(1) + l[1] *
points[1]->give_coord(1) + l[2] *
points[2]->give_coord(1);
2764 coords.
z = l[0] *
points[0]->give_coord(2) + l[1] *
points[1]->give_coord(2) + l[2] *
points[2]->give_coord(2);
2811 if (!rer && (ver == 20 || (ver >= 22 && NIP == 1))) {
2812 if (NIP != 1)
errol;
2819 strain-> resize_ignore_vals(NIP, 12);
2820 stress-> resize_ignore_vals(NIP, 12);
2825 fgets (LINE, 1023, stream); str=LINE;
2835 for (i=6; i<12; i++)
2836 if (2 < i%6 && i%6 < 6) (*strain)(0,i) /= 2.0;
2841 for (i=6; i<12; i++)
2842 if (2 < i%6 && i%6 < 6) (*strain_loc)(0,i) /= 2.0;
2893 l = vald.give_lenght();
2894 auxd = fabs(vald[2]);
2895 if (l > 2e-8 && !
isZero(l*1e-8, auxd))
2896 _errorr3 (
"Invalid structure of OOFEM output file, l = %e, auxd = 0 = %e", l, auxd);
2899 for (
int i=0; i<6; i++)
2900 if (vald[i] > 0.0 && fabs(vald[i] - (*stress_loc)(0,i)) > 2e-10 && !
isZero(l*1.e-8, fabs((*stress_loc)(0,i))*1e-4, vald[i] - (*stress_loc)(0,i)))
2901 _errorr4 (
"Invalid structure of OOFEM output file, l = %e, %e - %e ", l, (*stress_loc)(0,i), auxd);
2906 l = vald.give_lenght();
2907 auxd = fabs(vald[2]) + fabs(vald[3]) + fabs(vald[4]);
2908 if (l > 2e-8 && auxd > 1e-09 && !
isZero(l*1e-8*3, auxd))
2909 _errorr3 (
"Invalid structure of OOFEM output file, l = %e, auxd = 0 = %e", l, auxd);
2910 vald[2] = vald[3] = vald[4] = 0.0;
2912 for (
int i=0; i<6; i++)
2913 if (vald[i] > 0.0 && fabs(vald[i] - (*stress_loc)(0,i+6)) > 2e-10 && !
isZero(l*1.e-8, fabs((*stress_loc)(0,i+6))*1e-4, vald[i] - (*stress_loc)(0,i+6)))
2914 _errorr4 (
"Invalid structure of OOFEM output file, l = %e, %e - %e ", l, (*stress_loc)(0,i+6), auxd);
2936 fgets (LINE, 1023, stream); str=LINE;
2939 for (
int i=0; i<NIP; i++) {
2943 fgets (LINE, 1023, stream); str=LINE;
2948 for (
int j=0; j<12; j++)
2949 if (2 < j%6 && j%6 < 6) (*strain)(ipid,j) /= 2.0;
2952 fgets (LINE, 1023, stream); str=LINE;
2960 for (
int j=0; j<nl; j++) {
2961 fgets (LINE, 1023, stream); str=LINE;
2966 fgets (LINE, 1023, stream); str=LINE;
2986 fgets (LINE, 1023, stream); str=LINE;
2989 for (
int i=0; i<NIP; i++) {
2993 fgets (LINE, 1023, stream); str=LINE;
2998 if (!
isZero(1e-10, vald[2]+vald[3]+vald[4]))
_errorr (
"Invalid structure of OOFEM output file");
3000 (*strain)(ipid,0) = vald[0];
3001 (*strain)(ipid,1) = vald[1];
3002 (*strain)(ipid,2) = vald[5] / 2.0;
3005 fgets (LINE, 1023, stream); str=LINE;
3009 if (!
isZero(1e-10, vald[2]+vald[3]+vald[4]))
_errorr (
"Invalid structure of OOFEM output file");
3011 (*stress)(ipid,0) = vald[0];
3012 (*stress)(ipid,1) = vald[1];
3013 (*stress)(ipid,2) = vald[5];
3035 if (NIP != 4)
errol;
3042 fgets (LINE, 1023, stream); str=LINE;
3045 for (
int i=0; i<NIP; i++) {
3049 fgets (LINE, 1023, stream); str=LINE;
3054 if (!
isZero(1e-10, vald[2]+vald[3]+vald[4]))
_errorr (
"Invalid structure of OOFEM output file");
3056 (*strain)(ipid,0) = vald[0];
3057 (*strain)(ipid,1) = vald[1];
3058 (*strain)(ipid,2) = vald[5] / 2.0;
3061 fgets (LINE, 1023, stream); str=LINE;
3065 if (!
isZero(1e-10, vald[2]+vald[3]+vald[4]))
_errorr (
"Invalid structure of OOFEM output file");
3067 (*stress)(ipid,0) = vald[0];
3068 (*stress)(ipid,1) = vald[1];
3069 (*stress)(ipid,2) = vald[5];
3079 default:
_errorr(
"unsupported type of triangle element");
3089 char LINE[1023], msg[60];
3091 sprintf (msg,
"Invalid structure of SIFEL output file, element %ld",
origid+1);
3096 if (NIP != 1)
errol;
3100 fgets (LINE, 1023, stream); str=LINE;
3108 if (ip2-ip1+1 != NIPa)
_errorr(msg);
3112 int dim, nmed, j, k;
3119 fgets (LINE, 1023, stream); str=LINE;
3122 for (j=0; j<nmed; j++)
3123 for (k=0; k<dim; k++) {
3124 if (rt ==
RTE_gradient) sprintf(r,
"grad_%d_%d=", j+1, k+1);
3125 else if (rt ==
RTE_fluxes) sprintf(r,
"flux_%d_%d=", j+1, k+1);
3192 double answer = 0.0;
3195 switch (this->
elemAttribs()->give_cs()->give_loctype_or_type()) {
3203 double nx, ny, vyz, vxz, vxy, mx, my, mxy, val;
3218 s.
x = nx + mx; t.
x = 0;
3219 s.
y = ny + my; t.
y = 0;
3220 s.
z = 0; t.
z = vxy + mxy;
3223 if (answer < val) answer = val;
3226 s.
x = nx - mx; t.
x = 0;
3227 s.
y = ny - my; t.
y = 0;
3228 s.
z = 0; t.
z = vxy - mxy;
3231 if (answer < val) answer = val;
3234 s.
x = nx; t.
x = vyz;
3235 s.
y = ny; t.
y = vxz;
3239 if (answer < val) answer = val;
3250 for (
int i=0; i<nl; i++) {
3338 edgnodes =
new const Point*[8];
3350 facnodes =
new const Point* [4];
3351 facedges =
new const Edge* [4];
3354 facedges[0] =
edges[0]; facedges[1] =
edges[1]; facedges[2] =
edges[2]; facedges[3] =
edges[3];
3361 double d1 =
points[0]->give_coords()->dist2_to(
points[2]->give_coords());
3362 double d2 =
points[1]->give_coords()->dist2_to(
points[3]->give_coords());
3363 if (d1 < d2)
return true;
3393 if (NIP != 4)
errol;
3408 fgets (LINE, 1023, stream); str=LINE;
3412 for (i=0; i<NIP; i++) {
3416 fgets (LINE, 1023, stream); str=LINE;
3421 if (!
isZero(1e-10, vald[2]+vald[3]+vald[4]))
_errorr (
"Invalid structure of OOFEM output file");
3423 (*strain)(ipid,0) = vald[0];
3424 (*strain)(ipid,1) = vald[1];
3425 (*strain)(ipid,2) = vald[5] / 2.0;
3428 fgets (LINE, 1023, stream); str=LINE;
3433 if (!
isZero(1e-10, vald[2]+vald[3]+vald[4]))
_errorr (
"Invalid structure of OOFEM output file");
3436 (*stress)(ipid,0) = vald[0];
3437 (*stress)(ipid,1) = vald[1];
3438 (*stress)(ipid,2) = vald[5];
3464 default:
_errorr(
"unsupported type of brick element");
3489 if (type !=
'g')
errol;
3504 l[0] = 0.25 * (1 + ncoords[0]) * (1 + ncoords[1]);
3505 l[1] = 0.25 * (1 - ncoords[0]) * (1 + ncoords[1]);
3506 l[2] = 0.25 * (1 - ncoords[0]) * (1 - ncoords[1]);
3507 l[3] = 0.25 * (1 + ncoords[0]) * (1 - ncoords[1]);
3509 coords.
x = l[0] *
points[0]->give_coord(0) + l[1] *
points[1]->give_coord(0) + l[2] *
points[2]->give_coord(0) + l[3] *
points[3]->give_coord(0);
3510 coords.
y = l[0] *
points[0]->give_coord(1) + l[1] *
points[1]->give_coord(1) + l[2] *
points[2]->give_coord(1) + l[3] *
points[3]->give_coord(1);
3559 sprintf (str,
" %ld %ld %ld %ld",
3570 edgnodes =
new const Point*[12];
3586 facnodes =
new const Point* [12];
3587 facedges =
new const Edge* [12];
3594 facedges[ 0] =
edges[0]; facedges[ 1] =
edges[1]; facedges[ 2] =
edges[2];
3595 facedges[ 3] =
edges[0]; facedges[ 4] =
edges[4]; facedges[ 5] =
edges[3];
3596 facedges[ 6] =
edges[1]; facedges[ 7] =
edges[5]; facedges[ 8] =
edges[4];
3597 facedges[ 9] =
edges[2]; facedges[10] =
edges[3]; facedges[11] =
edges[5];
3650 edgnodes =
new const Point*[24];
3672 facnodes =
new const Point* [24];
3673 facedges =
new const Edge* [24];
3682 facedges[ 0] =
edges[0]; facedges[ 1] =
edges[ 1]; facedges[ 2] =
edges[2]; facedges[ 3] =
edges[ 3];
3683 facedges[ 4] =
edges[4]; facedges[ 5] =
edges[ 5]; facedges[ 6] =
edges[6]; facedges[ 7] =
edges[ 7];
3684 facedges[ 8] =
edges[0]; facedges[ 9] =
edges[ 9]; facedges[10] =
edges[4]; facedges[11] =
edges[ 8];
3685 facedges[12] =
edges[1]; facedges[13] =
edges[10]; facedges[14] =
edges[5]; facedges[15] =
edges[ 9];
3686 facedges[16] =
edges[2]; facedges[17] =
edges[11]; facedges[18] =
edges[6]; facedges[19] =
edges[10];
3687 facedges[20] =
edges[3]; facedges[21] =
edges[ 8]; facedges[22] =
edges[7]; facedges[23] =
edges[11];
3702 if (NIP != 8)
errol;
3716 fgets (LINE, 1023, stream); str=LINE;
3720 for (i=0; i<NIP; i++) {
3724 fgets (LINE, 1023, stream); str=LINE;
3733 fgets (LINE, 1023, stream); str=LINE;
3739 default:
_errorr(
"unsupported type of brick element");
3750 char LINE[1023], msg[60];
3752 sprintf (msg,
"Invalid structure of SIFEL output file, element %ld",
origid+1);
3756 if (NIP != 8)
errol;
3760 fgets (LINE, 1023, stream); str=LINE;
3768 if (ip2-ip1+1 != NIPa)
_errorr(msg);
3777 for (
int i=0; i<NIP; i++) {
3781 fgets (LINE, 1023, stream); str=LINE;
3784 for (j=0; j<nstrcomp; j++) {
3823 if (!node)
return 0;
3826 _warningg (
"volume of brick is approximated");
3833 sprintf (str,
" %ld %ld %ld %ld %ld %ld %ld %ld",
const GPA< const Element > * give_superelems(void) const
const Face * give_Face(long i) const
bool has_same_geom_with(Cell *slave) const
ASSORTED check same geometry.
const GPA< const Gelement > * give_fixedGelements(void) const
void compute_rotMg2l(void)
activate rotMg2l
virtual SStype give_SSType_default(void) const
give default type of stress state
GPA< const Element > superelems
CONNECTIVITY - full connectivity initiated only when Geom->connectivity_is_assembled() == true...
void read_input(const char *&str, femFileFormat fff)
virtual SStype give_SSType_default(void) const
give default type of stress state
virtual double give_ssstate(Dvctr *data, SStype SST, RVType rvtype, char type, long step, const Node *node=NULL)
give stress-strain state
VTKPDtopology give_VTKPDtopology(void) const
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.
GPA< const Face > superfaces
CONNECTIVITY - full connectivity initiated only when Geom->connectivity_is_assembled() == true these ...
bool give_PDBO(ProbDescBoolOpt pdbo) const
const GPA< PointDOFsCondense > * give_conDOFs(void) const
IntPointSet IntPointSet_fet2e_rslts(IntPointSet IPset, FiniteElementType fet)
FET to IPS for results.
virtual void print_row(FILE *stream, femFileFormat fff, bool endline=true, long did=0) const
*** PRINT ***
virtual void switch_node_pointer(Point *slave, Point *master, bool duplcheck)
switch node pointer form slave to master
virtual void checkConsistency(void) const
Checks data consistency.
void read_output_OOFEM(FILE *stream, long step)
double dist2_to(const PoinT *p) const
virtual void compute_maxSigmaEq(void)
virtual void initialize(void)
initiate/sets data
void read_output_OOFEM(FILE *stream, long step)
PAGroup give_analgroup(void) const
const Array * give_results(long step, ResultTypesAtElem rt) const
PolyLine * generate_mesh_RFbyHN(Mesh *pm, GPA< const Node > &hnodes) const
virtual long give_edge_nodes(const Point **&edgnodes) const
virtual double give_ssstate(Dvctr *data, SStype SST, RVType rvtype, char type, long step, const Node *node=NULL)
give stress-strain state
long give_NumDomains(void) const
bool connectivity_assembled
virtual DOFsPerNode give_DOFsPerNode_default(void) const
give default DOFs per node
long give_domain(void) const
bool same_array_elements_asym(long nx, const ArgType *x, long ny, const ArgType *y, bool same_dim=false)
Function finds out whether every element of the array 'x' is in the array 'y'.
void transform_nc(const Point *t1, const Point *t2, double &ksi)
void add_another_Element(FElement *elem, long dom)
adds elem to the end of array Elements
void allocate_results(void)
RESULTS.
IntPointSet give_IPset_comp(Solver sol) const
basic set = for displacement computation
#define SP_scan_expected_word_exit(_1, _2, _3, _4)
const Edge * give_superedge(long i) const
virtual long give_edge_nodes(const Point **&edgnodes) const
const GPA< const Face > * give_superfaces(void) const
virtual void checkConsistency(void) const
Checks data consistency.
Cell(classID mecg, long gid, long oid, long prop, const Geometry *mg, long nn, long ne, long nf)
CONSTRUCTOR.
const PoinT * give_centercoords(void) const
DOFsPerNode give_dpn(void) const
virtual double give_ssstate(Dvctr *data, SStype SST, RVType rvtype, char type, long step, const Node *node=NULL)
give stress-strain state
const Face * give_face(long i) const
long give_dimMC(void) const
long give_Nels(void) const
const Element * give_superelem(long i) const
bool is_equal_to(const FiniteElementTypeSet fets) const
equality
GPA< const Point > points
double fillupbyzero(Dvctr *data, SStype SST) const
void print_row_VTK(FILE *stream) const
print element row output for VTK
long give_rslts_nsteps(void) const
int give_dimension(void) const
return type of element geometry, is identical with class derived from FElement
#define SP_scan_expected_number_exit(_1, _2, _3)
Cell * last_duplicity_master(void) const
return the last one in the duplicity master chain
long give_mproperty_cnt(void) const
const Material * give_mat(void) const
void deallocateCheckUno(ArgType *p, bool check=true)
void check_connectivity(void) const
void set_face(long i, const Face *val)
double give_Ry(void) const
IntPointSet IntPointSet_fet2e_comp(FiniteElementType fet)
FET to IPS for displacement computation (integration of stiffness matrix)
void read_input(const char *&str, femFileFormat fff)
virtual void checkConsistency(void) const
Checks data consistency.
bool SP_skip_word(const char *&src, int n)
... word and space before
long give_nfa(void) const
virtual void switch_node_pointer(Point *slave, Point *master, bool duplcheck)
switch node pointer form slave to master
ElemAttribs * elemAttribs()
Gives attribute attributes, data type changed to ElemAttribs*.
bool checkset_mprop(long val)
virtual void read_input(const char *&str, femFileFormat fff)
double give_CSusage_elast_rel(void)
long nc_brick_3d(double zero, double x[], double y[], double z[], const PoinT *point, PoinT *answer)
Function computes natural coordinates of 'point' on 'element', 'point' is entered in cartesian coordi...
virtual void print_row(FILE *stream, femFileFormat fff, bool endline=true, long did=0) const
*** PRINT ***
virtual void integrate_duplicated_cell(const Element *slave)
DUPLICITY.
void set_node(long i, long nid)
ATRIBUTES.
void connectivity_assembling(bool re=false)
Function assembles connectivity between face and its nodes and edges.
const Cell * give_MC(void) const
int CellGeometry_e2i_VTK(CellGeometry cg)
long ID
(global) identification number == position in list of members; zero-based numbering.
int give_CSusage_elast_bool(void)
double give_thickness(void) const
void set_new(const FacedgeAttribs *src)
virtual void checkConsistency(void) const
Checks data consistency.
void bePointAtAbscissa(const PoinT *p1, const PoinT *p2, double ksi)
receiver will be point at abscissa p1p2 with natural coord ksi
void connectivity_assembling(bool re=false)
Function assembles connectivity between element and its nodes, edges and faces (which are allocated i...
virtual ~FElement()
DESTRUCTOR.
virtual void compute_maxSigmaEq(void)
void set_owner(Cell *val)
*** SET ***
GPA< const Gelement > * fixedGelements
void connectivity_removing(void)
Function removes connectivity between element and its components == nodes, edges and faces...
long give_numsuperedge(void) const
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...
int ECN_convert_ips_triangle(bool i2e, int id, femFileFormat fff, IntPointSet ips)
virtual void switch_node_pointer(Point *slave, Point *master, bool duplcheck)
switch node pointer form slave to master
long give_numsuperface(void) const
Attributes * attributes
ATTRIBUTES.
GPA< const Vertex > * fixedVertices
double give_elemSize(void) const
CellGeometry give_cellGeom(void) const
virtual void print_row(FILE *stream, femFileFormat fff, long did) const =0
print row to solver input file
SStype SStype_i2e_SIFEL(int val)
bar=1,plbeam=2,spacebeam=5,,plate=15,axisymm=20,shell=25,spacestress=30
void connectivity_removing(void)
Function removes connectivity between edge and its nodes.
long give_ned(void) const
Classes Cell, Facedge, Edge, Face, Element, Gelement, PolyLine, Line, PolygonMdl, FElement...
virtual void print_row(FILE *stream, femFileFormat fff, bool endline=true, long did=0) const
print element row output in fff format
void resize_ignore_vals(long r, long c)
print yourself
double IPS_give_ip_coord_native(int i, IntPointSet ips, PoinT &coords)
void initialize_hn(const PoinT *cartcoord, const Cell *mc, long dimMC, long ordMC, long countMN, const Node **nodes, const PoinT *natcoord)
initialize hanging node
void switch_dpn_Line(void)
virtual void rotate2local(Dvctr *data)
void setup_duplicity_master(Cell *val)
int ECN_convert_e2i(int id, int compdim, int ord, CellGeometry cg, femFileFormat fff)
External to Internal conversion.
virtual void set_model_prop(long val, const Model *model, bool flag=false)
bool Parallel(void) const
*** FEMesh ***
virtual void integrate_duplicated_cell(const Element *slave)
DUPLICITY.
virtual void set_model_prop(long val, const Model *model, bool flag=false)
const Point * give_point(long i) const
void transform_nc(const Edge *t1, const Edge *t2, PoinT *nc) const
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
const Element * give_main_masterel_uniq(void) const
main masterel is Element (not Facedge) with same dimension as face/edge
virtual void print_row_VTX(char *str) const
bool isZero(double zero, double a)
virtual bool initialize_from(const char *&str, femFileFormat ff, bool all=true)
initialize form input string
void give_vector(VectoR *v) const
Dvctr * resize_ignore_vals(long newsize)
void read_output_SIFEL(FILE *stream, long step, ResultTypesAtElem rt)
virtual void give_ip_coords_global(IntPointSet ips, int i, PoinT &coords) const
void beCopyOf(const PoinT &src)
GelemAttribs * give_gelemAttribs(void)
PointAttribs * give_pointAttribs(void)
void add_result(Array *rslt, long step, ResultTypesAtElem rt)
void OOFEM_output_scan_GP(const char *&str, int i, bool old=false)
const Face * give_superface(long i) const
void add_property(int dim, long val)
const Dmtrx * give_results_dm(long step, ResultTypesAtElem rt) const
double give_elemSize(void) const
long give_prop(void) const
const Edge * give_edge(long i) const
*** *** *** *** CLASS ComponentGeometry 1D *** *** *** ***
long intersec_rectangle3d_line(double zero, double norm, const PoinT *A, const PoinT *B, const PoinT *C, const PoinT *D, const PoinT *U, const PoinT *V, double *ksi, double *eta, double *t, PoinT *I1, PoinT *I2)
ZDROJE http://softsurfer.com/algorithm_archive.htm.
const Lvctr * give_mproperty_ptr(void) const
virtual classID give_classid() const
Returns classID - class identification.
void connectivity_removing(void)
Function removes connectivity between face and its nodes and edges.
virtual void print_row_VTX(char *str) const
virtual void give_ip_coords_global(IntPointSet ips, int i, PoinT &coords) const
activate rotMg2l
const Problem * Pd
Pointer to owner = parent problem.
void init_point_on(Mesh *pm, GPA< const Node > &hnodes, const PoinT *point, const GeometryComponent *comp, const PoinT *nc, const Point *parentpoint) const
RFbyHN.
const Mesh * Msh(void) const
virtual long give_ord(void) const =0
int ECN_convert_ips_brick(bool i2e, int id, femFileFormat fff, IntPointSet ips)
virtual long give_face_nodes_edges(const Point **&facnodes, const Edge **&facedges) const
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.
virtual void checkConsistency(void) const
Checks data consistency.
virtual void checkConsistency(void) const
Checks data consistency.
int give_P_OOFEM_ver(void) const
virtual void read_input(const char *&str, femFileFormat fff)
virtual long give_edge_nodes(const Point **&edgnodes) const
#define _warningg2(_1, _2)
void assure_duplicity_master(void)
DUPLICITY.
virtual CellGeometry give_elemGeom(void) const =0
VectoR * beVectProduct(const VectoR *v1, const VectoR *v2)
vector product v1 x v2 (cross product)
bool FP_skip_line(FILE *stream, int n)
move file descriptor to the start of the n-th new line //[former read_line]
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.
virtual ~Cell()
DESTRUCTOR.
void setadd_masterel(const Element *comp)
Set master element if it is.
virtual double give_quality(void) const
compute quality of element
void read_output_OOFEM(FILE *stream, long step)
const Edge * give_Edge(long i) const
void check_rslts(long step, ResultTypesAtElem rt) const
double give_Iz(void) const
virtual void print_row_VTX(char *str) const
void set_load(int i, int indx=-1)
GPA< const Element > masterels
const Material * give_mat(int i) const
long give_mproperty() const
*** GET ***
CrossSectType give_loctype_or_type(void) const
void integrate_duplicated_one(const ElemAttribs *slv)
ElemAttribs * give_elemAttribs(void)
virtual void set_mprop(long val)
*** SET ***
void read_output_SIFEL(FILE *stream, long step, ResultTypesAtElem rt)
const char * FETSet_set2s_OOFEM(const FiniteElementTypeSet *set, PAGroup pg)
void switch_myself_at_connectivity(Cell *master)
switch receiver to master in connectivity system
bool is_point_in_sphere(const PoinT *point) const
FacedgeAttribs * give_facedgeAttribs(void)
void copy_row(long r, const Dvctr &v)
const GPA< const Point > * give_points(void) const
const Geometry * Geom
Pointer to owner == parent geometry.
BoundaryCond * give_BC(long i) const
const GPA< const Edge > * give_edges(void) const
GPA - Generic Pointer Array, template class manages 1d array of pointers to objects of type T...
virtual DOFsPerNode give_DOFsPerNode_default(void) const
give default DOFs per node
const Face * give_superface(long i) const
#define FP_scan_expected_line_exit(_1, _2, _3, _4)
const Dvctr * give_results_dv(long step, ResultTypesAtElem rt) const
void set_elemCount(double val)
void divide(Mesh *pm, GPA< const Node > &hnodes) const
Function splits polyline segments up subsegments, one subsegment belongs to one element.
SStype
type of stress/strain state of element; especially results depends on this variable => described at M...
PolyLine(long gid, long oid, const Geometry *mg, int nv, classID mecg=classVoid)
CONSTRUCTOR.
#define _errorr3(_1, _2, _3)
const HNAttribs * give_HNattrb(void) const
ComponentGeometry * allocComponentGeometry(classID cid, Cell *owner, ComponentGeometry *src=NULL)
const Gelement * give_mdl_masterel(void) const
virtual double give_ssstate(Dvctr *data, SStype SST, RVType rvtype, char type, long step, const Node *node=NULL)
give stress-strain state
virtual long give_face_nodes_edges(const Point **&facnodes, const Edge **&facedges) const
FiniteElementType FETSet_set2e(const FiniteElementTypeSet *set, Solver sol, PAGroup pg)
FETset to FET.
bool give_fulldata(void) const
double give_area(void) const
SStype give_sst(void) const
BCType give_loctype(void) const
bool is_nod_on(double norm, const PoinT *point, double &ksi) const
Function finds out mutual position of node and edge.
void set_prop_node_inher(bool everynode)
inherit property from element to nodes, only if node has one superelem
virtual long give_face_nodes_edges(const Point **&facnodes, const Edge **&facedges) const
bool give_virtual(void) const
const Gelement * mdl_masterel
long give_numsuperface(void) const
void be_mean_of(const Dmtrx *src)
virtual DOFsPerNode give_DOFsPerNode_default(void) const
give default DOFs per node
void read_output_OOFEM(FILE *stream, long step)
bool FP_skip_expected_string(FILE *src, const char *expctd, bool cs)
... word and compare with expected one
virtual long give_edge_nodes(const Point **&edgnodes) const
return type of element for OOFEM solver
bool switch_edge_pointer(Edge *slave, Edge *master)
switch pointer to component edge - slave is replaced be master
virtual void switch_node_pointer(Point *slave, Point *master, bool duplcheck)
switch node pointer form slave to master
bool give_delete_flag() const
DOFsPerNode give_DOFspnod(void) const
double give_circum(void) const
void tnsrRotAxisZangle(double a)
rotate coord system around axis z by angle
double give_GeomWeight1deg(void) const
const Dscal * give_results_ds(long step, ResultTypesAtElem rt) const
ResultTypesAtElem
Result type at element.
bool check_collapse(void)
check any two nodes are same = element is collapsed
double * give_ptr2val(long r=0, long c=0)
void connectivity_assembling(bool re=false)
Function assembles connectivity between edge and its nodes.
long give_result_ncomp(long time_step, ResultTypesAtElem rte) const
virtual DOFsPerNode give_DOFsPerNode_default(void) const
give default DOFs per node
void read_output_SIFEL(FILE *stream, long step, ResultTypesAtElem rt)
bool give_3Delement_with_point_inside(const PoinT *coords, const GeometryComponent *&comp, PoinT *nc) const
Function finds location of point indide of which 3d element is.
void set_edge(long i, const Edge *val)
bool give_Parallel(void) const
void del_points_down(long val)
const Facedge * give_same_dimension_facedge(void) const
Returns edge/face/volume of same dimension as receiver (Beam returns edge, etc.)
Triangle(long gid, long oid, const Geometry *mg, bool aa, long dom, long lid)
CONSTRUCTOR ord nn ne nf.
const Element * give_Elem(long i) const
void findout_segment_domain(Mesh *pm, GPA< const Node > &hnodes) const
int FETSet_set2i_SIFEL(const FiniteElementTypeSet *set, PAGroup pg)
bool SP_scan_array(const char *&src, int n, ArgType *a)
... array of numbers
virtual void switch_myself_at_connectivity(Cell *master)
switch receiver to master in connectivity system
VectoR * beP2P(const PoinT *p1, const PoinT *p2)
Receiver is set to vector from p1 to p2, i.e. 'this = p2 - p1'.
bool SP_scan_number(const char *&src, int &dest)
... number of type int/long/double
long give_numsuperelem(void) const
*** *** *** *** CLASS COMPONENT *** *** *** ***
tato struktura by mela obsahovat vsechny potrebne informace pro urceni konkretni implementace konecne...
quadrilateral convex hexahedron
FiniteElementTypeSet * give_FETS(FiniteElementTypeSet *set) const
GLOBAL, EAL_direct only.
virtual long give_face_nodes_edges(const Point **&facnodes, const Edge **&facedges) const
virtual void print_row(FILE *stream, femFileFormat fff, bool endline=true, long did=0) const
print element row output for OOFEM
IntPointSet give_IPset_rslts(Solver sol) const
basic set = for results
long give_nno(void) const
bool is_point_on(const PoinT *point, const GeometryComponent *&comp, PoinT *nc) const
Function finds out mutual position of point with coords and 'element'.
void set_mprop(long val)
*** SET ***
virtual long give_edge_nodes(const Point **&edgnodes) const
virtual DOFsPerNode give_DOFsPerNode_default(void) const
give default DOFs per node
virtual void compute_maxSigmaEq(void)
void switch_myself_at_connectivity(Cell *master)
switch receiver to master in connectivity system
virtual void checkConsistency(void) const
Checks data consistency.
void set_result(long s, double *rslt, long step, ResultTypesAtElem rt)
#define _errorr4(_1, _2, _3, _4)
int masterel_dim
MASTER ELEMENT.
*** *** *** *** CLASS ComponentGeometry *** *** *** ***
double SigmaEq(VectoR &s, VectoR &t)
bool switch_face_pointer(Face *slave, Face *master)
switch pointer to component face - slave is replaced be master
int give_global_nDOFs(void) const
#define FP_scan_expected_word_exit(_1, _2, _3, _4)
int CellGeometry_e2i_JKTK(CellGeometry cg)
T * add(T *val)
add (assign) new pointer to the end; enlarge the receiver if too small
double give_lav(void) const
bool is_first_diag_short(void)
if the first diagonal is shorter then the second
double give_Iy(void) const
double give_width(void) const
bool isOOFEMplast(void) const
virtual void integrate_duplicated_cell(const Facedge *slave)
DUPLICITY.
virtual long give_edge_nodes(const Point **&edgnodes) const
return type of element for OOFEM solver
double give_characteristic_size(void) const
virtual SStype give_SSType_default(void) const
give default type of stress state
const GPA< const Element > * give_superelems(void) const
RVType
Result variable type.
void setup_maxSigmaEq(void)
virtual void initialize(void)
initiate/sets data
const CrossSection * give_cs(void) const
void read_nodes(const char *&str, femFileFormat fff)
print element row output for VTK
virtual SStype give_SSType_default(void) const
give default type of stress state
virtual long give_face_nodes_edges(const Point **&facnodes, const Edge **&facedges) const
virtual long give_edge_nodes(const Point **&edgnodes) const
return type of element for OOFEM solver
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.
long give_mpropertyORzero(void) const
classID
Type introduced to distinguish between classes.
int IntPointSet_give_number_ips(IntPointSet ips)
give number of int. points
virtual void integrate_duplicated_cell(const Cell *slave)
Array *** results
2d array of pointers to Array (Xvctr or Xmtrx)
virtual void integrate_duplicated_cell(const Edge *slave)
DUPLICITY.
PoinT * copy(const PoinT *p)
long give_ccols(void) const
virtual SStype give_SSType_default(void) const
give default type of stress state
VTKPDtopology
VTK type of cell topology for POLYDATA.
virtual void set_model_prop(long val, const Model *model, bool flag=false)
flag==1 master is element, flag==0 master is facedge
virtual classID give_classid() const
Returns classID - class identification.
double give_CSusage_elast(void)
double give_height(void) const
int give_rslt_NIP(Solver sol) const
int give_nlayers(void) const
*** *** *** *** CLASS ComponentGeometry 2D *** *** *** ***
bool invisible_duplicated(char flag='a')
make invisible if duplicated
const GPA< const Face > * give_superfaces(void) const
void attributes_allocation(const GelemAttribs *masterat)
bool FP_scan_array(FILE *stream, int n, int *dest)
scan/copy array of numbers from src to dest, src pointer is shifted over the field ...
const PoinT * give_coords(void) const
Gelement(classID mecg, long gid, long oid, const Geometry *mg, long nn, long ne, long nf)
CONSTRUCTOR.
IntPointSet give_IPset(void) const
virtual void initialize(void)
initiate/sets data
void OOFEM_output_scan_elem_head(const char *str, long o, long i, bool oid)
virtual long give_face_nodes_edges(const Point **&facnodes, const Edge **&facedges) const
MaterialType give_type(void) const
void assign_fixed_entities_by_ID(bool node, long ncn, const long *icn)
virtual long give_edge_nodes(const Point **&edgnodes) const
void setadd_superelem(const Element *comp, bool uniquecheck)
Returns classID - class identification.
double give_coord(int i) const
int ECN_convert_ips_quadrangle(bool i2e, int id, femFileFormat fff, IntPointSet ips)
bool give_ksiAtAbscissa(double zero, double norm, const PoinT *p1, const PoinT *p2, double &ksi) const
compute natural coordinate ksi of receiver at abscissa p1p2 answer: 1(0) = point lays on(out of) absc...
void set_elemSize(double val)
long give_numsuperelem(void) const