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);
113 G.
at(1) += dNdxi.
at(i, 1) * X1_i;
114 G.
at(2) += dNdxi.
at(i, 1) * X2_i;
128 return ds * thickness;
151 answer = {D_u, D_v, T_f};
163 answer.
at(1, 1) = G.
at(1);
164 answer.
at(2, 1) = G.
at(2);
165 answer.
at(1, 2) = -G.
at(2);
166 answer.
at(2, 2) = G.
at(1);
191 answer.
resize( nDofs, nDofs );
256 if ( matStiffSymmFlag ) {
264 if ( matStiffSymmFlag ) {
276 FloatArray a_u, traction, tractionTemp, jump, fu, fd(2), fd4(4);
283 a_d = { a_d_temp.
at(1), a_d_temp.
at(2) };
307 indxu = {1, 2, 3, 4, 5, 6, 7, 8};
318 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;
327 for (
int i = 1; i <=2; i++ ) {
329 a_d_pert.
at(i) += eps;
332 delta_a_d_pert = delta_a_d_ref;
333 delta_a_d_pert.
at(i) += eps;
337 K_col = ( 1.0/eps ) * ( fu_pert - fu_ref );
338 K_num.addSubVectorCol(K_col, 1, i);
342 answer.
assemble(K_num, indxu, indx1);
343 answer.
assemble(K_num, indxu, indx2);
363 double kp = this->givePenaltyParameter();
366 answer.
resize( ndofs_d, ndofs_d );
390 double factorN = -kp *
neg_MaCauleyPrime(Delta_d/Delta_t)/Delta_t + g_c / l + Gbis * Psibar;
397 tempN.beDyadicProductOf(Nd, Nd);
398 temp.
add(factorN * dA, tempN);
401 double factorB = g_c * l;
402 tempB.beDyadicProductOf(Bd, Bd);
403 temp.
add(factorB * dA, tempB);
410 answer.
assemble(temp, indx1, indx1);
411 answer.
assemble(temp, indx2, indx2);
416 FloatArray a_u_ref, a_d_ref, a_d_pert, fu_ref, fd_ref, fd_pert, K_col, fu_temp;
424 for (
int i = 1; i <=2; i++ ) {
426 a_d_pert.
at(i) += eps;
430 K_col = ( 1.0/eps ) * ( fd_pert - fd_ref );
431 K.addSubVectorCol(K_col, 1, i);
437 answer.
assemble(Kdd_num, indx1, indx1);
438 answer.
assemble(Kdd_num, indx2, indx2);
461 FloatArray a_u, a_d_temp, a_d(2), traction, jump, fd(2), fd_ref(2), Nd, Bd;
466 double kp = this->givePenaltyParameter();
476 for (
int nIter = 1; nIter <= 10; nIter++ ) {
495 double Gprim = -2.0 * (1.0 - d);
499 double sectionalForcesScal = -kp *
neg_MaCauley(Delta_d/Delta_t) + g_c / l * d + Gprim * Psibar;
500 double sectionalForcesVec = g_c * l * gradd;
501 fd = fd + ( Nd*sectionalForcesScal + Bd*sectionalForcesVec ) * dA;
502 fd_ref = fd_ref + ( Nd * (Gprim * Psibar + 1.0e-8 ) ) * dA;
509 double factorN = -kp *
neg_MaCauleyPrime(Delta_d/Delta_t)/Delta_t + g_c / l + Gbis * Psibar;
513 Kdd.add(factorN * dA, tempN);
516 double factorB = g_c * l;
518 Kdd.add(factorB * dA, tempB);
523 if( fd.computeNorm()/fd_ref.computeNorm() < 1.0e-3 ) {
527 Kdd.solveForRhs(fd, delta_a_d);
533 printf(
"norm %e \n", fd.computeNorm()/fd_ref.computeNorm() );
534 OOFEM_ERROR(
"No convergence in phase field iterations")
554 if ( strain.
at(3) < 0.0 ) {
558 g2 = (1.0 - d) * (1.0 - d);
563 double g1 = (1.0 - d) * (1.0 - d);
580 if ( valueMode == VM_Total ) {
585 }
else if ( valueMode == VM_Incremental ) {
637 FloatArray a_u, a_d_temp, a_d, traction, jump, fd(2), Nd, Bd, GTraction;
641 a_d = { a_d_temp.
at(1), a_d_temp.
at(2) };
678 double kp = this->givePenaltyParameter();
692 double sectionalForcesScal = -kp *
neg_MaCauley(Delta_d/Delta_t) + g_c / l * d + Gprim * Psibar;
694 double sectionalForcesVec = g_c * l * gradd;
695 fd = fd + ( Nd*sectionalForcesScal + Bd*sectionalForcesVec ) * dA;
724 if ( strain.
at(3) < 0.0 ) {
725 return 0.5 * ( stress.
at(1)*strain.
at(1) + stress.
at(2)*strain.
at(2) );
738 return (1.0 - d) * (1.0 - d) + r0;
767 for(
int j = 1; j <= dofIdArray.
giveSize( ); j++) {
799 answer.
at(i) = dNdxi.
at(i,1);
CrossSection * giveCrossSection()
virtual void computeCovarBaseVectorAt(GaussPoint *gp, FloatArray &G)
void subtract(const FloatArray &src)
Subtracts array src to receiver.
virtual double computeDamageAt(GaussPoint *gp, ValueModeType valueMode, TimeStep *stepN)
virtual void evaldNdxi(FloatMatrix &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the matrix of derivatives of interpolation functions (shape functions) at given point...
double neg_MaCauley(double par)
virtual void evalN(FloatArray &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo)=0
Evaluates the array of interpolation functions (shape functions) at given point.
virtual IntegrationRule * giveDefaultIntegrationRulePtr()
Access method for default integration rule.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
void solveForLocalDamage(FloatMatrix &answer, TimeStep *tStep)
virtual void computeStiffnessMatrix_ud(FloatMatrix &, MatResponseMode, TimeStep *)
double computeGPrim(GaussPoint *gp, ValueModeType valueMode, TimeStep *stepN)
virtual void computeTraction(FloatArray &traction, IntegrationPoint *ip, const FloatArray &jump, TimeStep *tStep)
double & at(int i)
Coefficient access function.
void computeGMatrix(FloatMatrix &answer, const double damage, GaussPoint *gp, ValueModeType valueMode, TimeStep *stepN)
void beSubMatrixOf(const FloatMatrix &src, int topRow, int bottomRow, int topCol, int bottomCol)
Assigns to the receiver the sub-matrix of another matrix.
ValueModeType
Type representing the mode of UnknownType or CharType, or similar types.
Abstract class for phase field formulation.
virtual void giveDofManDofIDMask_u(IntArray &answer)
FloatArray unknownVectorD
Base class for dof managers.
virtual double giveCoordinate(int i)
StructuralInterfaceElement * giveElement()
double computeOldG(GaussPoint *gp, ValueModeType valueMode, TimeStep *stepN)
virtual void computeNd_vectorAt(const FloatArray &lCoords, FloatArray &N)
Class implementing an array of integers.
int & at(int i)
Coefficient access function.
MatResponseMode
Describes the character of characteristic material matrix.
virtual FEInterpolation * giveInterpolation() const
virtual int giveNumberOfDofManagers() const
virtual void computeNmatrixAt(GaussPoint *gp, FloatMatrix &answer)
Computes modified interpolation matrix (N) for the element which multiplied with the unknowns vector ...
void computeDamageUnknowns(FloatArray &answer, ValueModeType valueMode, TimeStep *stepN)
double neg_MaCauleyPrime(double par)
double giveTimeIncrement()
Returns solution step associated time increment.
virtual int giveNumberOfNodes() const
Returns number of nodes of receiver.
virtual double computeAreaAround(GaussPoint *gp)
virtual FEInterpolation * giveInterpolation() const
Class representing a general abstraction for finite element interpolation class.
void plusProductUnsym(const FloatMatrix &a, const FloatMatrix &b, double dV)
Adds to the receiver the product .
virtual void giveInternalForcesVectorUD(FloatArray &fu, FloatArray &fd, TimeStep *tStep, int useUpdatedGpRecord=0)
FloatArray deltaUnknownVectorD
int giveNumber()
Returns receiver's number.
int giveNumberOfDofs() const
virtual void computeBd_vectorAt(GaussPoint *gp, FloatArray &B)
double dotProduct(const FloatArray &x) const
Computes the dot product (or inner product) of receiver and argument.
DofIDItem
Type representing particular dof type.
virtual double giveWeight()
Returns integration weight of receiver.
void rotatedWith(const FloatMatrix &r, char mode= 'n')
Returns the receiver 'a' transformed using give transformation matrix r.
void computeDisplacementUnknowns(FloatArray &answer, ValueModeType valueMode, TimeStep *stepN)
Wrapper around element definition to provide FEICellGeometry interface.
virtual bool isCharacteristicMtrxSymmetric(MatResponseMode rMode)
Check for symmetry of stiffness matrix.
void beProductOf(const FloatMatrix &aMatrix, const FloatArray &anArray)
Receiver becomes the result of the product of aMatrix and anArray.
This class implements a structural interface material status information.
virtual void giveStiffnessMatrix_Eng(FloatMatrix &answer, MatResponseMode rMode, IntegrationPoint *ip, TimeStep *tStep)
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.
virtual void computeStiffnessMatrix_uu(FloatMatrix &, MatResponseMode, TimeStep *)
virtual void giveStiffnessMatrix_dTdj(FloatMatrix &answer, MatResponseMode rMode, IntegrationPoint *ip, TimeStep *tStep)
#define _IFT_IntElLine1PF_prescribedDamage
int numberOfGaussPoints
Number of integration points as specified by nip.
Class representing vector of real numbers.
bool hasDofID(DofIDItem id) const
Checks if receiver contains dof with given ID.
Implementation of matrix containing floating point numbers.
IntElLine1PF(int n, Domain *d)
IRResultType
Type defining the return values of InputRecord reading operations.
virtual double give(CrossSectionProperty a, GaussPoint *gp)
Returns the value of cross section property at given point.
virtual int computeNumberOfDofs()
Computes or simply returns total number of element's local DOFs.
IntegrationPointStatus * giveMaterialStatus()
Returns reference to associated material status (NULL if not defined).
virtual void computeGaussPoints()
Initializes the array of integration rules member variable.
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.
virtual void computeTransformationMatrixAt(GaussPoint *gp, FloatMatrix &answer)
void add(const FloatMatrix &a)
Adds matrix to the receiver.
Dof * giveDofWithID(int dofID) const
Returns DOF with given dofID; issues error if not present.
void zero()
Zeroes all coefficients of receiver.
void beDyadicProductOf(const FloatArray &vec1, const FloatArray &vec2)
Assigns to the receiver the dyadic product .
const FloatArray & giveTempFirstPKTraction() const
Returns the const pointer to receiver's temporary first Piola-Kirchhoff traction vector.
virtual double computeFreeEnergy(GaussPoint *gp, TimeStep *tStep)
virtual void giveInternalForcesVector(FloatArray &answer, TimeStep *tStep, int useUpdatedGpRecord=0)
Returns equivalent nodal forces vectors.
void times(double s)
Multiplies receiver with scalar.
void beTranspositionOf(const FloatMatrix &src)
Assigns to the receiver the transposition of parameter.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
std::vector< std::unique_ptr< IntegrationRule > > integrationRulesArray
List of integration rules of receiver (each integration rule contains associated integration points a...
void zero()
Zeroes all coefficient of receiver.
FloatArray unknownVectorU
Abstract base class for all structural interface elements.
void beProductOf(const FloatMatrix &a, const FloatMatrix &b)
Assigns to the receiver product of .
the oofem namespace is to define a context or scope in which all oofem names are defined.
DofManager * giveDofManager(int i) const
void assemble(const FloatMatrix &src, const IntArray &loc)
Assembles the contribution using localization array into receiver.
Abstract class Dof represents Degree Of Freedom in finite element mesh.
const FloatArray & giveTempJump() const
Returns the const pointer to receiver's temporary jump.
static FEI2dLineLin interp
double normalize()
Normalizes receiver.
Node * giveNode(int i) const
Returns reference to the i-th node of element.
double giveCriticalEnergy()
virtual void computeLocationArrayOfDofIDs(const IntArray &dofIdArray, IntArray &answer)
int giveNumberOfRows() const
Returns number of rows of receiver.
void symmetrized()
Initializes the lower half of the receiver according to the upper half.
int nlGeometry
Flag indicating if geometrical nonlinearities apply.
virtual void computeStiffnessMatrix_dd(FloatMatrix &, MatResponseMode, TimeStep *)
double giveInternalLength()
Class representing integration point in finite element program.
virtual void giveDofManDofIDMask_d(IntArray &answer)
Class representing solution step.
virtual void computeStiffnessMatrix(FloatMatrix &answer, MatResponseMode rMode, TimeStep *tStep)
Computes the stiffness/tangent matrix of receiver.
int numberOfDofMans
Number of dofmanagers.
virtual void giveDofManDofIDMask(int inode, IntArray &answer) const
Returns dofmanager dof mask for node.
const FloatArray & giveNaturalCoordinates()
Returns coordinate array of receiver.
Class representing Gaussian-quadrature integration rule.
void resize(int s)
Resizes receiver towards requested size.
void plusProduct(const FloatMatrix &b, const FloatArray &s, double dV)
Adds the product .