41#include "sm/Materials/graddpmaterialextensioninterface.h"
58GradDpElement :: GradDpElement()
62GradDpElement :: setDisplacementLocationArray()
76GradDpElement :: setNonlocalLocationArray()
79 for (
int i = 1; i <=
nlSize; i++ ) {
101 double nlCumulatedStrain;
105 GradDpMaterialExtensionInterface *dpmat =
static_cast< GradDpMaterialExtensionInterface *
>(
109 OOFEM_ERROR(
"Material doesn't implement the required DpGrad interface!");
116 dpmat->giveRealStressVectorGrad(answer, localCumulatedStrain, gp, Epsilon, nlCumulatedStrain, tStep);
117 }
else if ( nlGeo == 1 ) {
121 dpmat->giveFirstPKStressVectorGrad(answer, localCumulatedStrain, gp, vF, nlCumulatedStrain, tStep);
125 dpmat->giveCauchyStressVectorGrad(answer, localCumulatedStrain, gp, vF, nlCumulatedStrain, tStep);
162 if ( matMode == _3dMat || matMode == _PlaneStrain ) {
166 }
else if ( matMode == _PlaneStress ) {
169 }
else if ( matMode == _1dMat ) {
172 OOFEM_ERROR(
"MaterialMode is not supported yet (%s)", __MaterialModeToString(matMode) );
200GradDpElement :: giveNonlocalInternalForcesVector(
FloatArray &answer,
TimeStep *tStep,
int useUpdatedGpRecord)
202 double localCumulatedStrain = 0.;
220 aux.
add(-dV * localCumulatedStrain, Nk);
231GradDpElement :: giveLocalInternalForcesVector(
FloatArray &answer,
TimeStep *tStep,
int useUpdatedGpRecord)
241 }
else if ( nlGeo == 1 ) {
259GradDpElement :: giveInternalForcesVector(
FloatArray &answer,
TimeStep *tStep,
int useUpdatedGpRecord)
265 double localCumulatedStrain = 0.;
273 this->setDisplacementLocationArray();
274 this->setNonlocalLocationArray();
276 this->computeNonlocalDegreesOfFreedom(dKappa, tStep);
280 GradDpMaterialExtensionInterface *dpmat =
dynamic_cast< GradDpMaterialExtensionInterface *
>(
283 OOFEM_ERROR(
"Material doesn't implement the required DpGrad interface!");
290 }
else if ( nlGeo == 1 ) {
293 this->computeStressVectorAndLocalCumulatedStrain(stress, localCumulatedStrain, gp, tStep);
298 this->computeNkappaMatrixAt(gp, Nk);
299 this->computeBkappaMatrixAt(gp, Bk);
301 dpmat->givePDGradMatrix_kk(lStiff, TangentStiffness, gp, tStep);
305 answerK.
add(-dV * localCumulatedStrain, Nk);
306 answerK.
add(kappa * dV, Nk);
308 if ( dpmat->giveAveragingType() == 0 || dpmat->giveAveragingType() == 1 ) {
309 double l = lStiff.
at(1, 1);
311 }
else if ( dpmat->giveAveragingType() == 2 ) {
328GradDpElement :: giveInternalForcesVector(
FloatArray &answer,
TimeStep *tStep,
int useUpdatedGpRecord)
353GradDpElement :: computeStiffnessMatrix(
FloatMatrix &answer, MatResponseMode rMode,
TimeStep *tStep)
356 this->setDisplacementLocationArray();
357 this->setNonlocalLocationArray();
367 FloatMatrix answer_uu, answer_ku, answer_uk, answer_kk;
373 GradDpMaterialExtensionInterface *dpmat =
dynamic_cast< GradDpMaterialExtensionInterface *
>(
376 OOFEM_ERROR(
"Material doesn't implement the required DpGrad interface!");
383 }
else if ( nlGeo == 1 ) {
390 this->computeNkappaMatrixAt(gp, Nk);
391 this->computeBkappaMatrixAt(gp, Bk);
393 dpmat->givePDGradMatrix_uu(D, rMode, gp, tStep);
394 dpmat->givePDGradMatrix_ku(Dku, rMode, gp, tStep);
395 dpmat->givePDGradMatrix_uk(gPSigma, rMode, gp, tStep);
396 dpmat->givePDGradMatrix_kk(lStiff, rMode, gp, tStep);
400 if ( matStiffSymmFlag ) {
410 if ( dpmat->giveAveragingType() == 2 ) {
411 double dl1, dl2, dl3;
419 dpmat->givePDGradMatrix_LD(dLdS, rMode, gp, tStep);
420 this->computeNonlocalGradient(Gk, gp, tStep);
425 n1 = {dLdS.at(1, 1), dLdS.at(2, 1)};
426 n2 = {dLdS.at(1, 2), dLdS.at(2, 2)};
430 M22.plusDyadUnsym(n2, n2, 1.);
432 dL1.at(1, 1) = dl1 * n1.at(1) * n1.at(1) + dl2 * n2.at(1) * n2.at(1);
433 dL1.at(1, 2) = dl1 * n1.at(2) * n1.at(2) + dl2 * n2.at(2) * n2.at(2);
434 dL1.at(1, 3) = dl1 * n1.at(1) * n1.at(2) + dl2 * n2.at(1) * n2.at(2);
436 LDB.beProductOf(dL1, DB);
437 GkLDB.beProductOf(Gk, LDB);
438 MGkLDB.beProductOf(M22, GkLDB);
442 M12.plusDyadUnsym(n1, n2, 1.);
443 M12.plusDyadUnsym(n2, n1, 1.);
445 dL2.at(1, 1) = dl3 * ( n1.at(1) * n2.at(1) + n1.at(1) * n2.at(1) );
446 dL2.at(1, 2) = dl3 * ( n1.at(2) * n2.at(2) + n1.at(2) * n2.at(2) );
447 dL2.at(1, 3) = dl3 * ( n1.at(2) * n2.at(1) + n1.at(1) * n2.at(2) );
450 LDB.beProductOf(dL2, DB);
451 GkLDB.beProductOf(Gk, LDB);
452 MGkLDB.beProductOf(M12, GkLDB);
462 if ( dpmat->giveAveragingType() == 0 || dpmat->giveAveragingType() == 1 ) {
463 double l = lStiff.
at(1, 1);
465 }
else if ( dpmat->giveAveragingType() == 2 ) {
474 answer_uu.
add(initialStressMatrix);
477 if ( matStiffSymmFlag ) {
481 answer.
resize(totalSize, totalSize);
484 answer.
assemble(answer_uk, locU, locK);
485 answer.
assemble(answer_ku, locK, locU);
524 GradDpMaterialExtensionInterface *dpmat =
dynamic_cast< GradDpMaterialExtensionInterface *
>(
527 OOFEM_ERROR(
"Material doesn't implement the required DpGrad interface!");
531 }
else if ( nlGeo == 1 ) {
539 dpmat->givePDGradMatrix_uu(D, rMode, gp, tStep);
542 if ( matStiffSymmFlag ) {
552 answer.
add(initialStressMatrix);
555 if ( matStiffSymmFlag ) {
576 GradDpMaterialExtensionInterface *dpmat =
dynamic_cast< GradDpMaterialExtensionInterface *
>(
579 OOFEM_ERROR(
"Material doesn't implement the required DpGrad interface!");
591 dpmat->givePDGradMatrix_ku(Dku, rMode, gp, tStep);
597 if ( dpmat->giveAveragingType() == 2 ) {
598 double dl1, dl2, dl3;
601 FloatMatrix Bk, BktM22, BktM22Gk, BktM12, BktM12Gk, M22(2, 2), M12(2, 2);
602 FloatMatrix dL1(1, 3), dL2(1, 3), result1, result2, dLdS, n(2, 2);
605 dpmat->givePDGradMatrix_uu(D, rMode, gp, tStep);
606 dpmat->givePDGradMatrix_LD(dLdS, rMode, gp, tStep);
613 n.
at(1, 1) = dLdS.
at(1, 1);
614 n.
at(1, 2) = dLdS.
at(1, 2);
615 n.
at(2, 1) = dLdS.
at(2, 1);
616 n.
at(2, 2) = dLdS.
at(2, 2);
619 M22.at(1, 1) = n.
at(1, 2) * n.
at(1, 2);
620 M22.at(1, 2) = n.
at(1, 2) * n.
at(2, 2);
621 M22.at(2, 1) = n.
at(2, 2) * n.
at(1, 2);
622 M22.at(2, 2) = n.
at(2, 2) * n.
at(2, 2);
624 dL1.at(1, 1) = dl1 * n.
at(1, 1) * n.
at(1, 1) + dl2 *n.
at(1, 2) * n.
at(1, 2);
625 dL1.at(1, 2) = dl1 * n.
at(2, 1) * n.
at(2, 1) + dl2 *n.
at(2, 2) * n.
at(2, 2);
626 dL1.at(1, 3) = dl1 * n.
at(1, 1) * n.
at(2, 1) + dl2 *n.
at(1, 2) * n.
at(2, 2);
634 answer.
add(dV, result1);
641 M12.
at(1, 1) = n.
at(1, 1) * n.
at(1, 2) + n.
at(1, 2) * n.
at(1, 1);
642 M12.
at(1, 2) = n.
at(1, 1) * n.
at(2, 2) + n.
at(1, 2) * n.
at(2, 1);
643 M12.
at(2, 1) = n.
at(2, 1) * n.
at(1, 2) + n.
at(2, 2) * n.
at(1, 1);
644 M12.
at(2, 2) = n.
at(2, 1) * n.
at(2, 2) + n.
at(2, 2) * n.
at(2, 1);
646 dL2.at(1, 1) = dl3 * ( n.
at(1, 1) * n.
at(1, 2) + n.
at(1, 1) * n.
at(1, 2) );
647 dL2.at(1, 2) = dl3 * ( n.
at(2, 1) * n.
at(2, 2) + n.
at(2, 1) * n.
at(2, 2) );
648 dL2.at(1, 3) = dl3 * ( n.
at(1, 2) * n.
at(2, 1) + n.
at(1, 1) * n.
at(2, 2) );
655 answer.
add(dV, result2);
679 GradDpMaterialExtensionInterface *dpmat =
dynamic_cast< GradDpMaterialExtensionInterface *
>(
682 OOFEM_ERROR(
"Material doesn't implement the required DpGrad interface!");
689 dpmat->givePDGradMatrix_kk(lStiff, rMode, gp, tStep);
691 if ( dpmat->giveAveragingType() == 0 || dpmat->giveAveragingType() == 1 ) {
692 double l = lStiff.
at(1, 1);
694 }
else if ( dpmat->giveAveragingType() == 2 ) {
716 GradDpMaterialExtensionInterface *dpmat =
dynamic_cast< GradDpMaterialExtensionInterface *
>(
719 OOFEM_ERROR(
"Material doesn't implement the required DpGrad interface!");
721 dpmat->givePDGradMatrix_uk(gPSigma, rMode, gp, tStep);
virtual bool isCharacteristicMtrxSymmetric(MatResponseMode rMode) const
EngngModel * giveEngngModel()
virtual IntegrationRule * giveIntegrationRule(int i)
CrossSection * giveCrossSection()
virtual double computeVolumeAround(GaussPoint *gp)
virtual fMode giveFormulation()
Domain * giveDomain() const
Domain * domain
Link to domain object, useful for communicating with other FEM components.
void assemble(const FloatArray &fe, const IntArray &loc)
void plusProduct(const FloatMatrix &b, const FloatArray &s, double dV)
double dotProduct(const FloatArray &x) const
Index giveSize() const
Returns the size of receiver.
void zero()
Zeroes all coefficients of receiver.
void beProductOf(const FloatMatrix &aMatrix, const FloatArray &anArray)
void beTProductOf(const FloatMatrix &aMatrix, const FloatArray &anArray)
void add(const FloatArray &src)
void plusProductSymmUpper(const FloatMatrix &a, const FloatMatrix &b, double dV)
void add(const FloatMatrix &a)
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)
void beProductOf(const FloatMatrix &a, const FloatMatrix &b)
void zero()
Zeroes all coefficient of receiver.
void assemble(const FloatMatrix &src, const IntArray &loc)
double at(std::size_t i, std::size_t j) const
void beTProductOf(const FloatMatrix &a, const FloatMatrix &b)
MaterialMode giveMaterialMode()
Returns corresponding material mode of receiver.
void computeDisplacementDegreesOfFreedom(FloatArray &answer, TimeStep *tStep)
void setNonlocalLocationArray()
void giveLocalInternalForcesVector(FloatArray &answer, TimeStep *tStep, int useUpdatedGpRecord)
void computeStressVectorAndLocalCumulatedStrain(FloatArray &answer, double localCumulatedPlasticStrain, GaussPoint *gp, TimeStep *tStep)
void computeLocalStrainVector(FloatArray &answer, GaussPoint *gp, TimeStep *tStep)
void computeStiffnessMatrix_ku(FloatMatrix &, MatResponseMode, TimeStep *)
virtual StructuralElement * giveStructuralElement()=0
void computeNonlocalCumulatedStrain(double &answer, GaussPoint *gp, TimeStep *tStep)
virtual void computeBkappaMatrixAt(GaussPoint *gp, FloatMatrix &answer)=0
void computeDeformationGradientVector(FloatArray &answer, GaussPoint *gp, TimeStep *tStep)
void computeNonlocalDegreesOfFreedom(FloatArray &answer, TimeStep *tStep)
void giveNonlocalInternalForcesVector(FloatArray &answer, TimeStep *tStep, int useUpdatedGpRecord)
void computeNonlocalGradient(FloatArray &answer, GaussPoint *gp, TimeStep *tStep)
void computeStiffnessMatrix_uk(FloatMatrix &, MatResponseMode, TimeStep *)
virtual void computeNkappaMatrixAt(GaussPoint *gp, FloatArray &answer)=0
void computeStiffnessMatrix_uu(FloatMatrix &, MatResponseMode, TimeStep *)
void computeStiffnessMatrix_kk(FloatMatrix &, MatResponseMode, TimeStep *)
void setDisplacementLocationArray()
virtual NLStructuralElement * giveNLStructuralElement()=0
void computeInitialStressMatrix(FloatMatrix &answer, TimeStep *tStep) override
virtual void computeBHmatrixAt(GaussPoint *gp, FloatMatrix &answer)
virtual Interface * giveMaterialInterface(InterfaceType t, IntegrationPoint *ip)
StructuralCrossSection * giveStructuralCrossSection()
Helper function which returns the structural cross-section for the element.
virtual void computeBmatrixAt(GaussPoint *gp, FloatMatrix &answer, int lowerIndx=1, int upperIndx=ALL_STRAINS)=0
const FloatArray & giveTempStressVector() const
Returns the const pointer to receiver's temporary stress vector.