36 #include "../sm/Elements/htselement.h" 69 answer = {D_u_edge_const, D_u_edge_lin, D_v_edge_const, D_v_edge_lin};
106 double area = 0, sX = 0, sY = 0;
107 double aX, aY, bX, bY;
118 area += ( bX - aX ) * ( bY + aY ) / 2;
120 sY += ( ( aX * aX ) + ( bX - aX ) * aX + ( bX - aX ) * ( bX - aX ) / 3 ) * ( bY - aY ) / 2.0;
121 sX += ( ( aY * aY ) + ( bY - aY ) * aY + ( bY - aY ) * ( bY - aY ) / 3 ) * ( bX - aX ) / 2.0;
131 int firstNodeNumber = elementSideNumber;
132 int secondNodeNumber = elementSideNumber + 1;
134 secondNodeNumber = 1;
136 if ( nodeNumber == 1 ) {
137 return this->
giveNode(firstNodeNumber);
138 }
else if ( nodeNumber == 2 ) {
139 return this->
giveNode(secondNodeNumber);
165 return sqrt(dx * dx + dy * dy);
194 for (
int l = 0; l < 4; l++ ) {
195 A(k, l + i * 4) = Aedge(k, l);
291 answer.
at(1, 1) = answer.
at(2, 3) = ( By - Ay );
292 answer.
at(1, 3) = answer.
at(2, 2) = -( Bx - Ax );
293 double norm = sqrt( answer.
at(1, 1) * answer.
at(1, 1) + answer.
at(2, 2) * answer.
at(2, 2) );
294 answer.
times(1. / norm);
343 double x = ( Bx - Ax ) * t + Ax;
347 double y = ( By - Ay ) * t + Ay;
382 this->
uv10(uv, x, y);
386 this->
uv11(uv, x, y);
390 this->
uv12(uv, x, y);
415 double x = ( Bx - Ax ) * t + Ax -
cgX;
419 double y = ( By - Ay ) * t + Ay -
cgY;
465 this->
sv10(sv, x, y);
470 this->
sv11(sv, x, y);
475 this->
sv12(sv, x, y);
614 answer(0) = -2 *
mu * x;
616 answer(2) = 2 *
mu * y;
623 answer(1) = -2 *
mu * y;
624 answer(2) = 2 *
mu * x;
638 answer(0) = -( 1 / 3.0 ) * x * x * x *
mu / ( 2 *
mu +
lambda ) + x * y * y;
639 answer(1) = -( 1 / 3.0 ) * y * y * y * (
lambda +
mu ) / ( 2 *
mu +
lambda );
645 answer(0) = -3 * x * x * y * ( 2 *
mu +
lambda ) / ( 2 *
lambda + 3 *
mu ) + y * y * y;
653 answer(1) = x * x * x + 3 * x * y * y * ( -
lambda - 2 *
mu ) / ( 2 *
lambda + 3 *
mu );
659 answer(0) = -( 1 / 3.0 ) * x * x * x * (
lambda +
mu ) / ( 2 *
mu +
lambda );
660 answer(1) = x * x * y - ( 1 / 3.0 ) * y * y * y *
mu / ( 2 *
mu +
lambda );
668 answer(2) = 2 *
mu * x * y;
675 answer(1) = 6 * mu * x * y * ( 2 * mu +
lambda ) / ( 2 *
lambda + 3 * mu );
676 answer(2) = -3 * mu * ( 2 * x * x * mu + x * x *
lambda - 3 *
lambda * y * y - 4 * mu * y * y ) / ( 2 *
lambda + 3 * mu );
684 answer(2) = 3 * mu * ( -2 * mu * y * y -
lambda * y * y + 3 * x * x *
lambda + 4 * x * x *
mu ) / ( 2 *
lambda + 3 * mu );
692 answer(2) = 2 *
mu * x * y;
697 HTSelement :: sv13(
FloatArray &answer,
double x,
double y)
699 answer(0) = ( 6 * x * x * y * y *
mu + x * x * x * x *
lambda - 2 * y * y * y * y *
mu - y * y * y * y *
lambda ) /
lambda;
704 HTSelement :: uv13(
FloatArray &answer,
double x,
double y)
707 answer(1) = 0.5 * x * x * (
lambda +
mu ) * ( x * x - 3 * y * y ) /
lambda;
711 HTSelement :: uv15(
FloatArray &answer,
double x,
double y)
713 answer(0) = -0.5 * y * y * (
lambda +
mu ) * ( 3 * x * x - y * y ) /
lambda;
718 HTSelement :: uv16(
FloatArray &answer,
double x,
double y)
721 answer(1) = -( -6 * x * x * y * y *
mu - y * y * y * y *
lambda + x * x * x * x *
lambda + 2 * x * x * x * x *
mu ) /
lambda;
725 HTSelement :: sv13(
FloatArray &answer,
double x,
double y)
733 HTSelement :: sv14(
FloatArray &answer,
double x,
double y)
741 HTSelement :: sv15(
FloatArray &answer,
double x,
double y)
749 HTSelement :: sv16(
FloatArray &answer,
double x,
double y)
757 HTSelement :: uv17(
FloatArray &answer,
double x,
double y)
759 answer(0) = x * ( 2 * x * x * x * x *
lambda + x * x * x * x *
mu - 5 * y * y * y * y *
mu - 10 * x * x * y * y *
lambda ) / ( 2 *
lambda +
mu );
760 answer(1) = -10 * x * x * y * (
lambda +
mu ) * ( x * x - y * y ) / ( 2 *
lambda +
mu );
764 HTSelement :: uv18(
FloatArray &answer,
double x,
double y)
766 answer(0) = ( 1 / 5.0 ) * y * ( 10 * x * x * y * y *
mu - y * y * y * y *
lambda - 2 * y * y * y * y *
mu + 5 * x * x * x * x *
lambda ) /
lambda;
767 answer(1) = ( 2 / 5.0 ) * x * x * x * ( lambda +
mu ) * ( -5 * y * y + x * x ) / lambda;
771 HTSelement :: uv19(
FloatArray &answer,
double x,
double y)
773 answer(0) = -( 2 / 5.0 ) * y * y * y * (
lambda +
mu ) * ( 5 * x * x - y * y ) /
lambda;
774 answer(1) = -( 1 / 5.0 ) * x * ( x * x * x * x *
lambda + 2 * x * x * x * x *
mu - 5 * y * y * y * y *
lambda - 10 * x * x * y * y *
mu ) /
lambda;
778 HTSelement :: uv20(
FloatArray &answer,
double x,
double y)
780 answer(0) = 10 * x * y * y * (
lambda +
mu ) * ( -y * y + x * x ) / ( 2 *
lambda +
mu );
781 answer(1) = -y * ( 5 * x * x * x * x *
mu - 2 * y * y * y * y *
lambda - y * y * y * y *
mu + 10 * x * x * y * y *
lambda ) / ( 2 *
lambda +
mu );
785 HTSelement :: sv17(
FloatArray &answer,
double x,
double y)
787 answer(0) = 5 *
mu * ( -6 * x * x * y * y *
lambda + 3 * x * x * x * x *
lambda + 2 * x * x * x * x *
mu - 2 * y * y * y * y *
mu -
lambda * y * y * y * y ) / ( 2 *
lambda +
mu );
788 answer(1) = -5 *
mu * ( 5 * x * x * x * x *
lambda - 18 * x * x * y * y *
lambda + 4 * x * x * x * x *
mu - 12 * x * x * y * y *
mu +
lambda * y * y * y * y ) / ( 2 *
lambda +
mu );
793 HTSelement :: sv18(
FloatArray &answer,
double x,
double y)
797 answer(2) =
mu * ( 3 * x * x * x * x *
lambda + 2 * x * x * x * x *
mu - y * y * y * y *
lambda - 2 * y * y * y * y *
mu - 6 * x * x * y * y *
lambda ) /
lambda;
801 HTSelement :: sv19(
FloatArray &answer,
double x,
double y)
805 answer(2) = -
mu * ( 6 * x * x * y * y *
lambda + x * x * x * x *
lambda + 2 * x * x * x * x *
mu - 3 * y * y * y * y *
lambda - 2 * y * y * y * y *
mu ) /
lambda;
809 HTSelement :: sv20(
FloatArray &answer,
double x,
double y)
811 answer(0) = -5 *
mu * ( -18 * x * x * y * y *
lambda + 5 * y * y * y * y *
lambda - 12 * x * x * y * y *
mu + 4 * y * y * y * y *
mu +
lambda * x * x * x * x ) / ( 2 *
lambda +
mu );
812 answer(1) = -5 *
mu * ( 6 * x * x * y * y *
lambda - 3 * y * y * y * y *
lambda - 2 * y * y * y * y *
mu + 2 * x * x * x * x *
mu +
lambda * x * x * x * x ) / ( 2 *
lambda +
mu );
817 HTSelement :: uv21(
FloatArray &answer,
double x,
double y)
819 answer(0) = ( -15 * x * x * y * y * y * y *
mu - 15 * x * x * x * x * y * y *
lambda + 2 * x * x * x * x * x * x *
lambda + x * x * x * x * x * x *
mu + y * y * y * y * y * y *
lambda + \
820 2 * y * y * y * y * y * y *
mu ) / ( 2 *
lambda +
mu );
821 answer(1) = -4 * x * x * x * y * (
lambda +
mu ) * ( -5 * y * y + 3 * x * x ) / ( 2 *
lambda +
mu );
825 HTSelement :: uv22(
FloatArray &answer,
double x,
double y)
827 answer(0) = ( 1 / 3.0 ) * x * y * ( -10 * x * x * y * y *
lambda - 3 * y * y * y * y *
mu + 6 * x * x * x * x *
lambda + 3 * x * x * x * x *
mu ) / ( 2 *
lambda +
mu );
828 answer(1) = 0.5 * x * x * (
lambda +
mu ) * ( 5 * y * y * y * y + x * x * x * x - 10 * x * x * y * y ) / ( 2 *
lambda +
mu );
832 HTSelement :: uv23(
FloatArray &answer,
double x,
double y)
834 answer(0) = 0.5 * y * y * (
lambda +
mu ) * ( y * y * y * y + 5 * x * x * x * x - 10 * x * x * y * y ) / ( 2 *
lambda +
mu );
835 answer(1) = -( 1 / 3.0 ) * x * y * ( -6 * y * y * y * y *
lambda - 3 * y * y * y * y *
mu + 3 * x * x * x * x *
mu + 10 * x * x * y * y *
lambda ) / ( 2 * lambda +
mu );
839 HTSelement :: uv24(
FloatArray &answer,
double x,
double y)
841 answer(0) = 4 * x * y * y * y * (
lambda +
mu ) * ( 5 * x * x - 3 * y * y ) / ( 2 *
lambda +
mu );
842 answer(1) = ( 2 * y * y * y * y * y * y *
lambda + y * y * y * y * y * y *
mu + x * x * x * x * x * x *
lambda + 2 * x * x * x * x * x * x *
mu - 15 * x * x * x * x * y * y *
mu - \
847 HTSelement :: sv21(
FloatArray &answer,
double x,
double y)
849 answer(0) = 6 *
mu * x * ( 3 * x * x * x * x *
lambda + 2 * x * x * x * x *
mu - 10 * y * y * y * y *
mu - 10 * x * x * y * y *
lambda - 5 *
lambda * y * y * y * y ) / ( 2 *
lambda +
mu );
850 answer(1) = -6 *
mu * x * ( -30 * x * x * y * y *
lambda + 5 * x * x * x * x *
lambda - 20 * x * x * y * y *
mu + 4 * x * x * x * x *
mu + 5 *
lambda * y * y * y * y ) / ( 2 *
lambda +
mu );
851 answer(2) = -6 *
mu * y * ( -y * y * y * y *
lambda - 2 * y * y * y * y *
mu + 15 * x * x * x * x *
lambda - 10 * x * x * y * y *
lambda + 10 * x * x * x * x *
mu ) / ( 2 *
lambda +
mu );
855 HTSelement :: sv22(
FloatArray &answer,
double x,
double y)
857 answer(0) =
mu * y * ( -10 * x * x * y * y *
lambda - 2 * y * y * y * y *
mu + 15 * x * x * x * x *
lambda + 10 * x * x * x * x *
mu -
lambda * y * y * y * y ) / ( 2 *
lambda +
mu );
858 answer(1) = -
mu * y * ( -30 * x * x * y * y *
lambda + 25 * x * x * x * x *
lambda - 20 * x * x * y * y *
mu + 20 * x * x * x * x *
mu +
lambda * y * y * y * y ) / ( 2 *
lambda +
mu );
859 answer(2) =
mu * x * ( -30 * x * x * y * y *
lambda + 5 * x * x * x * x *
lambda + 4 * x * x * x * x *
mu + 5 * y * y * y * y *
lambda - 20 * x * x * y * y *
mu ) / ( 2 *
lambda +
mu );
863 HTSelement :: sv23(
FloatArray &answer,
double x,
double y)
865 answer(0) = -
mu * x * ( 25 * y * y * y * y *
lambda - 30 * x * x * y * y *
lambda + 20 * y * y * y * y *
mu - 20 * x * x * y * y *
mu +
lambda * x * x * x * x ) / ( 2 *
lambda +
mu );
866 answer(1) = -
mu * x * ( 2 * x * x * x * x *
mu - 15 * y * y * y * y *
lambda - 10 * y * y * y * y *
mu + 10 * x * x * y * y *
lambda +
lambda * x * x * x * x ) / ( 2 *
lambda +
mu );
867 answer(2) =
mu * y * ( 5 * x * x * x * x *
lambda + 5 * y * y * y * y *
lambda + 4 * y * y * y * y *
mu - 30 * x * x * y * y *
lambda - 20 * x * x * y * y *
mu ) / ( 2 *
lambda +
mu );
871 HTSelement :: sv24(
FloatArray &answer,
double x,
double y)
873 answer(0) = -6 *
mu * y * ( -30 * x * x * y * y *
lambda + 5 * y * y * y * y *
lambda - 20 * x * x * y * y *
mu + 4 * y * y * y * y *
mu + 5 *
lambda * x * x * x * x ) / ( 2 *
lambda +
mu );
874 answer(1) = -6 *
mu * y * ( 10 * x * x * x * x *
mu - 3 * y * y * y * y *
lambda - 2 * y * y * y * y *
mu + 10 * x * x * y * y *
lambda + 5 *
lambda * x * x * x * x ) / ( 2 *
lambda +
mu );
875 answer(2) = 6 *
mu * x * ( -15 * y * y * y * y *
lambda - 10 * y * y * y * y *
mu + x * x * x * x *
lambda + 2 * x * x * x * x *
mu + 10 * x * x * y * y *
lambda ) / ( 2 *
lambda +
mu );
882 answer(0) = -5 * x * x * x * x + 30 * x * x * y * y - 5 * y * y * y * y;
883 answer(1) = 20 * x * x * x * y - 20 * x * y * y * y;
889 answer(0) = 2 *
mu * ( -20 * x * x * x + 60 * x * y * y );
890 answer(1) = 2 *
mu * ( 20 * x * x * x - 60 * x * y * y );
891 answer(2) =
mu * ( 120 * x * x * y - 40 * y * y * y );
double computeVolumeAroundSide(GaussPoint *gp, int elemSideNumber)
void uv5(FloatArray &answer, double x, double y)
void uv12(FloatArray &answer, double x, double y)
void uv3(FloatArray &answer, double x, double y)
void computeVectorOf(ValueModeType u, TimeStep *tStep, FloatArray &answer)
Returns local vector of unknowns.
void uv4(FloatArray &answer, double x, double y)
virtual IntegrationRule * giveIntegrationRule(int i)
void sv1(FloatArray &answer, double x, double y)
void computePrescribedDisplacementLoadVectorAt(FloatArray &answer, TimeStep *tStep, ValueModeType mode)
void uv8(FloatArray &answer, double x, double y)
void computeFMatrixAt(FloatMatrix &answer, FloatMatrix N, GaussPoint *gp, int sideNumber)
void uv6(FloatArray &answer, double x, double y)
ValueModeType
Type representing the mode of UnknownType or CharType, or similar types.
void uv7(FloatArray &answer, double x, double y)
void clear()
Clears receiver (zero size).
void sv11(FloatArray &answer, double x, double y)
void sv7(FloatArray &answer, double x, double y)
void uv10(FloatArray &answer, double x, double y)
void computeCenterOfGravity()
void sv12(FloatArray &answer, double x, double y)
virtual double giveCoordinate(int i)
Class implementing an array of integers.
MatResponseMode
Describes the character of characteristic material matrix.
void computeSvMatrixAt(FloatMatrix &answer, GaussPoint *gp, int sideNumber)
void uv11(FloatArray &answer, double x, double y)
void uv9(FloatArray &answer, double x, double y)
Abstract base class for all "structural" finite elements.
double giveNaturalCoordinate(int i) const
Returns i-th natural element coordinate of receiver.
void computeAMatrixAt(FloatMatrix &answer, FloatMatrix N, GaussPoint *gp, int sideNumber)
void sv5(FloatArray &answer, double x, double y)
void sv2(FloatArray &answer, double x, double y)
void clear()
Clears the array (zero size).
void sv8(FloatArray &answer, double x, double y)
virtual double giveWeight()
Returns integration weight of receiver.
void sv3(FloatArray &answer, double x, double y)
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
void times(double f)
Multiplies receiver by factor f.
Node * giveSideNode(int elementSideNumber, int nodeNumber)
void sv10(FloatArray &answer, double x, double y)
void computeOutwardNormalMatrix(FloatMatrix &answer, int sideNumber)
void beProductOf(const FloatMatrix &aMatrix, const FloatArray &anArray)
Receiver becomes the result of the product of aMatrix and anArray.
void uv25_4(FloatArray &answer, double x, double y)
void beTProductOf(const FloatMatrix &aMatrix, const FloatArray &anArray)
Receiver becomes the result of the product of aMatrix^T and anArray.
void sv9(FloatArray &answer, double x, double y)
double at(int i, int j) const
Coefficient access function.
void sv25_4(FloatArray &answer, double x, double y)
void computePsVectorAt(FloatArray &answer, FloatArray t, GaussPoint *gp)
double u_gammaLin(GaussPoint *gp)
int numberOfGaussPoints
Number of integration points as specified by nip.
void sv4(FloatArray &answer, double x, double y)
virtual void computeStiffnessMatrix(FloatMatrix &answer, MatResponseMode rMode, TimeStep *tStep)
Computes numerically stiffness matrix of receiver.
Class representing vector of real numbers.
void computePuVectorAt(FloatArray &answer, FloatMatrix N, FloatArray u, GaussPoint *gp, int sideNumber)
Implementation of matrix containing floating point numbers.
void computeUgammaMatrixAt(FloatMatrix &answer, GaussPoint *gp)
IRResultType
Type defining the return values of InputRecord reading operations.
virtual void giveDofManDofIDMask(int inode, IntArray &) const
Returns dofmanager dof mask for node.
HTSelement(int n, Domain *d)
double norm(const FloatArray &x)
void resize(int rows, int cols)
Checks size of receiver towards requested bounds.
void add(const FloatMatrix &a)
Adds matrix to the receiver.
virtual void computeGaussPoints()
Initializes the array of integration rules member variable.
void zero()
Zeroes all coefficients of receiver.
void beTProductOf(const FloatMatrix &a, const FloatMatrix &b)
Assigns to the receiver product of .
void uv2(FloatArray &answer, double x, double y)
void beTranspositionOf(const FloatMatrix &src)
Assigns to the receiver the transposition of parameter.
std::vector< std::unique_ptr< IntegrationRule > > integrationRulesArray
List of integration rules of receiver (each integration rule contains associated integration points a...
void computeUvMatrixAt(FloatMatrix &answer, GaussPoint *gp, int sideNubmer)
void zero()
Zeroes all coefficient of receiver.
double u_gammaConst(GaussPoint *gp)
void uv1(FloatArray &answer, double x, double y)
void beProductOf(const FloatMatrix &a, const FloatMatrix &b)
Assigns to the receiver product of .
bool containsOnlyZeroes() const
Returns nonzero if all coefficients of the receiver are 0, else returns zero.
the oofem namespace is to define a context or scope in which all oofem names are defined.
void sv6(FloatArray &answer, double x, double y)
Class implementing node in finite element mesh.
void beInverseOf(const FloatMatrix &src)
Modifies receiver to become inverse of given parameter.
void negated()
Switches the sign of every coefficient of receiver.
double giveSideLength(int sideNumber)
Node * giveNode(int i) const
Returns reference to the i-th node of element.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
Class representing integration point in finite element program.
Class representing solution step.
int numberOfDofMans
Number of dofmanagers.
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.