35 #include "../sm/Elements/Plates/dkt3d.h" 36 #include "../sm/Materials/structuralms.h" 64 OOFEM_ERROR(
"cannot transform coordinates - size mismatch");
79 double &y1,
double &y2,
double &y3,
80 double &z1,
double &z2,
double &z3)
106 answer = {D_u, D_v, D_w, R_u, R_v, R_w};
143 for (
int i = 1; i <= 3; i++ ) {
165 for (
int i = 1; i <= 3; i++ ) {
189 answer.
at(1, 3) = charVect.
at(4);
190 answer.
at(3, 1) = charVect.
at(4);
191 answer.
at(2, 3) = charVect.
at(5);
192 answer.
at(3, 2) = charVect.
at(5);
197 answer.
at(1, 1) = charVect.
at(1);
198 answer.
at(2, 2) = charVect.
at(2);
199 answer.
at(1, 2) = charVect.
at(3);
200 answer.
at(2, 1) = charVect.
at(3);
205 answer.
at(1, 3) = charVect.
at(4) / 2.;
206 answer.
at(3, 1) = charVect.
at(4) / 2.;
207 answer.
at(2, 3) = charVect.
at(5) / 2.;
208 answer.
at(3, 2) = charVect.
at(5) / 2.;
213 answer.
at(1, 1) = charVect.
at(1);
214 answer.
at(2, 2) = charVect.
at(2);
215 answer.
at(1, 2) = charVect.
at(3) / 2.;
216 answer.
at(2, 1) = charVect.
at(3) / 2.;
238 if ( type == IST_CurvatureTensor || type == IST_ShellStrainTensor ) {
239 if ( type == IST_CurvatureTensor ) {
247 answer.
at(1) = globTensor.
at(1, 1);
248 answer.
at(2) = globTensor.
at(2, 2);
249 answer.
at(3) = globTensor.
at(3, 3);
250 answer.
at(4) = 2*globTensor.
at(2, 3);
251 answer.
at(5) = 2*globTensor.
at(1, 3);
252 answer.
at(6) = 2*globTensor.
at(1, 2);
255 }
else if ( type == IST_ShellMomentTensor || type == IST_ShellForceTensor ) {
256 if ( type == IST_ShellMomentTensor ) {
264 answer.
at(1) = globTensor.
at(1, 1);
265 answer.
at(2) = globTensor.
at(2, 2);
266 answer.
at(3) = globTensor.
at(3, 3);
267 answer.
at(4) = globTensor.
at(2, 3);
268 answer.
at(5) = globTensor.
at(1, 3);
269 answer.
at(6) = globTensor.
at(1, 2);
287 for (
int i = 1; i <= 3; i++ ) {
308 2, 3, 4, 8, 9, 10, 14, 15, 16
311 for (
int i = 0; i < 3; i++ ) {
312 for (
int j = 0; j < 9; j++ ) {
313 answer(ri [ i ], ci [ j ]) = ne(i, j);
373 fprintf( file,
" GP %2d.%-2d :", i + 1, gp->giveNumber() );
375 this->
giveIPValue(v, gp, IST_ShellStrainTensor, tStep);
376 fprintf(file,
" strains ");
378 for (
auto &val : v ) fprintf(file,
" %.4e", val);
380 this->
giveIPValue(v, gp, IST_CurvatureTensor, tStep);
381 fprintf(file,
"\n curvatures ");
382 for (
auto &val : v ) fprintf(file,
" %.4e", val);
385 this->
giveIPValue(v, gp, IST_ShellForceTensor, tStep);
386 fprintf(file,
"\n stresses ");
387 for (
auto &val : v ) fprintf(file,
" %.4e", val);
389 this->
giveIPValue(v, gp, IST_ShellMomentTensor, tStep);
390 fprintf(file,
"\n moments ");
391 for (
auto &val : v ) fprintf(file,
" %.4e", val);
416 }
else if ( iEdge == 2 ) {
423 }
else if ( iEdge == 3 ) {
453 double dx, dy, length;
469 dx = cb.at(1) - ca.at(1);
470 dy = cb.at(2) - ca.at(2);
471 length = sqrt(dx * dx + dy * dy);
473 answer.
at(1, 1) = 1.0;
474 answer.
at(2, 2) = dx / length;
475 answer.
at(2, 3) = -dy / length;
476 answer.
at(3, 2) = dy / length;
477 answer.
at(3, 3) = dx / length;
490 std::vector< FloatArray > lc(3);
493 for (
int _i = 0; _i < 3; _i++ ) {
499 answer.
at(1) = inputCoords_ElCS.
at(1);
500 answer.
at(2) = inputCoords_ElCS.
at(2);
501 GaussPoint _gp(NULL, 1, answer, 2.0, _2dPlate);
505 return inplane && outofplane;
512 double l1 = lcoords.
at(1);
513 double l2 = lcoords.
at(2);
514 double l3 = 1. - l2 - l1;
517 for (
int _i = 1; _i <= 3; _i++ ) {
531 double dens, dV, load;
554 load = force.
at(1) * dens * dV / 3.0;
557 answer.
at(13) = load;
559 load = force.
at(2) * dens * dV / 3.0;
562 answer.
at(14) = load;
564 load = force.
at(3) * dens * dV / 3.0;
567 answer.
at(15) = load;
CrossSection * giveCrossSection()
This class implements an triangular Discrete Kirchhoff Theory (DKT) element.
InternalStateType
Type representing the physical meaning of element or constitutive model internal variable.
void giveLocalCoordinates(FloatArray &answer, FloatArray &global)
void subtract(const FloatArray &src)
Subtracts array src to receiver.
virtual int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep)
Returns the integration point corresponding value in full form.
void beVectorProductOf(const FloatArray &v1, const FloatArray &v2)
Computes vector product (or cross product) of vectors given as parameters, , and stores the result in...
Wrapper around cell with vertex coordinates stored in FloatArray**.
virtual void computeLocalEdgeMapping(IntArray &edgeNodes, int iedge)
virtual double computeVolumeAround(GaussPoint *gp)
Returns volume related to given integration 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.
This class implements a structural material status information.
void giveCharacteristicTensor(FloatMatrix &answer, CharTensor type, GaussPoint *gp, TimeStep *tStep)
void clear()
Clears receiver (zero size).
virtual int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep)
Returns the integration point corresponding value in full form.
virtual double computeSurfaceVolumeAround(GaussPoint *gp, int iSurf)
Computes volume related to integration point on local surface.
virtual double edgeGiveTransformationJacobian(int iedge, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the edge Jacobian of transformation between local and global coordinates.
virtual IntegrationRule * GetSurfaceIntegrationRule(int iSurf)
virtual void giveEdgeDofMapping(IntArray &answer, int iEdge) const
Assembles edge dof mapping mask, which provides mapping between edge local DOFs and "global" element ...
virtual void computeSurfaceNMatrixAt(FloatMatrix &answer, int iSurf, GaussPoint *gp)
virtual void printOutputAt(FILE *file, TimeStep *tStep)
Prints output of receiver to stream, for given time step.
virtual void computeComponentArrayAt(FloatArray &answer, TimeStep *tStep, ValueModeType mode)
Computes boundary condition value - its components values at given time.
virtual double giveCoordinate(int i)
virtual void giveNodeCoordinates(double &x1, double &x2, double &x3, double &y1, double &y2, double &y3, double &z1, double &z2, double &z3)
Class implementing an array of integers.
int & at(int i)
Coefficient access function.
virtual int computeLoadLSToLRotationMatrix(FloatMatrix &answer, int iSurf, GaussPoint *gp)
Returns transformation matrix from local surface c.s to element local coordinate system of load vecto...
void rotatedWith(FloatMatrix &r, char mode)
Returns the receiver a rotated according the change-of-base matrix r.
Abstract base class representing integration rule.
void beDifferenceOf(const FloatArray &a, const FloatArray &b)
Sets receiver to be a - b.
virtual void giveSurfaceDofMapping(IntArray &answer, int iSurf) const
Assembles surface dof mapping mask, which provides mapping between surface local DOFs and "global" el...
bool isNotEmpty() const
Tests for empty matrix.
Class representing a 2d triangular linear interpolation based on area coordinates.
FloatMatrix GtoLRotationMatrix
Transformation Matrix form GtoL(3,3) is stored at the element level for computation efficiency...
virtual double giveWeight()
Returns integration weight of receiver.
StructuralCrossSection * giveStructuralCrossSection()
Helper function which returns the structural cross-section for the element.
virtual int computeLoadLEToLRotationMatrix(FloatMatrix &answer, int iEdge, GaussPoint *gp)
Returns transformation matrix from local edge c.s to element local coordinate system of load vector c...
void rotatedWith(const FloatMatrix &r, char mode= 'n')
Returns the receiver 'a' transformed using give transformation matrix r.
virtual int computeLoadGToLRotationMtrx(FloatMatrix &answer)
Returns transformation matrix from global coordinate system to local element coordinate system for el...
virtual void computeBodyLoadVectorAt(FloatArray &answer, Load *forLoad, TimeStep *tStep, ValueModeType mode)
Computes the load vector due to body load acting on receiver, at given time step. ...
Wrapper around element definition to provide FEICellGeometry interface.
void beProductOf(const FloatMatrix &aMatrix, const FloatArray &anArray)
Receiver becomes the result of the product of aMatrix and anArray.
virtual int global2local(FloatArray &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Default implementation using Newton's method to find the local coordinates.
virtual double computeEdgeVolumeAround(GaussPoint *gp, int iEdge)
Computes volume related to integration point on local edge.
double at(int i, int j) const
Coefficient access function.
void resize(int n)
Checks size of receiver towards requested bounds.
virtual void computeNmatrixAt(const FloatArray &iLocCoord, FloatMatrix &answer)
Computes interpolation matrix for element unknowns.
Class representing vector of real numbers.
Implementation of matrix containing floating point numbers.
virtual double give(CrossSectionProperty a, GaussPoint *gp)
Returns the value of cross section property at given point.
GaussPoint * getIntegrationPoint(int n)
Access particular integration point of receiver.
virtual const FloatMatrix * computeGtoLRotationMatrix()
const FloatArray & giveStressVector() const
Returns the const pointer to receiver's stress vector.
IntegrationPointStatus * giveMaterialStatus()
Returns reference to associated material status (NULL if not defined).
void resize(int rows, int cols)
Checks size of receiver towards requested bounds.
virtual int getRequiredNumberOfIntegrationPoints(integrationDomain dType, int approxOrder)
Abstract service.
static FEI2dTrLin interp_lin
Element geometry approximation.
void zero()
Zeroes all coefficients of receiver.
virtual bcGeomType giveBCGeoType() const
Returns geometry character of boundary condition.
std::vector< std::unique_ptr< IntegrationRule > > integrationRulesArray
List of integration rules of receiver (each integration rule contains associated integration points a...
virtual int SetUpPointsOnTriangle(int, MaterialMode mode)
Sets up receiver's integration points on triangular (area coords) integration domain.
virtual FloatArray * giveCoordinates()
void zero()
Zeroes all coefficient of receiver.
virtual bool computeLocalCoordinates(FloatArray &answer, const FloatArray &gcoords)
Computes the element local coordinates from given global coordinates.
Load is base abstract class for all loads.
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.
virtual bcValType giveBCValType() const
Returns receiver load type.
Class implementing node in finite element mesh.
double normalize()
Normalizes receiver.
Node * giveNode(int i) const
Returns reference to the i-th node of element.
virtual int computeGlobalCoordinates(FloatArray &answer, const FloatArray &lcoords)
Computes the global coordinates from given element's local coordinates.
const FloatArray & giveStrainVector() const
Returns the const pointer to receiver's strain vector.
Class representing integration point in finite element program.
Class representing solution step.
virtual void giveDofManDofIDMask(int inode, IntArray &) const
Returns dofmanager dof mask for node.
DKTPlate3d(int n, Domain *d)
const FloatArray & giveNaturalCoordinates()
Returns coordinate array of receiver.
virtual int SetUpPointsOnTriangle(int nPoints, MaterialMode mode)
Sets up receiver's integration points on triangular (area coords) integration domain.
Class representing Gaussian-quadrature integration rule.
void resize(int s)
Resizes receiver towards requested size.