51StructuralElementEvaluator :: StructuralElementEvaluator()
81int StructuralElementEvaluator :: giveIntegrationElementLocalCodeNumbers(
IntArray &answer,
Element *elem,
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 ) {
128void StructuralElementEvaluator :: giveCharacteristicMatrix(
FloatMatrix &answer,
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);
206void StructuralElementEvaluator :: computeConsistentMassMatrix(
FloatMatrix &answer,
TimeStep *tStep,
double &mass)
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;
260void StructuralElementEvaluator :: giveInternalForcesVector(
FloatArray &answer,
TimeStep *tStep,
bool useUpdatedGpRecord)
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) );
340void StructuralElementEvaluator :: updateInternalState(
TimeStep *tStep)
350 if ( initialDisplacements ) {
359#ifdef __MPI_PARALLEL_MODE
372void StructuralElementEvaluator :: computeStiffnessMatrix(
FloatMatrix &answer, MatResponseMode rMode,
TimeStep *tStep)
374 int numberOfIntegrationRules;
382 answer.
resize(ndofs, ndofs);
392 for (
int ir = 0; ir < numberOfIntegrationRules; ir++ ) {
393#ifdef __MPI_PARALLEL_MODE
408 if ( matStiffSymmFlag ) {
415 if ( matStiffSymmFlag ) {
virtual double give(CrossSectionProperty a, GaussPoint *gp) const
virtual FEInterpolation * giveInterpolation() const
virtual int computeNumberOfDofs()
virtual void giveDofManDofIDMask(int inode, IntArray &answer) const
int giveNumberOfIntegrationRules()
void computeVectorOf(ValueModeType u, TimeStep *tStep, FloatArray &answer)
virtual IntegrationRule * giveIntegrationRule(int i)
virtual int giveNumberOfDofManagers() const
CrossSection * giveCrossSection()
virtual Element_Geometry_Type giveGeometryType() const =0
virtual int giveKnotSpanBasisFuncMask(const IntArray &knotSpan, IntArray &mask) const
virtual bool hasSubPatchFormulation() const
virtual int giveNsd(const Element_Geometry_Type) const =0
void assemble(const FloatArray &fe, const IntArray &loc)
void plusProduct(const FloatMatrix &b, const FloatArray &s, double dV)
Index giveSize() const
Returns the size of receiver.
void zero()
Zeroes all coefficients of receiver.
void beProductOf(const FloatMatrix &aMatrix, const FloatArray &anArray)
void subtract(const FloatArray &src)
void plusProductSymmUpper(const FloatMatrix &a, const FloatMatrix &b, double dV)
void resize(Index rows, Index cols)
*Sets size of receiver to be an empty matrix It will have zero rows and zero columns size void clear()
void plusProductUnsym(const FloatMatrix &a, const FloatMatrix &b, double dV)
int giveNumberOfColumns() const
Returns number of columns of receiver.
void beProductOf(const FloatMatrix &a, const FloatMatrix &b)
void zero()
Zeroes all coefficient of receiver.
int giveNumberOfRows() const
Returns number of rows of receiver.
void assemble(const FloatMatrix &src, const IntArray &loc)
double at(std::size_t i, std::size_t j) const
MaterialMode giveMaterialMode()
Returns corresponding material mode of receiver.
IntegrationRule * giveIntegrationRule()
Returns corresponding integration rule to receiver.
const IntArray * giveKnotSpan() override
Returns receiver sub patch indices (if apply).
void followedBy(const IntArray &b, int allocChunk=0)
bool isCharacteristicMtrxSymmetric(MatResponseMode mode) const override=0
virtual void giveInternalForcesVector(FloatArray &answer, TimeStep *tStep, bool useUpdatedGpRecord=false)
virtual void computeNMatrixAt(FloatMatrix &answer, GaussPoint *gp)=0
virtual void computeStressVector(FloatArray &answer, const FloatArray &strain, GaussPoint *gp, TimeStep *tStep)=0
virtual void computeLumpedMassMatrix(FloatMatrix &answer, TimeStep *tStep)
virtual void computeConsistentMassMatrix(FloatMatrix &answer, TimeStep *tStep, double &mass)
FloatMatrix rotationMatrix
virtual double computeVolumeAround(GaussPoint *gp)
virtual void giveMassMtrxIntegrationMask(IntArray &answer)
void computeStrainVector(FloatArray &answer, GaussPoint *gp, TimeStep *tStep, FloatArray &u)
virtual Element * giveElement()=0
virtual void computeStiffnessMatrix(FloatMatrix &answer, MatResponseMode rMode, TimeStep *tStep)
virtual void computeConstitutiveMatrixAt(FloatMatrix &answer, MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep)=0
virtual void computeBMatrixAt(FloatMatrix &answer, GaussPoint *gp)=0
bool isActivated(TimeStep *tStep)
virtual int giveIntegrationElementLocalCodeNumbers(IntArray &answer, Element *elem, IntegrationRule *ie)
virtual IntegrationRule * giveMassMtrxIntegrationRule()
StructuralCrossSection * giveStructuralCrossSection()
Helper function which returns the structural cross-section for the element.
const FloatArray & giveStressVector() const
Returns the const pointer to receiver's stress vector.
@ Element_remote
Element in active domain is only mirror of some remote element.
const char * __CharTypeToString(CharType _value)