35 #include "../sm/Elements/Bars/truss1d.h" 36 #include "../sm/CrossSections/structuralcrosssection.h" 92 answer.
at(1, 1) = halfMass;
93 answer.
at(2, 2) = halfMass;
131 answer.
at(1, 1) = n.
at(1);
132 answer.
at(1, 2) = n.
at(2);
169 int &localNodeId,
int &localElemId,
int &localBcId,
173 int inode, nodes = 2;
179 for ( inode = 0; inode < nodes; inode++ ) {
181 if ( corner [ inode ]->giveSize() != 3 ) {
183 cor [ inode ].
at(1) = corner [ inode ]->
at(1);
184 cor [ inode ].
at(2) = 0.0;
185 cor [ inode ].
at(3) = 0.0;
187 corner [ inode ] = & ( cor [ inode ] );
190 x += corner [ inode ]->
at(1);
195 midNode.
at(1) = x / nodes;
201 sMode, tStep, nodes, corner, midNode,
202 localNodeId, localElemId, localBcId,
203 controlNode, controlDof, aMode,
"Truss1d");
232 go = CreateLine3D(p);
233 EGWithMaskChangeAttributes(WIDTH_MASK | COLOR_MASK | LAYER_MASK, go);
234 EGAttachObject(go, ( EObjectP )
this);
235 EMAddGraphicsToModel(ESIModel(), go);
259 go = CreateLine3D(p);
260 EGWithMaskChangeAttributes(WIDTH_MASK | COLOR_MASK | LAYER_MASK, go);
261 EMAddGraphicsToModel(ESIModel(), go);
267 int i, indx, result = 0;
271 double s [ 2 ], defScale;
293 s [ 0 ] = v1.
at(indx);
294 s [ 1 ] = v2.
at(indx);
299 for ( i = 0; i < 2; i++ ) {
314 tr = CreateLine3D(p);
315 EGWithMaskChangeAttributes(LAYER_MASK, tr);
316 EMAddGraphicsToModel(ESIModel(), tr);
320 for ( i = 0; i < 2; i++ ) {
326 p [ i ].z = s [ i ] * landScale;
330 p [ i ].z = s [ i ] * landScale;
342 pp [ 0 ].x = p [ 0 ].x;
345 pp [ 1 ].x = p [ 0 ].x;
347 pp [ 1 ].z = p [ 0 ].z;
348 pp [ 2 ].x = p [ 1 ].x;
350 pp [ 2 ].z = p [ 1 ].z;
351 pp [ 3 ].x = p [ 1 ].x;
354 tr = CreateQuad3D(pp);
358 EASValsSetFillStyle(FILL_HOLLOW);
359 EGWithMaskChangeAttributes(WIDTH_MASK | FILL_MASK | COLOR_MASK | LAYER_MASK, tr);
360 EMAddGraphicsToModel(ESIModel(), tr);
364 tr = CreateLine3D(p);
365 EGWithMaskChangeAttributes(WIDTH_MASK | COLOR_MASK | LAYER_MASK, tr);
366 EMAddGraphicsToModel(ESIModel(), tr);
CrossSection * giveCrossSection()
int testElementGraphicActivity(Element *)
Test if particular element passed fulfills various filtering criteria for its graphics output...
InternalStateType
Type representing the physical meaning of element or constitutive model internal variable.
The element interface required by NodalAvergagingRecoveryModel.
virtual void NodalAveragingRecoveryMI_computeNodalValue(FloatArray &answer, int node, InternalStateType type, TimeStep *tStep)
Computes the element value in given node.
virtual int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep)
Returns the integration point corresponding value in full form.
virtual double computeLength()
Computes the length (zero for all but 1D geometries)
ScalarAlgorithmType getScalarAlgo()
virtual FEInterpolation * giveInterpolation() const
virtual void HuertaErrorEstimatorI_computeNmatrixAt(GaussPoint *gp, FloatMatrix &answer)
virtual void giveDofManDofIDMask(int inode, IntArray &) const
Returns dofmanager dof mask for node.
The element interface required by ZZNodalRecoveryModel.
virtual void drawScalar(oofegGraphicContext &gc, TimeStep *tStep)
const FloatArray & giveSubPatchCoordinates()
Returns local sub-patch coordinates of the receiver.
virtual void computeConstitutiveMatrixAt(FloatMatrix &answer, MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep)
Computes constitutive matrix of 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
oofem::oofegGraphicContext gc[OOFEG_LAST_LAYER]
virtual void evalN(FloatArray &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the array of interpolation functions (shape functions) at given point.
virtual void drawRawGeometry(oofegGraphicContext &gc, TimeStep *tStep)
virtual Interface * giveInterface(InterfaceType it)
Interface requesting service.
virtual double computeVolumeAround(GaussPoint *gp)
Returns volume related to given integration point.
virtual double giveCoordinate(int i)
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 implementing an array of integers.
MatResponseMode
Describes the character of characteristic material matrix.
#define OOFEG_DEFORMED_GEOMETRY_LAYER
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)
virtual void computeBHmatrixAt(GaussPoint *gp, FloatMatrix &answer)
virtual double giveTransformationJacobian(const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the determinant of the transformation.
int getInternalVarsDefGeoFlag()
EPixel getDeformedElementColor()
Class representing a general abstraction for finite element interpolation class.
virtual double evaldNdx(FloatMatrix &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the matrix of derivatives of interpolation functions (shape functions) at given point...
Truss1d(int n, Domain *d)
InternalStateType giveIntVarType()
Abstract base class for all "structural" finite elements.
The element interface corresponding to ZZErrorEstimator.
The element interface corresponding to HuertaErrorEstimator.
virtual void computeBmatrixAt(GaussPoint *gp, FloatMatrix &answer, 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.
void setupRefinedElementProblem1D(Element *element, RefinedElement *refinedElement, int level, int nodeId, IntArray &localNodeIdArray, IntArray &globalNodeIdArray, HuertaErrorEstimatorInterface::SetupMode mode, TimeStep *tStep, int nodes, FloatArray **corner, FloatArray &midNode, int &localNodeId, int &localElemId, int &localBcId, IntArray &controlNode, IntArray &controlDof, HuertaErrorEstimator::AnalysisMode aMode, const char *edgetype)
UnknownType
Type representing particular unknown (its physical meaning).
StructuralCrossSection * giveStructuralCrossSection()
Helper function which returns the structural cross-section for the element.
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.
double at(int i, int j) const
Coefficient access function.
virtual int setupIntegrationPoints(IntegrationRule &irule, int npoints, Element *element)
Sets up integration rule for the given element.
InternalStateMode giveIntVarMode()
virtual void computeLumpedMassMatrix(FloatMatrix &answer, TimeStep *tStep)
Computes lumped mass matrix of receiver.
Class representing vector of real numbers.
Implementation of matrix containing floating point numbers.
virtual double give(CrossSectionProperty a, GaussPoint *gp)
Returns the value of cross section property at given point.
void resize(int rows, int cols)
Checks size of receiver towards requested bounds.
virtual void giveRealStress_1d(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedStrain, TimeStep *tStep)=0
#define OOFEG_DEFORMED_GEOMETRY_WIDTH
void beTranspositionOf(const FloatMatrix &src)
Assigns to the receiver the transposition of parameter.
The spatial localizer element interface associated to spatial localizer.
std::vector< std::unique_ptr< IntegrationRule > > integrationRulesArray
List of integration rules of receiver (each integration rule contains associated integration points a...
virtual FloatArray * giveCoordinates()
void zero()
Zeroes all coefficient of receiver.
virtual void giveStiffnessMatrix_1d(FloatMatrix &answer, MatResponseMode mode, GaussPoint *gp, TimeStep *tStep)=0
InterfaceType
Enumerative type, used to identify interface type.
virtual void drawDeformedGeometry(oofegGraphicContext &gc, TimeStep *tStep, UnknownType)
virtual void computeNmatrixAt(const FloatArray &iLocCoord, FloatMatrix &answer)
Computes interpolation matrix for element unknowns.
the oofem namespace is to define a context or scope in which all oofem names are defined.
Node * giveNode(int i) const
Returns reference to the i-th node of element.
virtual void computeGaussPoints()
Initializes the array of integration rules member variable.
#define OOFEG_VARPLOT_PATTERN_LAYER
Class representing integration point in finite element program.
Class representing solution step.
int numberOfDofMans
Number of dofmanagers.
const FloatArray & giveNaturalCoordinates()
Returns coordinate array of receiver.
Class representing Gaussian-quadrature integration rule.
void resize(int s)
Resizes receiver towards requested size.