35 #include "../sm/Elements/lattice2d.h" 36 #include "../sm/Materials/latticematstatus.h" 37 #include "../sm/Elements/latticestructuralelement.h" 54 #include "../sm/Materials/structuralmaterial.h" 124 double x1, x2, y1, y2, xp, yp;
137 double areaHelp = 0.5 * ( x1 * y2 + x2 * yp + xp * y1 - ( xp * y2 + yp * x1 + x2 * y1 ) );
139 ecc = 2 * areaHelp / l;
144 answer.
at(1, 1) = -1.;
145 answer.
at(1, 2) = 0.;
146 answer.
at(1, 3) = ecc;
147 answer.
at(1, 4) = 1.;
148 answer.
at(1, 5) = 0.;
149 answer.
at(1, 6) = -ecc;
151 answer.
at(2, 1) = 0.;
152 answer.
at(2, 2) = -1.;
153 answer.
at(2, 3) = -l / 2.;
154 answer.
at(2, 4) = 0.;
155 answer.
at(2, 5) = 1.;
156 answer.
at(2, 6) = -l / 2.;
158 answer.
at(3, 1) = 0.;
159 answer.
at(3, 2) = 0.;
160 answer.
at(3, 3) = -this->
width / sqrt(12.);
161 answer.
at(3, 4) = 0.;
162 answer.
at(3, 5) = 0.;
163 answer.
at(3, 6) = this->
width / sqrt(12.);
165 answer.
times(1. / l);
219 answer.
at(1, 1) = cosine;
220 answer.
at(1, 2) = sine;
221 answer.
at(2, 1) = -sine;
222 answer.
at(2, 2) = cosine;
223 answer.
at(3, 3) = 1.;
224 answer.
at(4, 4) = cosine;
225 answer.
at(4, 5) = sine;
226 answer.
at(5, 4) = -sine;
227 answer.
at(5, 5) = cosine;
228 answer.
at(6, 6) = 1.;
238 return weight * 0.5 * this->
giveLength() * area;
262 length = sqrt(dx * dx + dy * dy);
272 double xA, xB, yA, yB;
275 if (
pitch == 10. ) {
282 pitch = atan2(yB - yA, xB - xA);
293 double normalStress = 0;
308 double normalStress = 0;
344 answer.
at(1, 1) = cosine;
345 answer.
at(1, 2) = sine;
346 answer.
at(2, 1) = -sine;
347 answer.
at(2, 2) = cosine;
348 answer.
at(3, 3) = 1.0;
513 go = CreateLine3D(p);
514 EGWithMaskChangeAttributes(WIDTH_MASK | COLOR_MASK | LAYER_MASK, go);
515 EGAttachObject(go, ( EObjectP )
this);
516 EMAddGraphicsToModel(ESIModel(), go);
543 go = CreateLine3D(p);
544 EGWithMaskChangeAttributes(WIDTH_MASK | COLOR_MASK | LAYER_MASK, go);
545 EGAttachObject(go, ( EObjectP )
this);
546 EMAddGraphicsToModel(ESIModel(), go);
563 this->
giveIPValue(crackStatuses, gp, IST_CrackStatuses, tStep);
564 if ( crackStatuses(0) == 1. || crackStatuses(0) == 2. || crackStatuses(0) == 3 || crackStatuses(0) == 4 ) {
568 p [ 0 ].x = ( FPNum ) coords.
at(1);
569 p [ 0 ].y = ( FPNum ) coords.
at(2);
570 p [ 0 ].z = ( FPNum ) coords.
at(3);
571 p [ 1 ].x = ( FPNum ) coords.
at(4);
572 p [ 1 ].y = ( FPNum ) coords.
at(5);
573 p [ 1 ].z = ( FPNum ) coords.
at(6);
578 if ( ( crackStatuses(0) == 1. ) ) {
580 }
else if ( crackStatuses(0) == 2. ) {
582 }
else if ( crackStatuses(0) == 3. ) {
584 }
else if ( crackStatuses(0) == 4. ) {
589 tr = CreateLine3D(p);
590 EGWithMaskChangeAttributes(WIDTH_MASK | COLOR_MASK | LAYER_MASK, tr);
591 EGAttachObject(tr, ( EObjectP )
this);
592 EMAddGraphicsToModel(ESIModel(), tr);
615 p [ 0 ].x = ( FPNum ) coords.
at(1);
616 p [ 0 ].y = ( FPNum ) coords.
at(2);
617 p [ 0 ].z = ( FPNum ) coords.
at(3);
618 p [ 1 ].x = ( FPNum ) coords.
at(4);
619 p [ 1 ].y = ( FPNum ) coords.
at(5);
620 p [ 1 ].z = ( FPNum ) coords.
at(6);
622 go = CreateLine3D(p);
623 EGWithMaskChangeAttributes(WIDTH_MASK | COLOR_MASK | LAYER_MASK, go);
624 EGAttachObject(go, ( EObjectP )
this);
625 EMAddGraphicsToModel(ESIModel(), go);
631 double x1, y1, x2, y2;
640 normalDirection.
resize(2);
641 normalDirection.
zero();
643 shearDirection.
zero();
644 normalDirection.
at(1) = x2 - x1;
645 normalDirection.
at(2) = y2 - y1;
647 if ( normalDirection.
at(2) == 0. ) {
648 shearDirection.
at(1) = 0.;
649 shearDirection.
at(2) = 1.;
651 shearDirection.
at(1) = 1.0;
652 shearDirection.
at(2) =
653 -normalDirection.
at(1) / normalDirection.
at(2);
int testElementGraphicActivity(Element *)
Test if particular element passed fulfills various filtering criteria for its graphics output...
contextIOResultType storeYourself(DataStream &stream) const
Stores array to output stream.
virtual int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep)
Returns the integration point corresponding value in full form.
virtual int giveLocalCoordinateSystem(FloatMatrix &answer)
Returns local coordinate system of receiver Required by material models with ortho- and anisotrophy...
virtual IntegrationRule * giveDefaultIntegrationRulePtr()
Access method for default integration rule.
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Restores the receiver state previously written in stream.
virtual int giveCrackFlag()
Returns the crack flag.
virtual double giveNormalStress()
Gives the last equilibrated normal stress.
The purpose of DataStream abstract class is to allow to store/restore context to different streams...
contextIOResultType storeYourself(DataStream &stream) const
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Stores receiver state to output stream.
virtual void drawRawGeometry(oofegGraphicContext &gc, TimeStep *tStep)
void zero()
Sets all component to zero.
double & at(int i)
Coefficient access function.
virtual void giveCrossSectionCoordinates(FloatArray &coords)
#define OOFEG_RAW_CROSSSECTION_LAYER
virtual int giveCrackFlag()
Returns the crack flag.
#define OOFEG_RAW_GEOMETRY_LAYER
virtual double computeVolumeAround(GaussPoint *gp)
Returns volume related to given integration point.
#define _IFT_Lattice2d_couplingflag
oofem::oofegGraphicContext gc[OOFEG_LAST_LAYER]
virtual void computeGaussPoints()
Initializes the array of integration rules member variable.
virtual int hasBeenUpdated()
Returns flag indicating if status has been updated.
virtual void giveGpCoordinates(FloatArray &coords)
Gives the GP coordinates.
virtual bool computeGtoLRotationMatrix(FloatMatrix &)
Returns transformation matrix from global c.s.
This class implements a base lattice material status.
virtual double giveDissipation()
Returns the energy dissipation computed at the GaussPoint of the element.
virtual double giveCoordinate(int i)
Class implementing an array of integers.
int & at(int i)
Coefficient access function.
virtual int read(int *data, int count)=0
Reads count integer values into array pointed by data.
MatResponseMode
Describes the character of characteristic material matrix.
virtual void giveCharMaterialStiffnessMatrix(FloatMatrix &answer, MatResponseMode mode, GaussPoint *gp, TimeStep *tStep)=0
Computes the stiffness matrix of receiver in given integration point, respecting its history...
#define OOFEG_DEFORMED_GEOMETRY_LAYER
virtual void drawScalar(oofegGraphicContext &gc, TimeStep *tStep)
Abstract base class representing integration rule.
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Restores the receiver state previously written in stream.
virtual int hasBeenUpdated()
Gives the last equilibrated normal stress.
EPixel getDeformedElementColor()
virtual int write(const int *data, int count)=0
Writes count integer values from array pointed by data.
void plusProductUnsym(const FloatMatrix &a, const FloatMatrix &b, double dV)
Adds to the receiver the product .
InternalStateType giveIntVarType()
#define OOFEG_CRACK_PATTERN_LAYER
EPixel getActiveCrackColor()
virtual double giveDeltaDissipation()
Returns the increment of dissipation computed at the GaussPoint of the element.
virtual double giveDeltaDissipation()
Returns the increment of dissipation computed at the GaussPoint of the element.
virtual void computeBmatrixAt(GaussPoint *, FloatMatrix &, int=1, int=ALL_STRAINS)
Computes the geometrical matrix of receiver in given integration point.
#define OOFEG_RAW_GEOMETRY_WIDTH
virtual double giveWeight()
Returns integration weight of receiver.
UnknownType
Type representing particular unknown (its physical meaning).
StructuralCrossSection * giveStructuralCrossSection()
Helper function which returns the structural cross-section for the element.
void times(double f)
Multiplies receiver by factor f.
#define OOFEG_CRACK_PATTERN_WIDTH
virtual void drawSpecial(oofegGraphicContext &gc, TimeStep *tStep)
contextIOResultType restoreYourself(DataStream &stream)
#define _IFT_Lattice2d_gpcoords
virtual double giveUpdatedCoordinate(int ic, TimeStep *tStep, double scale=1.)
Returns updated ic-th coordinate of receiver.
EPixel getCrackPatternColor()
virtual double giveOldCrackWidth()
double at(int i, int j) const
Coefficient access function.
void resize(int n)
Checks size of receiver towards requested bounds.
void giveRealStresses(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedStrain, TimeStep *tStep)
Computes the real stress vector for given strain and integration point.
virtual double giveCrackWidth()
contextIOResultType restoreYourself(DataStream &stream)
Restores array from image on stream.
#define _IFT_Lattice2d_width
virtual double giveCrackWidth()
Class representing vector of real numbers.
Implementation of matrix containing floating point numbers.
IRResultType
Type defining the return values of InputRecord reading operations.
virtual double giveLength()
Returns the element length.
GaussPoint * getIntegrationPoint(int n)
Access particular integration point of receiver.
virtual double giveDissipation()
Returns the energy dissipation computed at the GaussPoint of the element.
IntegrationPointStatus * giveMaterialStatus()
Returns reference to associated material status (NULL if not defined).
#define _IFT_Lattice2d_thick
virtual void computeStiffnessMatrix(FloatMatrix &answer, MatResponseMode rMode, TimeStep *tStep)
Computes numerically stiffness matrix of receiver.
void resize(int rows, int cols)
Checks size of receiver towards requested bounds.
virtual void giveDofManDofIDMask(int inode, IntArray &) const
Returns dofmanager dof mask for node.
void zero()
Zeroes all coefficients of receiver.
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Stores receiver state to output stream.
#define OOFEG_DEFORMED_GEOMETRY_WIDTH
virtual void computeConstitutiveMatrixAt(FloatMatrix &answer, MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep)
Computes constitutive matrix of receiver.
virtual void drawRawCrossSections(oofegGraphicContext &gc, TimeStep *tStep)
long ContextMode
Context mode (mask), defining the type of information written/read to/from context.
std::vector< std::unique_ptr< IntegrationRule > > integrationRulesArray
List of integration rules of receiver (each integration rule contains associated integration points a...
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
void zero()
Zeroes all coefficient of receiver.
#define _IFT_Lattice2d_couplingnumber
virtual double giveOldCrackWidth()
virtual void drawDeformedGeometry(oofegGraphicContext &gc, TimeStep *tStep, UnknownType)
virtual double giveNormalStress()
Returns the normal stress.
virtual double giveOldNormalStress()
Returns the old normal stress.
Lattice2d(int n, Domain *d)
This class implements the base of a special lattice element following the concepts orginally develope...
void beProductOf(const FloatMatrix &a, const FloatMatrix &b)
Assigns to the receiver product of .
virtual void drawYourself(oofegGraphicContext &gc, TimeStep *tStep)
the oofem namespace is to define a context or scope in which all oofem names are defined.
Class implementing node in finite element mesh.
double normalize()
Normalizes receiver.
Node * giveNode(int i) const
Returns reference to the i-th node of element.
virtual int computeGlobalCoordinates(FloatArray &answer, const FloatArray &lcoords)
This function is different from the standard computeGlobalCorrdinates function as it returns the glob...
EPixel getCrossSectionColor()
Class representing integration point in finite element program.
Class representing solution step.
int numberOfDofMans
Number of dofmanagers.
virtual void computeStressVector(FloatArray &answer, const FloatArray &strain, GaussPoint *gp, TimeStep *tStep)
Computes the stress vector of receiver at given integration point, at time step tStep.
Class representing Gaussian-quadrature integration rule.
virtual double giveOldNormalStress()
Gives the last equilibrated normal stress.
void resize(int s)
Resizes receiver towards requested size.
OGC_PlotModeType giveIntVarPlotMode()