56IntElLine1PF :: IntElLine1PF(
int n,
Domain *aDomain) :
82 answer.
at(1, 1) = answer.
at(2, 2) = -
N.at(1);
83 answer.
at(1, 3) = answer.
at(2, 4) = -
N.at(2);
85 answer.
at(1, 5) = answer.
at(2, 6) =
N.at(1);
86 answer.
at(1, 7) = answer.
at(2, 8) =
N.at(2);
91IntElLine1PF :: computeGaussPoints()
111 double X1_i = 0.5 * ( this->
giveNode(i)->giveCoordinate(1) + this->
giveNode(i + numNodes / 2)->giveCoordinate(1) );
112 double X2_i = 0.5 * ( this->
giveNode(i)->giveCoordinate(2) + this->
giveNode(i + numNodes / 2)->giveCoordinate(2) );
113 G.
at(1) += dNdxi.
at(i, 1) * X1_i;
114 G.
at(2) += dNdxi.
at(i, 1) * X2_i;
132 StructuralInterfaceElement :: initializeFrom(ir);
142IntElLine1PF :: giveDofManDofIDMask(
int inode,
IntArray &answer)
const
144 answer = {D_u, D_v, T_f};
157 answer.
at(1, 1) = G.
at(1);
158 answer.
at(2, 1) = G.
at(2);
159 answer.
at(1, 2) = -G.
at(2);
160 answer.
at(2, 2) = G.
at(1);
166IntElLine1PF :: giveInterpolation()
const
184 answer.
resize( nDofs, nDofs );
214 bool matStiffSymmFlag = this->
giveCrossSection()->isCharacteristicMtrxSymmetric(rMode);
245 if ( matStiffSymmFlag ) {
252 if ( matStiffSymmFlag ) {
264 FloatArray a_u, traction, tractionTemp, jump, fu, fd(2), fd4(4);
270 a_d = { a_d_temp.
at(1), a_d_temp.
at(2) };
294 indxu = {1, 2, 3, 4, 5, 6, 7, 8};
305 FloatArray a_u_ref, a_d_pert, a_d_ref, fu_ref, fd_ref, fu_pert, K_col, fd_temp, delta_a_d_ref, delta_a_d_pert;
314 for (
int i = 1; i <=2; i++ ) {
316 a_d_pert.
at(i) += eps;
319 delta_a_d_pert = delta_a_d_ref;
320 delta_a_d_pert.
at(i) += eps;
324 K_col = ( 1.0/eps ) * ( fu_pert - fu_ref );
325 K_num.addSubVectorCol(K_col, 1, i);
329 answer.
assemble(K_num, indxu, indx1);
330 answer.
assemble(K_num, indxu, indx2);
350 double kp = this->givePenaltyParameter();
353 answer.
resize( ndofs_d, ndofs_d );
375 double factorN = -kp *
neg_MaCauleyPrime(Delta_d/Delta_t)/Delta_t + g_c / l + Gbis * Psibar;
381 tempN.beDyadicProductOf(Nd, Nd);
382 temp.
add(factorN * dA, tempN);
385 double factorB = g_c * l;
386 tempB.beDyadicProductOf(Bd, Bd);
387 temp.
add(factorB * dA, tempB);
390 IntArray indx1 = {1, 2}, indx2 = {3, 4};
392 answer.
assemble(temp, indx1, indx1);
393 answer.
assemble(temp, indx2, indx2);
398 FloatArray a_u_ref, a_d_ref, a_d_pert, fu_ref, fd_ref, fd_pert, K_col, fu_temp;
406 for (
int i = 1; i <=2; i++ ) {
408 a_d_pert.
at(i) += eps;
412 K_col = ( 1.0/eps ) * ( fd_pert - fd_ref );
413 K.addSubVectorCol(K_col, 1, i);
419 answer.
assemble(Kdd_num, indx1, indx1);
420 answer.
assemble(Kdd_num, indx2, indx2);
442 FloatArray a_u, a_d_temp, a_d(2), traction, jump, fd(2), fd_ref(2), Nd, Bd;
446 double kp = this->givePenaltyParameter();
456 for (
int nIter = 1; nIter <= 10; nIter++ ) {
475 double Gprim = -2.0 * (1.0 - d);
478 double sectionalForcesScal = -kp *
neg_MaCauley(Delta_d/Delta_t) + g_c / l * d + Gprim * Psibar;
479 double sectionalForcesVec = g_c * l * gradd;
480 fd = fd + ( Nd*sectionalForcesScal + Bd*sectionalForcesVec ) * dA;
481 fd_ref = fd_ref + ( Nd * (Gprim * Psibar + 1.0e-8 ) ) * dA;
488 double factorN = -kp *
neg_MaCauleyPrime(Delta_d/Delta_t)/Delta_t + g_c / l + Gbis * Psibar;
492 Kdd.add(factorN * dA, tempN);
495 double factorB = g_c * l;
497 Kdd.add(factorB * dA, tempB);
502 if ( fd.computeNorm()/fd_ref.computeNorm() < 1.0e-3 ) {
506 Kdd.solveForRhs(fd, delta_a_d);
507 a_d.subtract(delta_a_d);
512 printf(
"norm %e \n", fd.computeNorm()/fd_ref.computeNorm() );
513 OOFEM_ERROR(
"No convergence in phase field iterations")
528 if ( strain.at(3) < 0.0 ) {
532 g2 = (1.0 - d) * (1.0 - d);
537 double g1 = (1.0 - d) * (1.0 - d);
553 if ( valueMode == VM_Total ) {
558 }
else if ( valueMode == VM_Incremental ) {
608 FloatArray a_u, a_d_temp, a_d, traction, jump, fd(2), Nd, Bd, GTraction;
612 a_d = { a_d_temp.
at(1), a_d_temp.
at(2) };
648 double kp = this->givePenaltyParameter();
661 double sectionalForcesScal = -kp *
neg_MaCauley(Delta_d/Delta_t) + g_c / l * d + Gprim * Psibar;
663 double sectionalForcesVec = g_c * l * gradd;
664 fd = fd + ( Nd*sectionalForcesScal + Bd*sectionalForcesVec ) * dA;
689 if ( strain.
at(3) < 0.0 ) {
690 return 0.5 * ( stress.
at(1)*strain.
at(1) + stress.
at(2)*strain.
at(2) );
703 return (1.0 - d) * (1.0 - d) + r0;
708IntElLine1PF :: giveDofManDofIDMask_u(
IntArray &answer)
716IntElLine1PF :: giveDofManDofIDMask_d(
IntArray &answer)
723IntElLine1PF :: computeLocationArrayOfDofIDs(
const IntArray &dofIdArray,
IntArray &answer )
732 for(
int j = 1; j <= dofIdArray.
giveSize( ); j++) {
764 answer.
at(i) = dNdxi.
at(i,1);
#define REGISTER_Element(class)
bool hasDofID(DofIDItem id) const
int giveNumberOfDofs() const
Dof * giveDofWithID(int dofID) const
Node * giveNode(int i) const
virtual FEInterpolation * giveInterpolation() const
virtual int giveNumberOfNodes() const
int numberOfDofMans
Number of dofmanagers.
std::vector< std ::unique_ptr< IntegrationRule > > integrationRulesArray
virtual int giveNumberOfDofManagers() const
DofManager * giveDofManager(int i) const
CrossSection * giveCrossSection()
virtual IntegrationRule * giveDefaultIntegrationRulePtr()
virtual void evalN(FloatArray &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo) const =0
double & at(std::size_t i)
void assemble(const FloatArray &fe, const IntArray &loc)
void plusProduct(const FloatMatrix &b, const FloatArray &s, double dV)
double dotProduct(const FloatArray &x) const
void zero()
Zeroes all coefficients of receiver.
void beProductOf(const FloatMatrix &aMatrix, const FloatArray &anArray)
void rotatedWith(const FloatMatrix &r, char mode='n')
void plusProductSymmUpper(const FloatMatrix &a, const FloatMatrix &b, double dV)
void add(const FloatMatrix &a)
void resize(Index rows, Index cols)
void beSubMatrixOf(const FloatMatrix &src, Index topRow, Index bottomRow, Index topCol, Index bottomCol)
void plusProductUnsym(const FloatMatrix &a, const FloatMatrix &b, double dV)
void beProductOf(const FloatMatrix &a, const FloatMatrix &b)
void beTranspositionOf(const FloatMatrix &src)
void zero()
Zeroes all coefficient of receiver.
void beDyadicProductOf(const FloatArray &vec1, const FloatArray &vec2)
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
const FloatArray & giveNaturalCoordinates() const
Returns coordinate array of receiver.
IntegrationPointStatus * giveMaterialStatus(IntegrationPointStatusIDType key=IPSID_Default)
double giveWeight()
Returns integration weight of receiver.
void giveStiffnessMatrix_Eng(FloatMatrix &answer, MatResponseMode rMode, IntegrationPoint *ip, TimeStep *tStep) override
double computeAreaAround(GaussPoint *gp) override
FloatArray deltaUnknownVectorD
virtual void computeStiffnessMatrix_dd(FloatMatrix &, MatResponseMode, TimeStep *)
void solveForLocalDamage(FloatMatrix &answer, TimeStep *tStep)
StructuralInterfaceElement * giveElement() override
void computeNmatrixAt(GaussPoint *gp, FloatMatrix &answer) override
FloatArrayF< 2 > computeCovarBaseVectorAt(GaussPoint *gp) const
static FEI2dLineLin interp
virtual void giveInternalForcesVectorUD(FloatArray &fu, FloatArray &fd, TimeStep *tStep, int useUpdatedGpRecord=0)
virtual void computeNd_vectorAt(const FloatArray &lCoords, FloatArray &N)
virtual void computeLocationArrayOfDofIDs(const IntArray &dofIdArray, IntArray &answer)
FEInterpolation * giveInterpolation() const override
virtual void computeBd_vectorAt(GaussPoint *gp, FloatArray &B)
void giveDofManDofIDMask_d(IntArray &answer) override
virtual void computeStiffnessMatrix_uu(FloatMatrix &, MatResponseMode, TimeStep *)
int computeNumberOfDofs() override
virtual double computeFreeEnergy(GaussPoint *gp, TimeStep *tStep)
virtual double computeDamageAt(GaussPoint *gp, ValueModeType valueMode, TimeStep *stepN)
double neg_MaCauleyPrime(double par) const
FloatArray unknownVectorD
void giveDofManDofIDMask_u(IntArray &answer) override
void computeGMatrix(FloatMatrix &answer, const double damage, GaussPoint *gp, ValueModeType valueMode, TimeStep *stepN)
FloatArray unknownVectorU
double neg_MaCauley(double par) const
void computeTransformationMatrixAt(GaussPoint *gp, FloatMatrix &answer) override
void computeDisplacementUnknowns(FloatArray &answer, ValueModeType valueMode, TimeStep *stepN)
double giveInternalLength()
void computeDamageUnknowns(FloatArray &answer, ValueModeType valueMode, TimeStep *stepN)
double computeGPrim(GaussPoint *gp, ValueModeType valueMode, TimeStep *stepN)
PhaseFieldElement(int i, Domain *aDomain)
double giveCriticalEnergy()
bool nlGeometry
Flag indicating if geometrical nonlinearities apply.
StructuralInterfaceElement(int n, Domain *d)
virtual void giveStiffnessMatrix_dTdj(FloatMatrix &answer, MatResponseMode rMode, IntegrationPoint *ip, TimeStep *tStep)
virtual void computeTraction(FloatArray &traction, IntegrationPoint *ip, const FloatArray &jump, TimeStep *tStep)
const FloatArrayF< 3 > & giveTempFirstPKTraction() const
Returns the const pointer to receiver's temporary first Piola-Kirchhoff traction vector.
const FloatArrayF< 3 > & giveTempJump() const
Returns the const pointer to receiver's temporary jump.
double giveTimeIncrement()
Returns solution step associated time increment.
int giveNumber()
Returns receiver's number.
#define _IFT_IntElLine1PF_prescribedDamage
double norm(const FloatArray &x)
GaussPoint IntegrationPoint