58 mUsePlaneStrain(false)
91 int shearInd = 3, numRows = 3;
105 interp->
evaldNdx(dNdx, iNaturalGpCoord, geomWrapper);
106 interp->
evalN(N, iNaturalGpCoord, geomWrapper);
115 for (
int i = 1; i <= nDofMan; i++ ) {
118 globalCoord.
at(1) += N.
at(i) * nodeCoord [ 0 ];
119 globalCoord.
at(2) += N.
at(i) * nodeCoord [ 1 ];
124 std :: vector< FloatMatrix >Bc(nDofMan);
125 for (
int i = 1; i <= nDofMan; i++ ) {
128 BNode.
at(1, 1) = dNdx.
at(i, 1);
129 BNode.
at(2, 2) = dNdx.
at(i, 2);
130 BNode.
at(shearInd, 1) = dNdx.
at(i, 2);
133 BNode.
at(shearInd + 1, 2) = dNdx.
at(i, 1);
135 BNode.
at(shearInd, 2) = dNdx.
at(i, 1);
141 double enrDofsScaleFactor = 1.0;
148 std :: vector< FloatMatrix >Bd(nDofMan);
150 int counter = nDofMan * dim;
154 for (
int j = 1; j <= nDofMan; j++ ) {
163 if ( numEnrNode > 0 ) {
165 BdNode.
resize(numRows, numEnrNode * dim);
170 int nodeEnrCounter = 0;
173 for (
size_t i = 0; i < nodeEiIndices.size(); i++ ) {
180 std :: vector< FloatArray >efgpD;
183 std :: vector< double >efGP;
192 std :: vector< double >efNode;
197 int numEnr = efGP.size();
198 for (
int k = 0; k < numEnr; k++ ) {
203 for (
int p = 1; p <= dim; p++ ) {
204 grad_ef_N.
at(p) = dNdx.
at(j, p) * ( efGP [ k ] - efNode [ k ] ) + N.
at(j) * efgpD [ k ].at(p);
207 BdNode.
at(1, nodeEnrCounter + 1) = grad_ef_N.
at(1);
208 BdNode.
at(2, nodeEnrCounter + 2) = grad_ef_N.
at(2);
209 BdNode.
at(shearInd, nodeEnrCounter + 1) = grad_ef_N.
at(2);
212 BdNode.
at(shearInd + 1, nodeEnrCounter + 2) = grad_ef_N.
at(1);
214 BdNode.
at(shearInd, nodeEnrCounter + 2) = grad_ef_N.
at(1);
227 oAnswer.
resize(numRows, counter);
230 for (
int i = 0; i < nDofMan; i++ ) {
233 if ( Bd [ i ].isNotEmpty() ) {
234 Bd[i].times(enrDofsScaleFactor);
237 column += Bd [ i ].giveNumberOfColumns();
244 std :: vector< int >elNodes;
248 for (
int i = 0; i < numElNodes; i++ ) {
249 elNodes.push_back(i + 1);
270 for (
int i = 1; i <= nDofMan; i++ ) {
281 int counter = iLocNodeInd.size() * dim;
283 std :: vector< std :: vector< double > >Nd( iLocNodeInd.size() );
284 for (
int j = 1; j <= int( iLocNodeInd.size() ); j++ ) {
290 std :: vector< double > &NdNode = Nd [ j - 1 ];
291 NdNode.assign(numEnrNode, 0.0);
296 size_t nodeCounter = 0;
300 for (
size_t i = 0; i < nodeEiIndices.size(); i++ ) {
308 std :: vector< double >efGP;
309 ei->
evaluateEnrFuncAt(efGP, globalCoord, iLocCoord, globalNodeInd, iEl, Nc, elNodes);
314 std :: vector< double >efNode;
321 int numEnr = efGP.size();
322 for (
int k = 0; k < numEnr; k++ ) {
323 if ( iSetDiscontContribToZero ) {
324 NdNode [ nodeCounter ] = 0.0;
326 NdNode [ nodeCounter ] = ( efGP [ k ] - efNode [ k ] ) * Nc.
at(j);
335 int numN = iLocNodeInd.size();
337 for (
int j = 1; j <= int( iLocNodeInd.size() ); j++ ) {
338 numN += Nd [ j - 1 ].size();
346 for (
int i = 1; i <= int( iLocNodeInd.size() ); i++ ) {
347 NTot.
at(column) = Nc.
at(iLocNodeInd [ i - 1 ]);
350 const std :: vector< double > &NdNode = Nd [ i - 1 ];
351 for (
size_t j = 1; j <= NdNode.size(); j++ ) {
352 NTot.
at(column) = NdNode [ j - 1 ]*enrDofsScaleFactor;
366 for (
size_t i = 0; i < nodeEiIndices.size(); i++ ) {
386 bool partitionSucceeded =
false;
392 bool firstIntersection =
true;
394 std :: vector< std :: vector< FloatArray > >pointPartitions;
395 std :: vector< Triangle >allTri;
397 std :: vector< int >enrichingEIs;
402 for (
size_t p = 0; p < enrichingEIs.size(); p++ ) {
403 int eiIndex = enrichingEIs [ p ];
405 if ( firstIntersection ) {
407 double startXi, endXi;
408 bool intersection =
false;
411 if ( intersection ) {
412 firstIntersection =
false;
415 for (
int i = 0; i < int ( pointPartitions.size() ); i++ ) {
420 partitionSucceeded =
true;
425 std :: vector< Triangle >allTriCopy;
426 for (
size_t triIndex = 0; triIndex < allTri.size(); triIndex++ ) {
428 std :: vector< std :: vector< FloatArray > >pointPartitionsTri;
429 double startXi, endXi;
430 bool intersection =
false;
433 if ( intersection ) {
435 for (
int i = 0; i < int ( pointPartitionsTri.size() ); i++ ) {
439 allTriCopy.push_back(allTri [ triIndex ]);
455 std :: stringstream str3;
457 str3 <<
"TriEl" << elIndex <<
".vtk";
458 std :: string name3 = str3.str();
460 if ( allTri.size() > 0 ) {
467 if ( partitionSucceeded ) {
468 std :: vector< std :: unique_ptr< IntegrationRule > >intRule;
470 intRule [ 0 ]->SetUpPointsOnTriangle(xMan->
giveNumGpPerTri(), matMode);
475 return partitionSucceeded;
484 std :: vector< const FloatArray * >nodeCoord;
495 oIntersection =
false;
499 std :: vector< FloatArray >intersecPoints;
500 std :: vector< int >intersecEdgeInd;
502 std :: vector< double >minDistArcPos;
505 for (
size_t i = 0; i < intersecPoints.size(); i++ ) {
506 intersecPoints [ i ].resizeWithValues(dim);
510 if ( intersecPoints.size() == 2 ) {
514 oPointPartitions.resize(2);
520 oCrackStartXi =
std :: min(minDistArcPos [ 0 ], minDistArcPos [ 1 ]);
521 oCrackEndXi =
std :: max(minDistArcPos [ 0 ], minDistArcPos [ 1 ]);
523 oIntersection =
true;
525 }
else if ( intersecPoints.size() == 1 ) {
526 std :: vector< FloatArray >edgeCoords;
531 bool foundTip =
false;
532 double tipArcPos = -1.0;
540 oPointPartitions.clear();
544 for (
int i = 1; i <= nEdges; i++ ) {
551 int nsLoc = bNodes.
at(1);
557 if ( i == intersecEdgeInd [ 0 ] ) {
558 oPointPartitions.
push_back( std :: vector< FloatArray >() );
559 oPointPartitions [ triPassed ].push_back(tipCoord);
560 oPointPartitions [ triPassed ].push_back(intersecPoints [ 0 ]);
561 oPointPartitions [ triPassed ].push_back(coordE);
564 oPointPartitions.push_back( std :: vector< FloatArray >() );
565 oPointPartitions [ triPassed ].push_back(tipCoord);
566 oPointPartitions [ triPassed ].push_back(coordS);
567 oPointPartitions [ triPassed ].push_back(intersecPoints [ 0 ]);
570 oPointPartitions.push_back( std :: vector< FloatArray >() );
571 oPointPartitions [ triPassed ].push_back(tipCoord);
572 oPointPartitions [ triPassed ].push_back(coordS);
573 oPointPartitions [ triPassed ].push_back(coordE);
589 if ( i == intersecEdgeInd [ 0 ] ) {
596 if( dist_S_2 < dist_C_2 ) {
597 oPointPartitions.push_back( std :: vector< FloatArray >() );
598 oPointPartitions [ triPassed ].push_back(intersecPoints [ 0 ]);
599 oPointPartitions [ triPassed ].push_back(tipCoord);
600 oPointPartitions [ triPassed ].push_back(coordS);
603 oPointPartitions.push_back( std :: vector< FloatArray >() );
604 oPointPartitions [ triPassed ].push_back(coordC);
605 oPointPartitions [ triPassed ].push_back(tipCoord);
606 oPointPartitions [ triPassed ].push_back(intersecPoints [ 0 ]);
609 oPointPartitions.push_back( std :: vector< FloatArray >() );
610 oPointPartitions [ triPassed ].push_back(coordE);
611 oPointPartitions [ triPassed ].push_back(tipCoord);
612 oPointPartitions [ triPassed ].push_back(coordC);
618 oPointPartitions.push_back( std :: vector< FloatArray >() );
619 oPointPartitions [ triPassed ].push_back(coordC);
620 oPointPartitions [ triPassed ].push_back(tipCoord);
621 oPointPartitions [ triPassed ].push_back(coordS);
625 oPointPartitions.push_back( std :: vector< FloatArray >() );
626 oPointPartitions [ triPassed ].push_back(intersecPoints [ 0 ]);
627 oPointPartitions [ triPassed ].push_back(tipCoord);
628 oPointPartitions [ triPassed ].push_back(coordC);
631 oPointPartitions.push_back( std :: vector< FloatArray >() );
632 oPointPartitions [ triPassed ].push_back(coordE);
633 oPointPartitions [ triPassed ].push_back(tipCoord);
634 oPointPartitions [ triPassed ].push_back(coordC);
641 oPointPartitions.push_back( std :: vector< FloatArray >() );
642 oPointPartitions [ triPassed ].push_back(tipCoord);
643 oPointPartitions [ triPassed ].push_back(coordS);
644 oPointPartitions [ triPassed ].push_back(coordC);
647 oPointPartitions.push_back( std :: vector< FloatArray >() );
648 oPointPartitions [ triPassed ].push_back(tipCoord);
649 oPointPartitions [ triPassed ].push_back(coordC);
650 oPointPartitions [ triPassed ].push_back(coordE);
656 printf(
"bNodes.giveSize(): %d\n", bNodes.
giveSize() );
663 oCrackStartXi =
std :: min(minDistArcPos [ 0 ], tipArcPos);
664 oCrackEndXi =
std :: max(minDistArcPos [ 0 ], tipArcPos);
669 oPointPartitions.resize(1);
673 oPointPartitions [ 0 ].
push_back(nodeCoord);
678 oPointPartitions [ 0 ].push_back(intersecPoints [ 0 ]);
687 oCrackStartXi = minDistArcPos [ 0 ];
688 oCrackEndXi = tipArcPos;
691 oIntersection =
true;
700 oIntersection =
false;
709 std :: vector< const FloatArray * >nodeCoord;
710 for (
int i = 1; i <= 3; i++ ) {
714 elCenter.times(1.0 / 3.0);
721 oIntersection =
false;
725 std :: vector< FloatArray >intersecPoints;
726 std :: vector< int >intersecEdgeInd;
728 std :: vector< double >minDistArcPos;
730 for (
size_t i = 0; i < intersecPoints.size(); i++ ) {
731 intersecPoints [ i ].resizeWithValues(dim);
734 if ( intersecPoints.size() == 2 ) {
739 oPointPartitions.resize(2);
745 oCrackStartXi =
std :: min(minDistArcPos [ 0 ], minDistArcPos [ 1 ]);
746 oCrackEndXi =
std :: max(minDistArcPos [ 0 ], minDistArcPos [ 1 ]);
748 oIntersection =
true;
750 }
else if ( intersecPoints.size() == 1 ) {
752 std :: vector< FloatArray >edgeCoords, nodeCoords;
758 bool foundTip =
false;
759 double tipArcPos = -1.0;
767 oPointPartitions.resize( ( nEdges + 1 ) );
771 for (
int i = 1; i <= nEdges; i++ ) {
780 if ( i == intersecEdgeInd [ 0 ] ) {
781 oPointPartitions [ triPassed ].
push_back(tipCoord);
782 oPointPartitions [ triPassed ].push_back(intersecPoints [ 0 ]);
783 oPointPartitions [ triPassed ].push_back(coordE);
786 oPointPartitions [ triPassed ].push_back(tipCoord);
787 oPointPartitions [ triPassed ].push_back(coordS);
788 oPointPartitions [ triPassed ].push_back(intersecPoints [ 0 ]);
791 oPointPartitions [ triPassed ].push_back(tipCoord);
792 oPointPartitions [ triPassed ].push_back(coordS);
793 oPointPartitions [ triPassed ].push_back(coordE);
800 oCrackStartXi =
std :: min(minDistArcPos [ 0 ], tipArcPos);
801 oCrackEndXi =
std :: max(minDistArcPos [ 0 ], tipArcPos);
804 oPointPartitions.resize(1);
806 for (
int i = 1; i <= 3; i++ ) {
808 oPointPartitions [ 0 ].
push_back(nodeCoord);
813 oCrackStartXi = minDistArcPos [ 0 ];
814 oCrackEndXi = tipArcPos;
817 oIntersection =
true;
821 oIntersection =
false;
825 const std :: vector< FloatArray > &iIntersecPoints,
826 const std :: vector< const FloatArray * > &iNodeCoord)
const 828 for (
size_t i = 0; i < iIntersecPoints.size(); i++ ) {
829 oPointPartitions [ 0 ].push_back(iIntersecPoints [ i ]);
830 oPointPartitions [ 1 ].push_back(iIntersecPoints [ i ]);
834 const double &x1 = iIntersecPoints [ 0 ].at(1);
835 const double &x2 = iIntersecPoints [ 1 ].at(1);
836 const double &y1 = iIntersecPoints [ 0 ].at(2);
837 const double &y2 = iIntersecPoints [ 1 ].at(2);
839 for (
size_t i = 1; i <= iNodeCoord.size(); i++ ) {
840 const double &x = iNodeCoord [ i - 1 ]->at(1);
841 const double &y = iNodeCoord [ i - 1 ]->at(2);
842 double det = ( x1 - x ) * ( y2 - y ) - ( x2 - x ) * ( y1 - y );
845 oPointPartitions [ 0 ].push_back(* iNodeCoord [ i - 1 ]);
847 oPointPartitions [ 1 ].push_back(* iNodeCoord [ i - 1 ]);
854 const double levelSetTol2 = 1.0e-12;
862 if ( interp2d == NULL ) {
863 OOFEM_ERROR(
"In XfemElementInterface :: partitionEdgeSegment: failed to cast to FEInterpolation2d.\n")
875 oSegments.push_back(seg1);
880 for (
int eiIndex = 1; eiIndex <= numEI; eiIndex++ ) {
883 std :: vector< Line >newSegments;
886 size_t numSeg = oSegments.size();
887 for (
size_t segInd = 0; segInd < numSeg; segInd++ ) {
890 const FloatArray &seg_xS = oSegments [ segInd ].giveVertex(1);
891 const FloatArray &seg_xE = oSegments [ segInd ].giveVertex(2);
896 bool evaluationSucceeded =
true;
913 double phiS = 0.0, phiE = 0.0;
914 double gammaS = 0.0, gammaE = 0.0;
917 for (
int i = 1; i <= Ns.
giveSize(); i++ ) {
919 double phiNode = 0.0;
921 evaluationSucceeded =
false;
924 double gammaNode = 0.0;
926 evaluationSucceeded =
false;
929 phiS += Ns.
at(i) * phiNode;
930 gammaS += Ns.
at(i) * gammaNode;
932 phiE += Ne.
at(i) * phiNode;
933 gammaE += Ne.
at(i) * gammaNode;
937 if ( phiS * phiE < levelSetTol2 && evaluationSucceeded ) {
939 double gamma = 0.5 * ( 1.0 - xi ) * gammaS + 0.5 * ( 1.0 + xi ) * gammaE;
942 if ( gamma > -iTangDistPadding ) {
950 for (
int i = 1; i <= nDim; i++ ) {
951 ( p.at(i) ) = 0.5 * ( 1.0 - xi ) * ( ( seg_xS.
at(i) ) ) + 0.5 * ( 1.0 + xi ) * ( ( seg_xE.
at(i) ) );
954 Line segA(seg_xS, p);
955 newSegments.push_back(segA);
956 Line segB(p, seg_xE);
957 newSegments.push_back(segB);
960 oIntersectionPoints.push_back(p);
962 newSegments.push_back(oSegments [ segInd ]);
966 newSegments.push_back(oSegments [ segInd ]);
970 oSegments = newSegments;
987 for (
size_t i = 0; i < numSeg; i++ ) {
994 for (
size_t i = 0; i < numSeg; i++ ) {
1026 int counter = nDofMan * dim;
1028 std :: vector< std :: vector< double > >Nd(nDofMan);
1030 for (
int j = 1; j <= nDofMan; j++ ) {
1035 std :: vector< double > &NdNode = Nd [ j - 1 ];
1036 NdNode.assign(numEnrNode, 0.0);
1044 for (
size_t i = 0; i < nodeEiIndices.size(); i++ ) {
1049 if ( geoEI != NULL ) {
1053 std :: vector< double >efJumps;
1054 bool gpLivesOnCurrentCrack = ( nodeEiIndices [ i ] == iEnrItemIndex );
1056 bool gpLivesOnInteractingCrack =
false;
1057 for (
int touchingEIIndex : iTouchingEnrItemIndices ) {
1058 if ( nodeEiIndices [ i ] == touchingEIIndex ) {
1059 gpLivesOnInteractingCrack =
true;
1063 if ( nodeEiIndices [ i ] == iEnrItemIndex || gpLivesOnInteractingCrack ) {
1067 for (
int k = 0; k < numEnr; k++ ) {
1068 if ( nodeEiIndices [ i ] == iEnrItemIndex || gpLivesOnInteractingCrack ) {
1069 NdNode [ ndNodeInd ] = efJumps [ k ] * Nc.
at(j);
1071 NdNode [ ndNodeInd ] = 0.0;
1084 for (
int j = 1; j <= nDofMan; j++ ) {
1085 numN += Nd [ j - 1 ].size();
1093 for (
int i = 1; i <= nDofMan; i++ ) {
1097 const std :: vector< double > &NdNode = Nd [ i - 1 ];
1098 for (
size_t j = 1; j <= NdNode.size(); j++ ) {
1099 NTot.
at(column) = NdNode [ j - 1 ]*enrDofsScaleFactor;
virtual void XfemElementInterface_prepareNodesForDelaunay(std::vector< std::vector< FloatArray > > &oPointPartitions, double &oCrackStartXi, double &oCrackEndXi, int iEnrItemIndex, bool &oIntersection)
Returns an array of array of points. Each array of points defines the points of a subregion of the el...
void evaluateEnrFuncJumps(std::vector< double > &oEnrFuncJumps, int iNodeInd, GaussPoint &iGP, bool iGPLivesOnCurrentCrack) const
const FloatArray & giveVertex(int n) const
Abstract class representing entity, which is included in the FE model using one (or more) global func...
virtual void evalN(FloatArray &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo)=0
Evaluates the array of interpolation functions (shape functions) at given point.
int giveNumGpPerTri() const
bool isDofManEnriched(const DofManager &iDMan) const
int giveGlobalNumber() const
const std::vector< int > & giveNodeEnrichmentItemIndices(int iNodeIndex) const
virtual void evaluateEnrFuncAt(std::vector< double > &oEnrFunc, const FloatArray &iGlobalCoord, const FloatArray &iLocalCoord, int iNodeInd, const Element &iEl) const =0
double & at(int i)
Coefficient access function.
void XfemElementInterface_createEnrBHmatrixAt(FloatMatrix &oAnswer, GaussPoint &iGP, Element &iEl)
Creates enriched BH-matrix.
int giveGlobalNumber() const
void setIntegrationRules(std::vector< std::unique_ptr< IntegrationRule > > irlist)
Sets integration rules.
virtual ~XfemElementInterface()
Class representing a general abstraction for surface finite element interpolation class...
void giveElementEnrichmentItemIndices(std::vector< int > &oElemEnrInd, int iElementIndex) const
virtual FloatArray * giveCoordinates()
Abstract base class for all finite elements.
Base class for dof managers.
virtual MaterialMode giveMaterialMode()
Returns material mode for receiver integration points.
MaterialMode
Type representing material mode of integration point.
virtual void evaluateEnrFuncDerivAt(std::vector< FloatArray > &oEnrFuncDeriv, const FloatArray &iGlobalCoord, const FloatArray &iLocalCoord, int iNodeInd, const Element &iEl) const =0
Class implementing an array of integers.
int & at(int i)
Coefficient access function.
void XfemElementInterface_createEnrBmatrixAt(FloatMatrix &oAnswer, GaussPoint &iGP, Element &iEl)
Creates enriched B-matrix.
XfemManager * giveXfemManager()
virtual int giveNumberOfDofManagers() const
virtual void computeLocalEdgeMapping(IntArray &edgeNodes, int iedge)=0
virtual FEInterpolation * giveInterpolation() const
void putPointsInCorrectPartition(std::vector< std::vector< FloatArray > > &oPointPartitions, const std::vector< FloatArray > &iIntersecPoints, const std::vector< const FloatArray * > &iNodeCoord) const
virtual void evaluateEnrFuncInNode(std::vector< double > &oEnrFunc, const Node &iNode) const =0
void setSubMatrix(const FloatMatrix &src, int sr, int sc)
Adds the given matrix as sub-matrix to receiver.
bool giveVtkDebug() const
int giveNumDofManEnrichments(const DofManager &iDMan) const
Class representing a general abstraction for finite element interpolation class.
int giveNumberOfEnrichmentItems() const
void triangulate(const std::vector< FloatArray > &iVertices, std::vector< Triangle > &oTriangles) const
virtual bool XfemElementInterface_updateIntegrationRule()
Updates integration rule based on the triangulation.
const IntArray & giveDofManArray() const
void updateYourselfCZ(TimeStep *tStep)
XfemElementInterface(Element *e)
Constructor.
double giveEnrDofScaleFactor() const
virtual void computeIntersectionPoints(std::vector< FloatArray > &oIntersectionPoints, std::vector< int > &oIntersectedEdgeInd, Element *element, std::vector< double > &oMinDistArcPos) const
O(n4) algorithm, only for testing purposes.
bool evalLevelSetNormalInNode(double &oLevelSet, int iNodeInd, const FloatArray &iGlobalCoord) const
void XfemElementInterface_createEnrNmatrixAt(FloatMatrix &oAnswer, const FloatArray &iLocCoord, Element &iEl, bool iSetDiscontContribToZero)
Creates enriched N-matrix.
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.
void resizeWithValues(int s, int allocChunk=0)
Checks size of receiver towards requested bounds.
double at(int i, int j) const
Coefficient access function.
double distance_square(const FloatArray &iP1, const FloatArray &iP2, double &oXi, double &oXiUnbounded) const
virtual bool giveElementTipCoord(FloatArray &oCoord, double &oArcPos, Element &iEl, const FloatArray &iElCenter) const
void partitionEdgeSegment(int iBndIndex, std::vector< Line > &oSegments, std::vector< FloatArray > &oIntersectionPoints, const double &iTangDistPadding=0.0)
Partition a boundary segment to account for cracks cutting the boundary.
int giveDofManPlaceInArray(int iGlobalDofManNum) const
Returns the array index of the dofman with global number iGlobalDofManNum, so that it can be fetched ...
const FloatArray & giveGlobalCoordinates()
std::vector< std::unique_ptr< IntegrationRule > > mpCZIntegrationRules
void ComputeBOrBHMatrix(FloatMatrix &oAnswer, GaussPoint &iGP, Element &iEl, bool iComputeBH, const FloatArray &iNaturalGpCoord)
Help function for computation of B and BH.
void beNMatrixOf(const FloatArray &n, int nsd)
Assigns the receiver to be a repeated diagonal matrix.
std::vector< std::unique_ptr< IntegrationRule > > mpCZExtraIntegrationRules
virtual void boundaryGiveNodes(IntArray &answer, int boundary)=0
Gives the boundary nodes for requested boundary number.
bool evalLevelSetTangInNode(double &oLevelSet, int iNodeInd, const FloatArray &iGlobalCoord) const
Class representing vector of real numbers.
int XfemElementInterface_giveNumDofManEnrichments(const DofManager &iDMan, XfemManager &iXMan) const
Computes total number of enrichments in a node.
Implementation of matrix containing floating point numbers.
MaterialMode giveMaterialMode()
This class manages the xfem part.
const FloatArray & giveNodeCoordinates() const
As giveCoordinates, but non-virtual and therefore faster (because it can be inlined).
void resize(int rows, int cols)
Checks size of receiver towards requested bounds.
bool isElementEnriched(const Element *elem)
bool mUsePlaneStrain
Flag that tells if plane stress or plane strain is assumed.
void zero()
Zeroes all coefficients of receiver.
EnrichmentItem * giveEnrichmentItem(int n)
virtual int giveNumberOfEdges() const
Returns number of edges.
virtual bool computeLocalCoordinates(FloatArray &answer, const FloatArray &gcoords)
Computes the element local coordinates from given global coordinates.
virtual void XfemElementInterface_partitionElement(std::vector< Triangle > &oTriangles, const std::vector< FloatArray > &iPoints)
Partitions the element into patches by a triangulation.
int giveElementPlaceInArray(int iGlobalElNum) const
Returns the array index of the element with global number iGlobalElNum, so that it can be fetched by ...
virtual FloatArray * giveCoordinates()
Domain * giveDomain() const
static double calcXiZeroLevel(const double &iQ1, const double &iQ2)
void push_back(const double &iVal)
Add one element.
int giveSize() const
Returns the size of receiver.
void computeNCohesive(FloatMatrix &oN, GaussPoint &iGP, int iEnrItemIndex, const std::vector< int > &iTouchingEnrItemIndices)
Compute N-matrix for cohesive zone.
virtual double giveCoordinate(int i)
the oofem namespace is to define a context or scope in which all oofem names are defined.
DofManager * giveDofManager(int i) const
Class implementing node in finite element mesh.
Node * giveNode(int i) const
Returns reference to the i-th node of element.
void computeDisplacementJump(GaussPoint &iGP, FloatArray &oJump, const FloatArray &iSolVec, const FloatMatrix &iNMatrix)
Class representing integration point in finite element program.
Class representing solution step.
EnrichmentItem with geometry described by BasicGeometry.
virtual double evaldNdx(FloatMatrix &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo)=0
Evaluates the matrix of derivatives of interpolation functions (shape functions) at given point...
PatchIntegrationRule provides integration over a triangle patch.
const FloatArray & giveNaturalCoordinates()
Returns coordinate array of receiver.
void resize(int s)
Resizes receiver towards requested size.