61 this->masterNode = master;
62 this->slaveNode = slave;
72 xs = *this->slaveNode->giveCoordinates();
73 xm = *this->masterNode->giveCoordinates();
77 if ( norm < 1.0e-8 ) {
78 OOFEM_ERROR(
"Couldn't compute normal between master node (num %d) and slave node (num %d), nodes are too close to each other.",
79 masterNode->giveGlobalNumber(), slaveNode->giveGlobalNumber() )
81 this->normal = normal*(1.0/
norm);
92 xs = *this->slaveNode->giveCoordinates();
93 xm = *this->masterNode->giveCoordinates();
94 this->slaveNode->giveUnknownVector(uS, {D_u, D_v, D_w}, VM_Total, tStep,
true);
95 this->masterNode->giveUnknownVector(uM, {D_u, D_v, D_w}, VM_Total, tStep,
true);
103 printf(
"normal gap = %e \n", answer.
at(1));
104 if ( answer.
at(1) < 0.0 ) {
121 answer = { normal.
at(1), normal.
at(2), normal.
at(3),
122 -normal.
at(1), -normal.
at(2), -normal.
at(3) };
133 if ( gap.
at(1) < 0.0 ) {
134 t = this->epsN * gap;
152 this->computeGap(gap, tStep);
153 if ( gap.
at(1) < 0.0 ) {
156 this->computeContactTractionAt(gp, t ,gap, tStep);
158 this->computeCmatrixAt(gp, C, tStep);
162 answer = t.
at(1) * this->area * C;
176 this->computeGap(gap, tStep);
179 this->computeCmatrixAt(gp, C, tStep);
182 answer.
times( this->epsN * this->area );
185 if( gap.
at(1) > 0.0 ) {
208 for (
int i = 1; i <= dofIdArray.
giveSize(); i++ ) {
209 if ( this->masterNode->hasDofID( (
DofIDItem)dofIdArray.
at(i) ) ) {
210 Dof *dof= this->masterNode->giveDofWithID( (
DofIDItem)dofIdArray.
at(i) );
216 for (
int i = 1; i <= dofIdArray.
giveSize(); i++ ) {
217 if ( this->slaveNode->hasDofID( (
DofIDItem)dofIdArray.
at(i) ) ) {
218 Dof *dof= this->slaveNode->giveDofWithID( (
DofIDItem)dofIdArray.
at(i) );
256 this->masterNode = master;
257 this->slaveNode = slave;
270 if ( this->masterNode->hasDofID( (
DofIDItem)this->giveDofIdArray().at(1) ) ) {
286 this->computeGap(gap, tStep);
290 this->computeContactTractionAt(gp, t ,gap, tStep);
291 this->computeCmatrixAt(gp, C, tStep);
297 answer.
resize( C.giveSize() + 1);
299 if( gap.
at(1) < 0.0 ) {
301 answer.
at( C.giveSize() + 1 ) = -gap.
at(1);
314 this->computeGap(gap, tStep);
316 if( gap.
at(1) < 0.0 ) {
321 this->computeCmatrixAt(gp, C, tStep);
330 for (
int i = 1; i <= 7; i++ ) {
331 answer.
at(i,i) += 1.0e-8;
343 if ( gap.
at(1) < 0.0 ) {
347 t = {lambda, 0.0, 0.0};
348 printf(
"lambda %e \n\n", lambda);
359 answer = {this->masterNode->giveNumber()};
int SetUpPoint(MaterialMode mode)
Trivial implementation, only creates a single point.
void zero()
Sets all component to zero.
double & at(int i)
Coefficient access function.
ValueModeType
Type representing the mode of UnknownType or CharType, or similar types.
void clear()
Clears receiver (zero size).
virtual double giveUnknown(ValueModeType mode, TimeStep *tStep)=0
The key method of class Dof.
Base class for dof managers.
void negated()
Changes sign of receiver values.
Class representing the abstraction for input data source.
Class implementing an array of integers.
int & at(int i)
Coefficient access function.
virtual int giveDofEquationNumber(Dof *dof) const =0
Returns the equation number for corresponding DOF.
double dotProduct(const FloatArray &x) const
Computes the dot product (or inner product) of receiver and argument.
void clear()
Clears the array (zero size).
DofIDItem
Type representing particular dof type.
void times(double f)
Multiplies receiver by factor f.
Abstract base class allowing to control the way, how equations are assigned to individual DOFs...
void addSubVector(const FloatArray &src, int si)
Adds the given vector as sub-vector to receiver.
double at(int i, int j) const
Coefficient access function.
void resize(int n)
Checks size of receiver towards requested bounds.
Class representing vector of real numbers.
Implementation of matrix containing floating point numbers.
GaussPoint * getIntegrationPoint(int n)
Access particular integration point of receiver.
void addSubVectorCol(const FloatArray &src, int sr, int sc)
Adds given vector to receiver starting at given position.
double norm(const FloatArray &x)
double computeNorm() const
Computes the norm (or length) of the vector.
void resize(int rows, int cols)
Checks size of receiver towards requested bounds.
void followedBy(const IntArray &b, int allocChunk=0)
Appends array b at the end of receiver.
void zero()
Zeroes all coefficients of receiver.
void beDyadicProductOf(const FloatArray &vec1, const FloatArray &vec2)
Assigns to the receiver the dyadic product .
void times(double s)
Multiplies receiver with scalar.
void zero()
Zeroes all coefficient of receiver.
int giveSize() const
Returns the size of receiver.
the oofem namespace is to define a context or scope in which all oofem names are defined.
Abstract class Dof represents Degree Of Freedom in finite element mesh.
void addSubVectorRow(const FloatArray &src, int sr, int sc)
Adds given vector to receiver starting at given position.
Class representing integration point in finite element program.
Class representing solution step.
void add(const FloatArray &src)
Adds array src to receiver.
Class representing Gaussian-quadrature integration rule.
void resize(int s)
Resizes receiver towards requested size.