59LTRSpaceBoundary :: LTRSpaceBoundary(
int n,
Domain *aDomain) :
67LTRSpaceBoundary :: initializeFrom(
InputRecord &ir,
int priority)
69 Structural3DElement :: initializeFrom(ir, priority);
75LTRSpaceBoundary :: postInitialize()
77 Structural3DElement :: postInitialize();
96LTRSpaceBoundary :: giveInterpolation()
const
108 fei->
evalN(n, lcoords, cellgeo);
111 for (
int i = 1; i <= 4; i++ ) {
117 answer.
add(n.
at(i), vertexCoords);
127LTRSpaceBoundary :: giveDofManDofIDMask(
int inode,
IntArray &answer)
const
130 answer = { E_xx, E_xy, E_xz, E_yx, E_yy, E_yz, E_zx, E_zy, E_zz };
132 answer = { D_u, D_v, D_w };
140 for (
int x = -1; x < 2; x++ ) {
141 for (
int y = -1; y < 2; y++ ) {
142 for (
int z = -1; z < 2; z++ ) {
143 if ( !( z == 0 && y == 0 && x == 0 ) ) {
160 double x1, x2, x3, x4, y1, y2, y3, y4, z1, z2, z3, z4, detJ, weight, volume;
181 detJ = ( ( x4 - x1 ) * ( y2 - y1 ) * ( z3 - z1 ) - ( x4 - x1 ) * ( y3 - y1 ) * ( z2 - z1 ) +
182 ( x3 - x1 ) * ( y4 - y1 ) * ( z2 - z1 ) - ( x2 - x1 ) * ( y4 - y1 ) * ( z3 - z1 ) +
183 ( x2 - x1 ) * ( y3 - y1 ) * ( z4 - z1 ) - ( x3 - x1 ) * ( y2 - y1 ) * ( z4 - z1 ) );
190 volume = detJ * weight;
198 double x1, x2, x3, x4, y1, y2, y3, y4, z1, z2, z3, z4, detJ;
220 detJ = ( ( x4 - x1 ) * ( y2 - y1 ) * ( z3 - z1 ) - ( x4 - x1 ) * ( y3 - y1 ) * ( z2 - z1 ) +
221 ( x3 - x1 ) * ( y4 - y1 ) * ( z2 - z1 ) - ( x2 - x1 ) * ( y4 - y1 ) * ( z3 - z1 ) +
222 ( x2 - x1 ) * ( y3 - y1 ) * ( z4 - z1 ) - ( x3 - x1 ) * ( y2 - y1 ) * ( z4 - z1 ) );
229 dNdx.
at(1, 1) = -( ( y3 - y2 ) * ( z4 - z2 ) - ( y4 - y2 ) * ( z3 - z2 ) );
230 dNdx.
at(2, 1) = ( y4 - y3 ) * ( z1 - z3 ) - ( y1 - y3 ) * ( z4 - z3 );
231 dNdx.
at(3, 1) = -( ( y1 - y4 ) * ( z2 - z4 ) - ( y2 - y4 ) * ( z1 - z4 ) );
232 dNdx.
at(4, 1) = ( y2 - y1 ) * ( z3 - z1 ) - ( y3 - y1 ) * ( z2 - z1 );
234 dNdx.
at(1, 2) = -( ( x4 - x2 ) * ( z3 - z2 ) - ( x3 - x2 ) * ( z4 - z2 ) );
235 dNdx.
at(2, 2) = ( x1 - x3 ) * ( z4 - z3 ) - ( x4 - x3 ) * ( z1 - z3 );
236 dNdx.
at(3, 2) = -( ( x2 - x4 ) * ( z1 - z4 ) - ( x1 - x4 ) * ( z2 - z4 ) );
237 dNdx.
at(4, 2) = ( x3 - x1 ) * ( z2 - z1 ) - ( x2 - x1 ) * ( z3 - z1 );
239 dNdx.
at(1, 3) = -( ( x3 - x2 ) * ( y4 - y2 ) - ( x4 - x2 ) * ( y3 - y2 ) );
240 dNdx.
at(2, 3) = ( x4 - x3 ) * ( y1 - y3 ) - ( x1 - x3 ) * ( y4 - y3 );
241 dNdx.
at(3, 3) = -( ( x1 - x4 ) * ( y2 - y4 ) - ( x2 - x4 ) * ( y1 - y4 ) );
242 dNdx.
at(4, 3) = ( x2 - x1 ) * ( y3 - y1 ) - ( x3 - x1 ) * ( y2 - y1 );
243 dNdx.
times(1. / detJ);
249 answer.
at(1, 3 * i - 2) = dNdx.
at(i, 1);
250 answer.
at(2, 3 * i - 1) = dNdx.
at(i, 2);
251 answer.
at(3, 3 * i - 0) = dNdx.
at(i, 3);
253 answer.
at(5, 3 * i - 2) = answer.
at(4, 3 * i - 1) = dNdx.
at(i, 3);
254 answer.
at(6, 3 * i - 2) = answer.
at(4, 3 * i - 0) = dNdx.
at(i, 2);
255 answer.
at(6, 3 * i - 1) = answer.
at(5, 3 * i - 0) = dNdx.
at(i, 1);
286 double x1, x2, x3, x4, y1, y2, y3, y4, z1, z2, z3, z4, detJ;
308 detJ = ( ( x4 - x1 ) * ( y2 - y1 ) * ( z3 - z1 ) - ( x4 - x1 ) * ( y3 - y1 ) * ( z2 - z1 ) +
309 ( x3 - x1 ) * ( y4 - y1 ) * ( z2 - z1 ) - ( x2 - x1 ) * ( y4 - y1 ) * ( z3 - z1 ) +
310 ( x2 - x1 ) * ( y3 - y1 ) * ( z4 - z1 ) - ( x3 - x1 ) * ( y2 - y1 ) * ( z4 - z1 ) );
317 dNdx.
at(1, 1) = -( ( y3 - y2 ) * ( z4 - z2 ) - ( y4 - y2 ) * ( z3 - z2 ) );
318 dNdx.
at(2, 1) = ( y4 - y3 ) * ( z1 - z3 ) - ( y1 - y3 ) * ( z4 - z3 );
319 dNdx.
at(3, 1) = -( ( y1 - y4 ) * ( z2 - z4 ) - ( y2 - y4 ) * ( z1 - z4 ) );
320 dNdx.
at(4, 1) = ( y2 - y1 ) * ( z3 - z1 ) - ( y3 - y1 ) * ( z2 - z1 );
322 dNdx.
at(1, 2) = -( ( x4 - x2 ) * ( z3 - z2 ) - ( x3 - x2 ) * ( z4 - z2 ) );
323 dNdx.
at(2, 2) = ( x1 - x3 ) * ( z4 - z3 ) - ( x4 - x3 ) * ( z1 - z3 );
324 dNdx.
at(3, 2) = -( ( x2 - x4 ) * ( z1 - z4 ) - ( x1 - x4 ) * ( z2 - z4 ) );
325 dNdx.
at(4, 2) = ( x3 - x1 ) * ( z2 - z1 ) - ( x2 - x1 ) * ( z3 - z1 );
327 dNdx.
at(1, 3) = -( ( x3 - x2 ) * ( y4 - y2 ) - ( x4 - x2 ) * ( y3 - y2 ) );
328 dNdx.
at(2, 3) = ( x4 - x3 ) * ( y1 - y3 ) - ( x1 - x3 ) * ( y4 - y3 );
329 dNdx.
at(3, 3) = -( ( x1 - x4 ) * ( y2 - y4 ) - ( x2 - x4 ) * ( y1 - y4 ) );
330 dNdx.
at(4, 3) = ( x2 - x1 ) * ( y3 - y1 ) - ( x3 - x1 ) * ( y2 - y1 );
331 dNdx.
times(1. / detJ);
337 answer.
at(1, 3 * i - 2) = dNdx.
at(i, 1);
338 answer.
at(2, 3 * i - 1) = dNdx.
at(i, 2);
339 answer.
at(3, 3 * i - 0) = dNdx.
at(i, 3);
340 answer.
at(4, 3 * i - 1) = dNdx.
at(i, 3);
341 answer.
at(7, 3 * i - 0) = dNdx.
at(i, 2);
342 answer.
at(5, 3 * i - 2) = dNdx.
at(i, 3);
343 answer.
at(8, 3 * i - 0) = dNdx.
at(i, 1);
344 answer.
at(6, 3 * i - 2) = dNdx.
at(i, 2);
345 answer.
at(9, 3 * i - 1) = dNdx.
at(i, 1);
368LTRSpaceBoundary :: giveInternalForcesVector(
FloatArray &answer,
TimeStep *tStep,
int useUpdatedGpRecord)
383 if ( useUpdatedGpRecord == 1 ) {
387 vStrain.
resize(StructuralMaterial :: giveSizeOfVoigtSymVector(gp->giveMaterialMode() ) );
400 StructuralMaterial :: giveReducedSymVectorForm(stressTemp, vStress, gp->giveMaterialMode() );
417 NLStructuralElement :: computeStiffnessMatrix(Korig, rMode, tStep);
431 unitCellSize.
at(1) = this->
giveNode(5)->giveCoordinate(1);
432 unitCellSize.
at(2) = this->
giveNode(5)->giveCoordinate(2);
433 unitCellSize.
at(3) = this->
giveNode(5)->giveCoordinate(3);
435 IntArray switches1, switches2, switches3, switches4;
447 for (
int i = 1; i <= 3; i++ ) {
448 k1.
at(i, 3 * i - 2) = unitCellSize.
at(1) * switches1.
at(1);
449 k1.
at(i, 3 * i - 1) = unitCellSize.
at(2) * switches1.
at(2);
450 k1.
at(i, 3 * i) = unitCellSize.
at(3) * switches1.
at(3);
453 for (
int i = 1; i <= 3; i++ ) {
454 k2.
at(i, 3 * i - 2) = unitCellSize.
at(1) * switches2.
at(1);
455 k2.
at(i, 3 * i - 1) = unitCellSize.
at(2) * switches2.
at(2);
456 k2.
at(i, 3 * i) = unitCellSize.
at(3) * switches2.
at(3);
459 for (
int i = 1; i <= 3; i++ ) {
460 k3.
at(i, 3 * i - 2) = unitCellSize.
at(1) * switches3.
at(1);
461 k3.
at(i, 3 * i - 1) = unitCellSize.
at(2) * switches3.
at(2);
462 k3.
at(i, 3 * i) = unitCellSize.
at(3) * switches3.
at(3);
465 for (
int i = 1; i <= 3; i++ ) {
466 k4.
at(i, 3 * i - 2) = unitCellSize.
at(1) * switches4.
at(1);
467 k4.
at(i, 3 * i - 1) = unitCellSize.
at(2) * switches4.
at(2);
468 k4.
at(i, 3 * i) = unitCellSize.
at(3) * switches4.
at(3);
475 answer.
assemble(k1, { 1, 2, 3 }, { 13, 14, 15, 16, 17, 18, 19, 20, 21 });
476 answer.
assemble(k2, { 4, 5, 6 }, { 13, 14, 15, 16, 17, 18, 19, 20, 21 });
477 answer.
assemble(k3, { 7, 8, 9 }, { 13, 14, 15, 16, 17, 18, 19, 20, 21 });
478 answer.
assemble(k4, { 10, 11, 12 }, { 13, 14, 15, 16, 17, 18, 19, 20, 21 });
482LTRSpaceBoundary :: recalculateCoordinates(
int nodeNumber,
FloatArray &coords)
486 unitCellSize.
at(1) = this->
giveNode(5)->giveCoordinate(1);
487 unitCellSize.
at(2) = this->
giveNode(5)->giveCoordinate(2);
488 unitCellSize.
at(3) = this->
giveNode(5)->giveCoordinate(3);
494 coords.
at(1) = this->
giveNode(nodeNumber)->giveCoordinate(1) + switches.
at(1) * unitCellSize.
at(1);
495 coords.
at(2) = this->
giveNode(nodeNumber)->giveCoordinate(2) + switches.
at(2) * unitCellSize.
at(2);
496 coords.
at(3) = this->
giveNode(nodeNumber)->giveCoordinate(3) + switches.
at(3) * unitCellSize.
at(3);
504 if ( type == IST_DisplacementVector ) {
513 return Element :: giveIPValue(answer, gp, type, tStep);
517LTRSpaceBoundary :: giveLengthInDir(
const FloatArray &normalToCrackPlane)
519 double maxDis, minDis;
526 for (
int i = 2; i <= nnode; i++ ) {
530 if ( dis > maxDis ) {
532 }
else if ( dis < minDis ) {
537 return maxDis - minDis;
541LTRSpaceBoundary :: NodalAveragingRecoveryMI_computeNodalValue(
FloatArray &answer,
int node,
#define REGISTER_Element(class)
Node * giveNode(int i) const
virtual bool isActivated(TimeStep *tStep)
virtual int giveNumberOfNodes() const
int numberOfDofMans
Number of dofmanagers.
void computeVectorOf(ValueModeType u, TimeStep *tStep, FloatArray &answer)
std::vector< std ::unique_ptr< IntegrationRule > > integrationRulesArray
CrossSection * giveCrossSection()
virtual IntegrationRule * giveDefaultIntegrationRulePtr()
const FloatArray giveVertexCoordinates(int i) const override
virtual void evalN(FloatArray &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo) const =0
Domain * giveDomain() const
Domain * domain
Link to domain object, useful for communicating with other FEM components.
int number
Component number.
void plusProduct(const FloatMatrix &b, const FloatArray &s, double dV)
double dotProduct(const FloatArray &x) const
Index giveSize() const
Returns the size of receiver.
void resizeWithValues(Index s, std::size_t allocChunk=0)
void zero()
Zeroes all coefficients of receiver.
void beProductOf(const FloatMatrix &aMatrix, const FloatArray &anArray)
void add(const FloatArray &src)
void subtract(const FloatArray &src)
void resizeWithData(Index, Index)
void resize(Index rows, Index cols)
void beProductOf(const FloatMatrix &a, const FloatMatrix &b)
void beTranspositionOf(const FloatMatrix &src)
void zero()
Zeroes all coefficient of receiver.
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
void beUnitMatrix()
Sets receiver to unity matrix.
const FloatArray & giveSubPatchCoordinates() const
Returns local sub-patch coordinates of the receiver.
double giveWeight()
Returns integration weight of receiver.
void computeBHmatrixAt(GaussPoint *gp, FloatMatrix &answer) override
void recalculateCoordinates(int nodeNumber, FloatArray &coords) override
static ParamKey IPK_LTRSpaceBoundary_location
[optional] Location of the element (1-4) - 1: left, 2: right, 3: top, 4: bottom
void computeStrainVector(FloatArray &answer, GaussPoint *gp, TimeStep *tStep) override
double computeVolumeAround(GaussPoint *gp) override
FEInterpolation * giveInterpolation() const override
static FEI3dTetLin interpolation
void giveSwitches(IntArray &answer, int location)
int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep) override
void computeBmatrixAt(GaussPoint *gp, FloatMatrix &answer, int lowerIndx=1, int upperIndx=ALL_STRAINS) override
virtual void computeTransformationMatrix(FloatMatrix &answer, TimeStep *tStep)
int nlGeometry
Flag indicating if geometrical nonlinearities apply.
NodalAveragingRecoveryModelInterface()
Constructor.
SpatialLocalizerInterface(Element *element)
Structural3DElement(int n, Domain *d)
void computeStressVector(FloatArray &answer, const FloatArray &strain, GaussPoint *gp, TimeStep *tStep) override
virtual void computeNmatrixAt(const FloatArray &iLocCoord, FloatMatrix &answer)
std::unique_ptr< FloatArray > initialDisplacements
Initial displacement vector, describes the initial nodal displacements when element has been casted.
const FloatArray & giveStressVector() const
Returns the const pointer to receiver's stress vector.
@ SpatialLocalizerInterfaceType
@ NodalAveragingRecoveryModelInterfaceType
#define PM_ELEMENT_ERROR_IFNOTSET(_pm, _componentnum, _paramkey)
#define PM_UPDATE_PARAMETER(_val, _pm, _ir, _componentnum, _paramkey, _prio)