91 #ifdef Quad1PlaneStrain_reducedVolumetricIntegration 97 for (
int i = 1; i <= 4; i++ ) {
98 answer.
at(1, 2 * i - 1) = ( dN.
at(i, 1) + dN_red.
at(i, 1) ) / 2.;
99 answer.
at(1, 2 * i - 0) = (-dN.
at(i, 2) + dN_red.
at(i, 2) ) / 2.;
100 answer.
at(2, 2 * i - 1) = (-dN.
at(i, 1) + dN_red.
at(i, 1) ) / 2.;
101 answer.
at(2, 2 * i - 0) = ( dN.
at(i, 2) + dN_red.
at(i, 2) ) / 2.;
102 answer.
at(4, 2 * i - 1) = dN.
at(i, 2);
103 answer.
at(4, 2 * i - 0) = dN.
at(i, 1);
106 #ifdef Quad1PlaneStrain_reducedShearIntegration 112 for (
int i = 1; i <= 4; i++ ) {
113 answer.
at(1, 2 * i - 1) = dN.
at(i, 1);
114 answer.
at(2, 2 * i - 0) = dN.
at(i, 2);
115 answer.
at(4, 2 * i - 1) = dN_red.
at(i, 2);
116 answer.
at(4, 2 * i - 0) = dN_red.
at(i, 1);
120 for (
int i = 1; i <= 4; i++ ) {
121 answer.
at(1, 2 * i - 1) = dN.
at(i, 1);
122 answer.
at(2, 2 * i - 0) = dN.
at(i, 2);
123 answer.
at(4, 2 * i - 1) = dN.
at(i, 2);
124 answer.
at(4, 2 * i - 0) = dN.
at(i, 1);
142 for (
int i = 1; i <= 4; i++ ) {
143 answer.
at(1, 2 * i - 1) = dnx.
at(i, 1);
144 answer.
at(2, 2 * i - 0) = dnx.
at(i, 2);
145 answer.
at(4, 2 * i - 1) = dnx.
at(i, 2);
146 answer.
at(5, 2 * i - 0) = dnx.
at(i, 1);
193 int &localNodeId,
int &localElemId,
int &localBcId,
197 int inode, nodes = 4, iside, sides = 4, nd1, nd2;
198 FloatArray *corner [ 4 ], midSide [ 4 ], midNode, cor [ 4 ];
199 double x = 0.0, y = 0.0;
201 static int sideNode [ 4 ] [ 2 ] = { { 1, 2 }, { 2, 3 }, { 3, 4 }, { 4, 1 } };
205 for ( inode = 0; inode < nodes; inode++ ) {
207 if ( corner [ inode ]->giveSize() != 3 ) {
209 cor [ inode ].
at(1) = corner [ inode ]->
at(1);
210 cor [ inode ].
at(2) = corner [ inode ]->
at(2);
211 cor [ inode ].
at(3) = 0.0;
213 corner [ inode ] = & ( cor [ inode ] );
216 x += corner [ inode ]->
at(1);
217 y += corner [ inode ]->
at(2);
220 for ( iside = 0; iside < sides; iside++ ) {
221 midSide [ iside ].
resize(3);
223 nd1 = sideNode [ iside ] [ 0 ] - 1;
224 nd2 = sideNode [ iside ] [ 1 ] - 1;
226 midSide [ iside ].
at(1) = ( corner [ nd1 ]->
at(1) + corner [ nd2 ]->
at(1) ) / 2.0;
227 midSide [ iside ].
at(2) = ( corner [ nd1 ]->
at(2) + corner [ nd2 ]->
at(2) ) / 2.0;
228 midSide [ iside ].
at(3) = 0.0;
233 midNode.
at(1) = x / nodes;
234 midNode.
at(2) = y / nodes;
239 sMode, tStep, nodes, corner, midSide, midNode,
240 localNodeId, localElemId, localBcId,
241 controlNode, controlDof, aMode,
"Quad1PlaneStrain");
253 #define TR_LENGHT_REDUCT 0.3333 267 EASValsSetEdgeFlag(
true);
269 EASValsSetFillStyle(FILL_HOLLOW);
283 go = CreateQuad3D(p);
284 EGWithMaskChangeAttributes(WIDTH_MASK | FILL_MASK | COLOR_MASK | EDGE_COLOR_MASK | EDGE_FLAG_MASK | LAYER_MASK, go);
285 EGAttachObject(go, ( EObjectP )
this);
286 EMAddGraphicsToModel(ESIModel(), go);
303 EASValsSetEdgeFlag(
true);
305 EASValsSetFillStyle(FILL_HOLLOW);
319 go = CreateQuad3D(p);
320 EGWithMaskChangeAttributes(WIDTH_MASK | FILL_MASK | COLOR_MASK | EDGE_COLOR_MASK | EDGE_FLAG_MASK | LAYER_MASK, go);
321 EMAddGraphicsToModel(ESIModel(), go);
328 int i, indx, result = 0;
332 double s [ 4 ], defScale;
340 for ( i = 1; i <= 4; i++ ) {
350 for ( i = 1; i <= 4; i++ ) {
351 s [ i - 1 ] = v [ i - 1 ].
at(indx);
355 for ( i = 0; i < 4; i++ ) {
371 tr = CreateQuadWD3D(p, s [ 0 ], s [ 1 ], s [ 2 ], s [ 3 ]);
372 EGWithMaskChangeAttributes(LAYER_MASK, tr);
373 EMAddGraphicsToModel(ESIModel(), tr);
377 for ( i = 0; i < 4; i++ ) {
383 p [ i ].z = s [ i ] * landScale;
387 p [ i ].z = s [ i ] * landScale;
391 if ( fabs(s [ i ]) < 1.0e-6 ) {
399 tr = CreateQuad3D(p);
400 EGWithMaskChangeAttributes(WIDTH_MASK | COLOR_MASK | LAYER_MASK, tr);
403 tr = CreateQuadWD3D(p, s [ 0 ], s [ 1 ], s [ 2 ], s [ 3 ]);
404 EGWithMaskChangeAttributes(LAYER_MASK, tr);
407 EMAddGraphicsToModel(ESIModel(), tr);
417 for ( i = 0; i < 4; i++ ) {
431 for ( i = 0; i < 3; i++ ) {
432 pp [ i + 4 ].x = 0.5 * ( pp [ i ].x + pp [ i + 1 ].x );
433 pp [ i + 4 ].y = 0.5 * ( pp [ i ].y + pp [ i + 1 ].y );
434 pp [ i + 4 ].z = 0.5 * ( pp [ i ].z + pp [ i + 1 ].z );
437 pp [ 7 ].x = 0.5 * ( pp [ 3 ].x + pp [ 0 ].x );
438 pp [ 7 ].y = 0.5 * ( pp [ 3 ].y + pp [ 0 ].y );
439 pp [ 7 ].z = 0.5 * ( pp [ 3 ].z + pp [ 0 ].z );
441 pp [ 8 ].x = 0.25 * ( pp [ 0 ].x + pp [ 1 ].x + pp [ 2 ].x + pp [ 3 ].x );
442 pp [ 8 ].y = 0.25 * ( pp [ 0 ].y + pp [ 1 ].y + pp [ 2 ].y + pp [ 3 ].y );
443 pp [ 8 ].z = 0.25 * ( pp [ 0 ].z + pp [ 1 ].z + pp [ 2 ].z + pp [ 3 ].z );
446 const FloatArray& gpCoords = gp->giveNaturalCoordinates();
447 if ( ( gpCoords.
at(1) > 0. ) && ( gpCoords.
at(2) > 0. ) ) {
452 }
else if ( ( gpCoords.
at(1) < 0. ) && ( gpCoords.
at(2) > 0. ) ) {
457 }
else if ( ( gpCoords.
at(1) < 0. ) && ( gpCoords.
at(2) < 0. ) ) {
475 for ( i = 1; i <= 4; i++ ) {
476 s [ i - 1 ] = v [ 0 ].
at(indx);
479 for ( i = 0; i < 4; i++ ) {
480 p [ i ].x = pp [ ind.
at(i + 1) ].x;
481 p [ i ].y = pp [ ind.
at(i + 1) ].y;
482 p [ i ].z = pp [ ind.
at(i + 1) ].z;
486 tr = CreateQuadWD3D(p, s [ 0 ], s [ 1 ], s [ 2 ], s [ 3 ]);
487 EGWithMaskChangeAttributes(LAYER_MASK, tr);
488 EMAddGraphicsToModel(ESIModel(), tr);
510 double ax, ay, bx, by,
norm, xc, yc, length;
516 if ( this->
giveIPValue(cf, gp, IST_CrackedFlag, tStep) == 0 ) {
520 if ( (
int ) cf.
at(1) == 0 ) {
524 if ( this->
giveIPValue(crackDir, gp, IST_CrackDirs, tStep) ) {
525 this->
giveIPValue(crackStatuses, gp, IST_CrackStatuses, tStep);
526 for ( i = 1; i <= 3; i++ ) {
527 crackStatus = ( int ) crackStatuses.
at(i);
534 ay = crackDir.
at(3 + i);
535 if ( fabs(ax) > 1.e-6 ) {
538 norm = sqrt(bx * bx + by * by);
548 double ksi, eta, n1, n2, n3, n4;
549 ksi = gp->giveNaturalCoordinate(1);
550 eta = gp->giveNaturalCoordinate(2);
552 n1 = ( 1. + ksi ) * ( 1. + eta ) * 0.25;
553 n2 = ( 1. - ksi ) * ( 1. + eta ) * 0.25;
554 n3 = ( 1. - ksi ) * ( 1. - eta ) * 0.25;
555 n4 = ( 1. + ksi ) * ( 1. - eta ) * 0.25;
571 xc = gpglobalcoords.
at(1);
572 yc = gpglobalcoords.
at(2);
574 l [ 0 ].x = ( FPNum ) xc + bx * length;
575 l [ 0 ].y = ( FPNum ) yc + by * length;
577 l [ 1 ].x = ( FPNum ) xc - bx * length;
578 l [ 1 ].y = ( FPNum ) yc - by * length;
588 tr = CreateLine3D(l);
589 EGWithMaskChangeAttributes(WIDTH_MASK | COLOR_MASK | LAYER_MASK, tr);
590 EMAddGraphicsToModel(ESIModel(), tr);
605 for (
int i = 1; i < 5; i++ ) {
617 for (
int i = 1; i < 5; i++ ) {
CrossSection * giveCrossSection()
int testElementGraphicActivity(Element *)
Test if particular element passed fulfills various filtering criteria for its graphics output...
The element interface required by ZZNodalRecoveryModel.
virtual int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep)
Returns the integration point corresponding value in full form.
virtual IntegrationRule * giveDefaultIntegrationRulePtr()
Access method for default integration rule.
ScalarAlgorithmType getScalarAlgo()
virtual int SPRNodalRecoveryMI_giveNumberOfIP()
virtual Interface * giveInterface(InterfaceType it)
Interface requesting service.
The element interface required by ZZNodalRecoveryModel.
const FloatArray & giveSubPatchCoordinates()
Returns local sub-patch coordinates of the receiver.
AnalysisMode
Mode of analysis.
double & at(int i)
Coefficient access function.
virtual int giveInternalStateAtNode(FloatArray &answer, InternalStateType type, InternalStateMode mode, int node, TimeStep *tStep)
Returns internal state variable (like stress,strain) at node of element in Reduced form...
#define OOFEG_RAW_GEOMETRY_LAYER
EPixel getElementEdgeColor()
oofem::oofegGraphicContext gc[OOFEG_LAST_LAYER]
virtual void computeBmatrixAt(GaussPoint *gp, FloatMatrix &answer, int=1, int=ALL_STRAINS)
Computes the geometrical matrix of receiver in given integration point.
virtual void drawDeformedGeometry(oofegGraphicContext &gc, TimeStep *tStep, UnknownType)
virtual double giveCoordinate(int i)
virtual void computeNmatrixAt(const FloatArray &iLocCoord, FloatMatrix &answer)
Computes interpolation matrix for element unknowns.
virtual void HuertaErrorEstimatorI_setupRefinedElementProblem(RefinedElement *refinedElement, int level, int nodeId, IntArray &localNodeIdArray, IntArray &globalNodeIdArray, HuertaErrorEstimatorInterface::SetupMode sMode, TimeStep *tStep, int &localNodeId, int &localElemId, int &localBcId, IntArray &controlNode, IntArray &controlDof, HuertaErrorEstimator::AnalysisMode aMode)
Class implementing an array of integers.
int & at(int i)
Coefficient access function.
virtual SPRPatchType SPRNodalRecoveryMI_givePatchType()
virtual ~Quad1PlaneStrain()
#define OOFEG_DEFORMED_GEOMETRY_LAYER
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
int getInternalVarsDefGeoFlag()
EPixel getDeformedElementColor()
Class representing a general abstraction for finite element interpolation class.
InternalStateType giveIntVarType()
virtual void computeBHmatrixAt(GaussPoint *gp, FloatMatrix &answer)
Computes a matrix which, multiplied by the column matrix of nodal displacements, gives the displaceme...
#define OOFEG_CRACK_PATTERN_LAYER
EPixel getActiveCrackColor()
The element interface corresponding to HuertaErrorEstimator.
#define OOFEG_RAW_GEOMETRY_WIDTH
UnknownType
Type representing particular unknown (its physical meaning).
#define OOFEG_CRACK_PATTERN_WIDTH
virtual void HuertaErrorEstimatorI_computeNmatrixAt(GaussPoint *gp, FloatMatrix &answer)
virtual void drawRawGeometry(oofegGraphicContext &gc, TimeStep *tStep)
SetupMode
Mode for problem setup.
Wrapper around element definition to provide FEICellGeometry interface.
virtual double giveUpdatedCoordinate(int ic, TimeStep *tStep, double scale=1.)
Returns updated ic-th coordinate of receiver.
EPixel getCrackPatternColor()
Quad1PlaneStrain(int n, Domain *d)
double at(int i, int j) const
Coefficient access function.
void resize(int n)
Checks size of receiver towards requested bounds.
virtual void SPRNodalRecoveryMI_giveSPRAssemblyPoints(IntArray &pap)
int numberOfGaussPoints
Number of integration points as specified by nip.
InternalStateMode giveIntVarMode()
Class representing vector of real numbers.
Implementation of matrix containing floating point numbers.
IRResultType
Type defining the return values of InputRecord reading operations.
void setupRefinedElementProblem2D(Element *element, RefinedElement *refinedElement, int level, int nodeId, IntArray &localNodeIdArray, IntArray &globalNodeIdArray, HuertaErrorEstimatorInterface::SetupMode mode, TimeStep *tStep, int nodes, FloatArray **corner, FloatArray *midSide, FloatArray &midNode, int &localNodeId, int &localElemId, int &localBcId, IntArray &controlNode, IntArray &controlDof, HuertaErrorEstimator::AnalysisMode aMode, const char *quadtype)
double norm(const FloatArray &x)
void resize(int rows, int cols)
Checks size of receiver towards requested bounds.
static FEI2dQuadLin interp
int giveNumberOfIntegrationPoints() const
Returns number of integration points of receiver.
void zero()
Zeroes all coefficients of receiver.
#define OOFEG_DEFORMED_GEOMETRY_WIDTH
The spatial localizer element interface associated to spatial localizer.
virtual double computeVolumeAround(GaussPoint *gp)
Returns volume related to given integration point.
virtual FloatArray * giveCoordinates()
void zero()
Zeroes all coefficient of receiver.
InterfaceType
Enumerative type, used to identify interface type.
void updateFringeTableMinMax(double *s, int size)
virtual FEInterpolation * giveInterpolation() const
the oofem namespace is to define a context or scope in which all oofem names are defined.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
Node * giveNode(int i) const
Returns reference to the i-th node of element.
virtual double evaldNdx(FloatMatrix &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the matrix of derivatives of interpolation functions (shape functions) at given point...
virtual void drawSpecial(oofegGraphicContext &gc, TimeStep *tStep)
#define OOFEG_VARPLOT_PATTERN_LAYER
Class representing integration point in finite element program.
virtual void drawScalar(oofegGraphicContext &gc, TimeStep *tStep)
Class representing solution step.
virtual int computeGlobalCoordinates(FloatArray &answer, const FloatArray &lcoords)
Computes the global coordinates from given element's local coordinates.
virtual void SPRNodalRecoveryMI_giveDofMansDeterminedByPatch(IntArray &answer, int pap)
int numberOfDofMans
Number of dofmanagers.
const FloatArray & giveNaturalCoordinates()
Returns coordinate array of receiver.
void resize(int s)
Resizes receiver towards requested size.