78Lattice2d :: ~Lattice2d()
83Lattice2d :: giveCrackFlag()
92Lattice2d :: giveCrackWidth()
102Lattice2d :: giveDissipation()
111Lattice2d :: giveDeltaDissipation()
123 double x1, x2, y1, y2, xp, yp;
126 x1 = this->
giveNode(1)->giveCoordinate(1);
127 y1 = this->
giveNode(1)->giveCoordinate(2);
128 x2 = this->
giveNode(2)->giveCoordinate(1);
129 y2 = this->
giveNode(2)->giveCoordinate(2);
136 double areaHelp = 0.5 * ( x1 * y2 + x2 * yp + xp * y1 - ( xp * y2 + yp * x1 + x2 * y1 ) );
138 ecc = 2 * areaHelp / l;
143 answer.
at(1, 1) = -1.;
144 answer.
at(1, 2) = 0.;
145 answer.
at(1, 3) = ecc;
146 answer.
at(1, 4) = 1.;
147 answer.
at(1, 5) = 0.;
148 answer.
at(1, 6) = -ecc;
150 answer.
at(2, 1) = 0.;
151 answer.
at(2, 2) = -1.;
152 answer.
at(2, 3) = -l / 2.;
153 answer.
at(2, 4) = 0.;
154 answer.
at(2, 5) = 1.;
155 answer.
at(2, 6) = -l / 2.;
157 answer.
at(3, 1) = 0.;
158 answer.
at(3, 2) = 0.;
159 answer.
at(3, 3) = -this->
width / sqrt(12.);
160 answer.
at(3, 4) = 0.;
161 answer.
at(3, 5) = 0.;
162 answer.
at(3, 6) = this->
width / sqrt(12.);
164 answer.
times(1. / l);
180Lattice2d :: computeStiffnessMatrix(
FloatMatrix &answer, MatResponseMode rMode,
196void Lattice2d :: computeGaussPoints()
216 answer.
at(1, 1) = cosine;
217 answer.
at(1, 2) = sine;
218 answer.
at(2, 1) = -sine;
219 answer.
at(2, 2) = cosine;
220 answer.
at(3, 3) = 1.;
221 answer.
at(4, 4) = cosine;
222 answer.
at(4, 5) = sine;
223 answer.
at(5, 4) = -sine;
224 answer.
at(5, 5) = cosine;
225 answer.
at(6, 6) = 1.;
235 return weight * 0.5 * this->
giveLength() * area;
240Lattice2d :: giveDofManDofIDMask(
int inode,
IntArray &answer)
const
248double Lattice2d :: giveLength()
259 length = sqrt(dx * dx + dy * dy);
266double Lattice2d :: givePitch()
269 double xA, xB, yA, yB;
272 if (
pitch == 10. ) {
279 pitch = atan2(yB - yA, xB - xA);
287Lattice2d :: giveNormalStress()
294 double normalStress = 0;
301Lattice2d :: hasBeenUpdated()
330 answer.
at(1, 1) = cosine;
331 answer.
at(1, 2) = sine;
332 answer.
at(2, 1) = -sine;
333 answer.
at(2, 2) = cosine;
334 answer.
at(3, 3) = 1.0;
343 LatticeStructuralElement :: initializeFrom(ir, priority);
375 LatticeStructuralElement :: saveContext(stream, mode);
404 LatticeStructuralElement :: restoreContext(stream, mode);
459 if ( !
gc.testElementGraphicActivity(
this) ) {
464 EASValsSetColor(
gc.getElementColor() );
467 p [ 0 ].x = ( FPNum ) this->
giveNode(1)->giveCoordinate(1);
468 p [ 0 ].y = ( FPNum ) this->
giveNode(1)->giveCoordinate(2);
470 p [ 1 ].x = ( FPNum ) this->
giveNode(2)->giveCoordinate(1);
471 p [ 1 ].y = ( FPNum ) this->
giveNode(2)->giveCoordinate(2);
474 go = CreateLine3D(p);
475 EGWithMaskChangeAttributes(WIDTH_MASK | COLOR_MASK | LAYER_MASK, go);
476 EGAttachObject(go, ( EObjectP )
this);
477 EMAddGraphicsToModel(ESIModel(), go);
485 if ( !
gc.testElementGraphicActivity(
this) ) {
489 double defScale =
gc.getDefScale();
493 EASValsSetColor(
gc.getDeformedElementColor() );
496 p [ 0 ].x = ( FPNum ) this->
giveNode(1)->giveUpdatedCoordinate(1, tStep, defScale);
497 p [ 0 ].y = ( FPNum ) this->
giveNode(1)->giveUpdatedCoordinate(2, tStep, defScale);
500 p [ 1 ].x = ( FPNum ) this->
giveNode(2)->giveUpdatedCoordinate(1, tStep, defScale);
501 p [ 1 ].y = ( FPNum ) this->
giveNode(2)->giveUpdatedCoordinate(2, tStep, defScale);
504 go = CreateLine3D(p);
505 EGWithMaskChangeAttributes(WIDTH_MASK | COLOR_MASK | LAYER_MASK, go);
506 EGAttachObject(go, ( EObjectP )
this);
507 EMAddGraphicsToModel(ESIModel(), go);
518 if ( !
gc.testElementGraphicActivity(
this) ) {
522 if (
gc.giveIntVarType() == IST_CrackState ) {
524 this->
giveIPValue(crackStatuses, gp, IST_CrackStatuses, tStep);
525 if ( crackStatuses(0) == 1. || crackStatuses(0) == 2. || crackStatuses(0) == 3 || crackStatuses(0) == 4 ) {
529 p [ 0 ].x = ( FPNum ) coords.
at(1);
530 p [ 0 ].y = ( FPNum ) coords.
at(2);
531 p [ 0 ].z = ( FPNum ) coords.
at(3);
532 p [ 1 ].x = ( FPNum ) coords.
at(4);
533 p [ 1 ].y = ( FPNum ) coords.
at(5);
534 p [ 1 ].z = ( FPNum ) coords.
at(6);
539 if ( ( crackStatuses(0) == 1. ) ) {
540 EASValsSetColor(
gc.getActiveCrackColor() );
541 }
else if ( crackStatuses(0) == 2. ) {
542 EASValsSetColor(
gc.getCrackPatternColor() );
543 }
else if ( crackStatuses(0) == 3. ) {
544 EASValsSetColor(
gc.getActiveCrackColor() );
545 }
else if ( crackStatuses(0) == 4. ) {
546 EASValsSetColor(
gc.getActiveCrackColor() );
550 tr = CreateLine3D(p);
551 EGWithMaskChangeAttributes(WIDTH_MASK | COLOR_MASK | LAYER_MASK, tr);
552 EGAttachObject(tr, ( EObjectP )
this);
553 EMAddGraphicsToModel(ESIModel(), tr);
565 if ( !
gc.testElementGraphicActivity(
this) ) {
570 EASValsSetColor(
gc.getCrossSectionColor() );
576 p [ 0 ].x = ( FPNum ) coords.
at(1);
577 p [ 0 ].y = ( FPNum ) coords.
at(2);
578 p [ 0 ].z = ( FPNum ) coords.
at(3);
579 p [ 1 ].x = ( FPNum ) coords.
at(4);
580 p [ 1 ].y = ( FPNum ) coords.
at(5);
581 p [ 1 ].z = ( FPNum ) coords.
at(6);
583 go = CreateLine3D(p);
584 EGWithMaskChangeAttributes(WIDTH_MASK | COLOR_MASK | LAYER_MASK, go);
585 EGAttachObject(go, ( EObjectP )
this);
586 EMAddGraphicsToModel(ESIModel(), go);
592 double x1, y1, x2, y2;
593 x1 = this->
giveNode(1)->giveCoordinate(1);
594 y1 = this->
giveNode(1)->giveCoordinate(2);
595 x2 = this->
giveNode(2)->giveCoordinate(1);
596 y2 = this->
giveNode(2)->giveCoordinate(2);
601 normalDirection.
resize(2);
602 normalDirection.
zero();
604 shearDirection.
zero();
605 normalDirection.
at(1) = x2 - x1;
606 normalDirection.
at(2) = y2 - y1;
608 if ( normalDirection.
at(2) == 0. ) {
609 shearDirection.
at(1) = 0.;
610 shearDirection.
at(2) = 1.;
612 shearDirection.
at(1) = 1.0;
613 shearDirection.
at(2) =
614 -normalDirection.
at(1) / normalDirection.
at(2);
#define REGISTER_Element(class)
virtual int read(int *data, std::size_t count)=0
Reads count integer values into array pointed by data.
virtual int write(const int *data, std::size_t count)=0
Writes count integer values from array pointed by data.
double giveCoordinate(int i) const
Node * giveNode(int i) const
virtual void drawScalar(oofegGraphicContext &gc, TimeStep *tStep)
int numberOfDofMans
Number of dofmanagers.
std::vector< std ::unique_ptr< IntegrationRule > > integrationRulesArray
CrossSection * giveCrossSection()
virtual IntegrationRule * giveDefaultIntegrationRulePtr()
Domain * giveDomain() const
int number
Component number.
void zero()
Zeroes all coefficients of receiver.
void resize(Index rows, Index cols)
void plusProductUnsym(const FloatMatrix &a, const FloatMatrix &b, double dV)
void beProductOf(const FloatMatrix &a, const FloatMatrix &b)
void zero()
Zeroes all coefficient of receiver.
double at(std::size_t i, std::size_t j) const
IntegrationPointStatus * giveMaterialStatus(IntegrationPointStatusIDType key=IPSID_Default)
double giveWeight()
Returns integration weight of receiver.
GaussPoint * getIntegrationPoint(int n)
void drawRawGeometry(oofegGraphicContext &gc, TimeStep *tStep) override
void computeConstitutiveMatrixAt(FloatMatrix &answer, MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep) override
double giveLength() override
double computeVolumeAround(GaussPoint *gp) override
static ParamKey IPK_Lattice2d_thick
void drawRawCrossSections(oofegGraphicContext &gc, TimeStep *tStep)
static ParamKey IPK_Lattice2d_width
void giveCrossSectionCoordinates(FloatArray &coords) override
void computeBmatrixAt(GaussPoint *, FloatMatrix &, int=1, int=ALL_STRAINS) override
void drawDeformedGeometry(oofegGraphicContext &gc, TimeStep *tStep, UnknownType) override
static ParamKey IPK_Lattice2d_gpcoords
static ParamKey IPK_Lattice2d_couplingnumber
void drawSpecial(oofegGraphicContext &gc, TimeStep *tStep) override
static ParamKey IPK_Lattice2d_couplingflag
virtual double giveCrackWidth() const
virtual int giveCrackFlag() const
virtual double giveDissipation() const
virtual int hasBeenUpdated() const
virtual double giveDeltaDissipation() const
double giveNormalLatticeStress() const
Gives the last equilibrated normal stress.
LatticeStructuralElement(int n, Domain *d)
int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep) override
@ OGC_eigenVectorGeometry
@ CIO_IOERR
General IO error.
#define OOFEG_RAW_CROSSSECTION_LAYER
#define OOFEG_CRACK_PATTERN_LAYER
oofem::oofegGraphicContext gc[OOFEG_LAST_LAYER]
#define OOFEG_DEFORMED_GEOMETRY_LAYER
#define OOFEG_DEFORMED_GEOMETRY_WIDTH
#define OOFEG_RAW_GEOMETRY_WIDTH
#define OOFEG_RAW_GEOMETRY_LAYER
#define OOFEG_CRACK_PATTERN_WIDTH
#define PM_UPDATE_PARAMETER(_val, _pm, _ir, _componentnum, _paramkey, _prio)