35 #include "../sm/Elements/structuralelementevaluator.h" 36 #include "../sm/Elements/structuralelement.h" 37 #include "../sm/CrossSections/structuralcrosssection.h" 38 #include "../sm/Materials/structuralmaterial.h" 39 #include "../sm/Materials/structuralms.h" 85 IntArray mask, nodeDofIDMask, nodalArray;
90 dofmandof = nodeDofIDMask.
giveSize();
100 for (
int i = 1; i <= mask.
giveSize(); i++ ) {
102 for (
int j = 1; j <= nsd; j++ ) {
103 nodalArray.
at(j) = dofmandof * ( mask.
at(i) - 1 ) + j;
118 if ( type == InternalForcesVector ) {
120 }
else if ( type == LastEquilibratedInternalForcesVector ) {
134 if ( mtrx == TangentStiffnessMatrix ) {
136 }
else if ( mtrx == MassMatrix ) {
139 }
else if ( mtrx == LumpedMassMatrix ) {
154 int indx = 0, ldofs, dim;
159 answer.
resize(ndofs, ndofs);
167 for (
int i = 1; i <= numberOfDofMans; i++ ) {
169 for (
int j = 1; j <= nodeDofIDMask.
giveSize(); j++ ) {
172 for (
int k = 1; k <= ldofs; k++ ) {
174 answer.
at(indx, k) = 0.;
175 answer.
at(k, indx) = 0.;
179 if ( ( nodeDofIDMask.
at(j) != D_u ) && ( nodeDofIDMask.
at(j) != D_v ) && ( nodeDofIDMask.
at(j) != D_w ) ) {
181 answer.
at(indx, indx) = 0.;
182 }
else if ( nodeDofIDMask.
at(j) == D_u ) {
184 }
else if ( nodeDofIDMask.
at(j) == D_v ) {
186 }
else if ( nodeDofIDMask.
at(j) == D_w ) {
192 if ( indx != ldofs ) {
196 dim = dimFlag.
at(1) + dimFlag.
at(2) + dimFlag.
at(3);
198 for (
int k = 1; k <= ldofs; k++ ) {
199 summ += answer.
at(k, k);
202 answer.
times(dim * mass / summ);
216 answer.
resize(ndofs, ndofs);
233 mass += density * dV;
239 for (
int i = 1; i <= ndofs; i++ ) {
240 for (
int j = i; j <= ndofs; j++ ) {
243 if ( mask.
at(k) == 0 ) {
247 summ += n.
at(k, i) * n.
at(k, j);
250 answer.
at(i, j) += summ * density * dV;
279 for (
int ir = 0; ir < numberOfIntegrationRules; ir++ ) {
284 if ( useUpdatedGpRecord ) {
333 for (
int i = 1; i <= lc.
giveSize(); i++ ) {
334 ur.
at(i) = u.
at( lc.
at(i) );
350 if ( initialDisplacements ) {
359 #ifdef __PARALLEL_MODE 374 int numberOfIntegrationRules;
382 answer.
resize(ndofs, ndofs);
392 for (
int ir = 0; ir < numberOfIntegrationRules; ir++ ) {
393 #ifdef __PARALLEL_MODE 408 if ( matStiffSymmFlag ) {
415 if ( matStiffSymmFlag ) {
static int giveSizeOfVoigtSymVector(MaterialMode mmode)
Returns the size of symmetric part of a reduced stress/strain vector according to given mode...
CrossSection * giveCrossSection()
MaterialMode giveMaterialMode()
Returns corresponding material mode of receiver.
int giveNumberOfColumns() const
Returns number of columns of receiver.
void subtract(const FloatArray &src)
Subtracts array src to receiver.
virtual IntegrationRule * giveMassMtrxIntegrationRule()
Returns the integration rule for mass matrices, if relevant.
void computeVectorOf(ValueModeType u, TimeStep *tStep, FloatArray &answer)
Returns local vector of unknowns.
virtual int computeNumberOfDofs()
Computes or simply returns total number of element's local DOFs.
virtual IntegrationRule * giveIntegrationRule(int i)
virtual void computeNMatrixAt(FloatMatrix &answer, GaussPoint *gp)=0
Computes the matrix for which the unknown field is obtained, typically [N1, 0, N2, 0, ...; 0, N1, 0, N2, ...].
virtual void computeLumpedMassMatrix(FloatMatrix &answer, TimeStep *tStep)
Computes lumped mass matrix of receiver.
bool isEmpty() const
Checks if receiver is empty (i.e., zero sized).
virtual void giveCharacteristicVector(FloatArray &answer, CharType type, ValueModeType mode, TimeStep *tStep)
double & at(int i)
Coefficient access function.
ValueModeType
Type representing the mode of UnknownType or CharType, or similar types.
This class implements a structural material status information.
void clear()
Clears receiver (zero size).
virtual void giveDofManDofIDMask(int inode, IntArray &answer) const
Returns dofmanager dof mask for node.
Abstract base class for all finite elements.
virtual int giveIntegrationElementLocalCodeNumbers(IntArray &answer, Element *elem, IntegrationRule *ie)
Assembles the local element code numbers of given integration element (sub-patch) This is done by obt...
void computeStrainVector(FloatArray &answer, GaussPoint *gp, TimeStep *tStep, FloatArray &u)
Optimized version, allowing to pass element displacements as parameter.
virtual int giveKnotSpanBasisFuncMask(const IntArray &knotSpan, IntArray &mask)
Returns indices (zero based) of nonzero basis functions for given knot span.
virtual void computeConsistentMassMatrix(FloatMatrix &answer, TimeStep *tStep, double &mass)
Computes consistent mass matrix of receiver using numerical integration over element volume...
virtual double computeVolumeAround(GaussPoint *gp)
Class implementing an array of integers.
int & at(int i)
Coefficient access function.
MatResponseMode
Describes the character of characteristic material matrix.
virtual int giveNumberOfDofManagers() const
virtual Element * giveElement()=0
virtual FEInterpolation * giveInterpolation() const
virtual void computeStressVector(FloatArray &answer, const FloatArray &strain, GaussPoint *gp, TimeStep *tStep)=0
Computes the stress vector.
Abstract base class representing integration rule.
virtual void giveCharacteristicMatrix(FloatMatrix &answer, CharType mtrx, TimeStep *tStep)
int giveNumberOfIntegrationRules()
void plusProductUnsym(const FloatMatrix &a, const FloatMatrix &b, double dV)
Adds to the receiver the product .
Abstract base class for all "structural" finite elements.
virtual void computeConstitutiveMatrixAt(FloatMatrix &answer, MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep)=0
Computes constitutive matrix of receiver.
virtual bool isCharacteristicMtrxSymmetric(MatResponseMode mode)=0
Check for symmetry of stiffness matrix.
virtual void computeStiffnessMatrix(FloatMatrix &answer, MatResponseMode rMode, TimeStep *tStep)
const IntArray * giveKnotSpan()
Returns receiver sub patch indices (if apply).
void clear()
Clears the array (zero size).
StructuralCrossSection * giveStructuralCrossSection()
Helper function which returns the structural cross-section for the element.
void times(double f)
Multiplies receiver by factor f.
const char * __CharTypeToString(CharType _value)
void beProductOf(const FloatMatrix &aMatrix, const FloatArray &anArray)
Receiver becomes the result of the product of aMatrix and anArray.
virtual bool hasSubPatchFormulation()
Returns true, if receiver is formulated on sub-patch basis.
void plusProductSymmUpper(const FloatMatrix &a, const FloatMatrix &b, double dV)
Adds to the receiver the product .
double at(int i, int j) const
Coefficient access function.
void resize(int n)
Checks size of receiver towards requested bounds.
IntegrationRule * giveIntegrationRule()
Returns corresponding integration rule to receiver.
virtual void giveInternalForcesVector(FloatArray &answer, TimeStep *tStep, bool useUpdatedGpRecord=false)
Class representing vector of real numbers.
Implementation of matrix containing floating point numbers.
void updateInternalState(TimeStep *tStep)
virtual double give(CrossSectionProperty a, GaussPoint *gp)
Returns the value of cross section property at given point.
void assemble(const FloatArray &fe, const IntArray &loc)
Assembles the array fe (typically, the load vector of a finite element) into the receiver, using loc as location array.
void resize(int rows, int cols)
Checks size of receiver towards requested bounds.
StructuralElementEvaluator()
void followedBy(const IntArray &b, int allocChunk=0)
Appends array b at the end of receiver.
void zero()
Zeroes all coefficients of receiver.
virtual void giveMassMtrxIntegrationMask(IntArray &answer)
Returns mask indicating, which unknowns (their type and ordering is the same as element unknown vecto...
virtual elementParallelMode giveKnotSpanParallelMode(int) const
Returns the parallel mode for particular knot span of the receiver.
Element in active domain is only mirror of some remote element.
void zero()
Zeroes all coefficient of receiver.
IntegrationElement represent nonzero knot span, derived from Integration Rule.
void beProductOf(const FloatMatrix &a, const FloatMatrix &b)
Assigns to the receiver product of .
bool isActivated(TimeStep *tStep)
int giveSize() const
Returns the size of receiver.
Abstract base class for all structural cross section models.
the oofem namespace is to define a context or scope in which all oofem names are defined.
void assemble(const FloatMatrix &src, const IntArray &loc)
Assembles the contribution using localization array into receiver.
void clear()
Sets size of receiver to be an empty matrix. It will have zero rows and zero columns size...
int giveNumberOfRows() const
Returns number of rows of receiver.
void symmetrized()
Initializes the lower half of the receiver according to the upper half.
Class representing integration point in finite element program.
Class representing solution step.
virtual void computeBMatrixAt(FloatMatrix &answer, GaussPoint *gp)=0
virtual int giveNsd()=0
Returns number of spatial dimensions.
FloatMatrix rotationMatrix
void resize(int s)
Resizes receiver towards requested size.
void plusProduct(const FloatMatrix &b, const FloatArray &s, double dV)
Adds the product .