OOFEM
2.4
OOFEM.org - Object Oriented Finite Element Solver
|
Provides Xfem interface for an element. More...
#include <xfemelementinterface.h>
Public Member Functions | |
virtual const char * | giveClassName () const |
std::string | errorInfo (const char *func) const |
XfemElementInterface (Element *e) | |
Constructor. More... | |
virtual | ~XfemElementInterface () |
XfemElementInterface (const XfemElementInterface &src)=delete | |
XfemElementInterface & | operator= (const XfemElementInterface &src)=delete |
void | XfemElementInterface_createEnrBmatrixAt (FloatMatrix &oAnswer, GaussPoint &iGP, Element &iEl) |
Creates enriched B-matrix. More... | |
void | XfemElementInterface_createEnrBHmatrixAt (FloatMatrix &oAnswer, GaussPoint &iGP, Element &iEl) |
Creates enriched BH-matrix. More... | |
void | ComputeBOrBHMatrix (FloatMatrix &oAnswer, GaussPoint &iGP, Element &iEl, bool iComputeBH, const FloatArray &iNaturalGpCoord) |
Help function for computation of B and BH. More... | |
void | XfemElementInterface_createEnrNmatrixAt (FloatMatrix &oAnswer, const FloatArray &iLocCoord, Element &iEl, bool iSetDiscontContribToZero) |
Creates enriched N-matrix. More... | |
void | XfemElementInterface_createEnrNmatrixAt (FloatMatrix &oAnswer, const FloatArray &iLocCoord, Element &iEl, const std::vector< int > &iLocNodeInd, bool iSetDiscontContribToZero) |
Creates enriched N-matrix for a chosen subset of element nodes. More... | |
int | XfemElementInterface_giveNumDofManEnrichments (const DofManager &iDMan, XfemManager &iXMan) const |
Computes total number of enrichments in a node. More... | |
virtual void | XfemElementInterface_partitionElement (std::vector< Triangle > &oTriangles, const std::vector< FloatArray > &iPoints) |
Partitions the element into patches by a triangulation. More... | |
virtual bool | XfemElementInterface_updateIntegrationRule () |
Updates integration rule based on the triangulation. More... | |
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 element. More... | |
virtual void | XfemElementInterface_prepareNodesForDelaunay (std::vector< std::vector< FloatArray > > &oPointPartitions, double &oCrackStartXi, double &oCrackEndXi, const Triangle &iTri, int iEnrItemIndex, bool &oIntersection) |
void | putPointsInCorrectPartition (std::vector< std::vector< FloatArray > > &oPointPartitions, const std::vector< FloatArray > &iIntersecPoints, const std::vector< const FloatArray * > &iNodeCoord) 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. More... | |
MaterialMode | giveMaterialMode () |
void | updateYourselfCZ (TimeStep *tStep) |
void | computeDisplacementJump (GaussPoint &iGP, FloatArray &oJump, const FloatArray &iSolVec, const FloatMatrix &iNMatrix) |
void | computeNCohesive (FloatMatrix &oN, GaussPoint &iGP, int iEnrItemIndex, const std::vector< int > &iTouchingEnrItemIndices) |
Compute N-matrix for cohesive zone. More... | |
Public Member Functions inherited from oofem::Interface | |
Interface () | |
Constructor. More... | |
virtual | ~Interface () |
Public Attributes | |
Element * | element |
std::vector< int > | mCZEnrItemIndices |
Index of enrichment items associated with cohesive zones. More... | |
std::vector< std::vector< int > > | mCZTouchingEnrItemIndices |
Indices of enrichment items that give cohesive zone contributions to a given GP, even though the GP is not located on any of these enrichment items. More... | |
bool | mUsePlaneStrain |
Flag that tells if plane stress or plane strain is assumed. More... | |
std::vector< std::unique_ptr< IntegrationRule > > | mpCZIntegrationRules |
std::vector< std::unique_ptr< IntegrationRule > > | mpCZExtraIntegrationRules |
std::vector< std::unique_ptr< IntegrationRule > > | mpCZIntegrationRules_tmp |
std::vector< std::unique_ptr< IntegrationRule > > | mpCZExtraIntegrationRules_tmp |
std::vector< std::unique_ptr< IntegrationRule > > | mIntRule_tmp |
Provides Xfem interface for an element.
Definition at line 63 of file xfemelementinterface.h.
oofem::XfemElementInterface::XfemElementInterface | ( | Element * | e | ) |
Constructor.
Definition at line 55 of file xfemelementinterface.C.
References mpCZExtraIntegrationRules, and mpCZIntegrationRules.
|
virtual |
Definition at line 64 of file xfemelementinterface.C.
|
delete |
void oofem::XfemElementInterface::ComputeBOrBHMatrix | ( | FloatMatrix & | oAnswer, |
GaussPoint & | iGP, | ||
Element & | iEl, | ||
bool | iComputeBH, | ||
const FloatArray & | iNaturalGpCoord | ||
) |
Help function for computation of B and BH.
Avoid duplication of code.
Definition at line 77 of file xfemelementinterface.C.
References oofem::FloatArray::at(), oofem::FloatMatrix::at(), oofem::Element::computeLocalCoordinates(), element, oofem::FEInterpolation::evaldNdx(), oofem::FEInterpolation::evalN(), oofem::EnrichmentItem::evaluateEnrFuncAt(), oofem::EnrichmentItem::evaluateEnrFuncDerivAt(), oofem::EnrichmentItem::evaluateEnrFuncInNode(), oofem::Element::giveDofManager(), oofem::Element::giveDofManArray(), oofem::FEMComponent::giveDomain(), oofem::XfemManager::giveEnrDofScaleFactor(), oofem::XfemManager::giveEnrichmentItem(), oofem::DofManager::giveGlobalNumber(), oofem::Element::giveInterpolation(), oofem::Element::giveNode(), oofem::Node::giveNodeCoordinates(), oofem::XfemManager::giveNodeEnrichmentItemIndices(), oofem::Element::giveNumberOfDofManagers(), oofem::Domain::giveXfemManager(), oofem::Domain::hasXfemManager(), oofem::EnrichmentItem::isDofManEnriched(), mUsePlaneStrain, N, oofem::FloatArray::resize(), oofem::FloatMatrix::resize(), oofem::FloatMatrix::setSubMatrix(), and XfemElementInterface_giveNumDofManEnrichments().
Referenced by oofem::XfemStructuralElementInterface::computeCohesiveForces(), oofem::XfemStructuralElementInterface::computeCohesiveTangent(), XfemElementInterface_createEnrBHmatrixAt(), and XfemElementInterface_createEnrBmatrixAt().
void oofem::XfemElementInterface::computeDisplacementJump | ( | oofem::GaussPoint & | iGP, |
oofem::FloatArray & | oJump, | ||
const FloatArray & | iSolVec, | ||
const FloatMatrix & | iNMatrix | ||
) |
Definition at line 1002 of file xfemelementinterface.C.
References oofem::FloatArray::beProductOf(), and oofem::FloatArray::resize().
Referenced by oofem::XfemStructuralElementInterface::computeCohesiveForces(), and oofem::XfemStructuralElementInterface::computeCohesiveTangent().
void oofem::XfemElementInterface::computeNCohesive | ( | FloatMatrix & | oN, |
GaussPoint & | iGP, | ||
int | iEnrItemIndex, | ||
const std::vector< int > & | iTouchingEnrItemIndices | ||
) |
Compute N-matrix for cohesive zone.
Definition at line 1009 of file xfemelementinterface.C.
References oofem::FloatArray::at(), oofem::FloatMatrix::beNMatrixOf(), oofem::Element::computeLocalCoordinates(), element, oofem::FEInterpolation::evalN(), oofem::GeometryBasedEI::evaluateEnrFuncJumps(), oofem::Element::giveDofManager(), oofem::FEMComponent::giveDomain(), oofem::XfemManager::giveEnrDofScaleFactor(), oofem::XfemManager::giveEnrichmentItem(), oofem::GaussPoint::giveGlobalCoordinates(), oofem::DofManager::giveGlobalNumber(), oofem::Element::giveInterpolation(), oofem::XfemManager::giveNodeEnrichmentItemIndices(), oofem::Element::giveNumberOfDofManagers(), oofem::EnrichmentItem::giveNumDofManEnrichments(), oofem::Domain::giveXfemManager(), oofem::EnrichmentItem::isDofManEnriched(), oofem::FloatArray::resize(), XfemElementInterface_giveNumDofManEnrichments(), and oofem::FloatArray::zero().
Referenced by oofem::XfemStructuralElementInterface::computeCohesiveForces(), and oofem::XfemStructuralElementInterface::computeCohesiveTangent().
|
inline |
Definition at line 83 of file xfemelementinterface.h.
|
inlinevirtual |
Implements oofem::Interface.
Reimplemented in oofem::Shell7BaseXFEM, oofem::Tr2Shell7XFEM, oofem::TrPlaneStress2dXFEM, oofem::QTrPlaneStress2dXFEM, and oofem::PlaneStress2dXfem.
Definition at line 82 of file xfemelementinterface.h.
MaterialMode oofem::XfemElementInterface::giveMaterialMode | ( | ) |
Definition at line 974 of file xfemelementinterface.C.
References mUsePlaneStrain.
Referenced by oofem::QTrPlaneStress2dXFEM::giveMaterialMode(), oofem::PlaneStress2dXfem::giveMaterialMode(), and oofem::TrPlaneStress2dXFEM::giveMaterialMode().
|
delete |
void oofem::XfemElementInterface::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.
This is a necessary step to evaluate integrals along an edge cut by one or several cracks.
Definition at line 852 of file xfemelementinterface.C.
References oofem::IntArray::at(), oofem::FloatArray::at(), oofem::EnrichmentItem::calcXiZeroLevel(), oofem::Element::computeLocalCoordinates(), oofem::FEInterpolation2d::computeLocalEdgeMapping(), element, oofem::EnrichmentItem::evalLevelSetNormalInNode(), oofem::EnrichmentItem::evalLevelSetTangInNode(), oofem::FEInterpolation::evalN(), oofem::Node::giveCoordinates(), oofem::Element::giveDofManager(), oofem::Element::giveDofManArray(), oofem::FEMComponent::giveDomain(), oofem::XfemManager::giveEnrichmentItem(), oofem::Element::giveInterpolation(), oofem::Element::giveNode(), oofem::XfemManager::giveNumberOfEnrichmentItems(), oofem::FloatArray::giveSize(), oofem::Domain::giveXfemManager(), min, OOFEM_ERROR, and oofem::FloatArray::resize().
Referenced by oofem::PrescribedGradientBCWeak::findCrackBndIntersecCoord(), and oofem::PrescribedGradientBCNeumann::integrateTangent().
void oofem::XfemElementInterface::putPointsInCorrectPartition | ( | std::vector< std::vector< FloatArray > > & | oPointPartitions, |
const std::vector< FloatArray > & | iIntersecPoints, | ||
const std::vector< const FloatArray * > & | iNodeCoord | ||
) | const |
Definition at line 824 of file xfemelementinterface.C.
Referenced by XfemElementInterface_prepareNodesForDelaunay().
void oofem::XfemElementInterface::updateYourselfCZ | ( | TimeStep * | tStep | ) |
Definition at line 983 of file xfemelementinterface.C.
References mpCZExtraIntegrationRules, and mpCZIntegrationRules.
Referenced by oofem::REGISTER_Element(), oofem::TrPlaneStress2dXFEM::updateYourself(), and oofem::QTrPlaneStress2dXFEM::updateYourself().
void oofem::XfemElementInterface::XfemElementInterface_createEnrBHmatrixAt | ( | FloatMatrix & | oAnswer, |
GaussPoint & | iGP, | ||
Element & | iEl | ||
) |
Creates enriched BH-matrix.
Definition at line 72 of file xfemelementinterface.C.
References ComputeBOrBHMatrix(), and oofem::GaussPoint::giveNaturalCoordinates().
Referenced by oofem::PlaneStress2dXfem::computeBHmatrixAt(), oofem::QTrPlaneStress2dXFEM::computeBHmatrixAt(), and oofem::TrPlaneStress2dXFEM::computeBHmatrixAt().
void oofem::XfemElementInterface::XfemElementInterface_createEnrBmatrixAt | ( | FloatMatrix & | oAnswer, |
GaussPoint & | iGP, | ||
Element & | iEl | ||
) |
Creates enriched B-matrix.
Definition at line 67 of file xfemelementinterface.C.
References ComputeBOrBHMatrix(), and oofem::GaussPoint::giveNaturalCoordinates().
Referenced by oofem::PlaneStress2dXfem::computeBmatrixAt(), oofem::QTrPlaneStress2dXFEM::computeBmatrixAt(), and oofem::TrPlaneStress2dXFEM::computeBmatrixAt().
void oofem::XfemElementInterface::XfemElementInterface_createEnrNmatrixAt | ( | FloatMatrix & | oAnswer, |
const FloatArray & | iLocCoord, | ||
Element & | iEl, | ||
bool | iSetDiscontContribToZero | ||
) |
Creates enriched N-matrix.
Definition at line 242 of file xfemelementinterface.C.
References oofem::Element::giveNumberOfDofManagers().
Referenced by oofem::PrescribedGradientBCWeak::assembleTangentGPContributionNew(), oofem::QTrPlaneStress2dXFEM::computeField(), oofem::TrPlaneStress2dXFEM::computeField(), oofem::PlaneStress2dXfem::computeNmatrixAt(), oofem::QTrPlaneStress2dXFEM::computeNmatrixAt(), oofem::TrPlaneStress2dXFEM::computeNmatrixAt(), oofem::XfemStructuralElementInterface::giveSubtriangulationCompositeExportData(), and oofem::PrescribedGradientBCNeumann::integrateTangent().
void oofem::XfemElementInterface::XfemElementInterface_createEnrNmatrixAt | ( | FloatMatrix & | oAnswer, |
const FloatArray & | iLocCoord, | ||
Element & | iEl, | ||
const std::vector< int > & | iLocNodeInd, | ||
bool | iSetDiscontContribToZero | ||
) |
Creates enriched N-matrix for a chosen subset of element nodes.
Definition at line 255 of file xfemelementinterface.C.
References oofem::FloatArray::at(), oofem::FloatMatrix::beNMatrixOf(), oofem::Element::computeLocalCoordinates(), element, oofem::FEInterpolation::evalN(), oofem::EnrichmentItem::evaluateEnrFuncAt(), oofem::EnrichmentItem::evaluateEnrFuncInNode(), oofem::DofManager::giveCoordinate(), oofem::DofManager::giveCoordinates(), oofem::Element::giveDofManager(), oofem::Element::giveDofManArray(), oofem::Domain::giveDofManPlaceInArray(), oofem::FEMComponent::giveDomain(), oofem::XfemManager::giveEnrDofScaleFactor(), oofem::XfemManager::giveEnrichmentItem(), oofem::DofManager::giveGlobalNumber(), oofem::Element::giveInterpolation(), oofem::XfemManager::giveNodeEnrichmentItemIndices(), oofem::Element::giveNumberOfDofManagers(), oofem::Domain::giveXfemManager(), oofem::EnrichmentItem::isDofManEnriched(), oofem::FloatArray::resize(), XfemElementInterface_giveNumDofManEnrichments(), and oofem::FloatArray::zero().
int oofem::XfemElementInterface::XfemElementInterface_giveNumDofManEnrichments | ( | const DofManager & | iDMan, |
XfemManager & | iXMan | ||
) | const |
Computes total number of enrichments in a node.
Definition at line 360 of file xfemelementinterface.C.
References element, oofem::Domain::giveDofManPlaceInArray(), oofem::FEMComponent::giveDomain(), oofem::XfemManager::giveEnrichmentItem(), oofem::DofManager::giveGlobalNumber(), oofem::XfemManager::giveNodeEnrichmentItemIndices(), oofem::EnrichmentItem::giveNumDofManEnrichments(), and oofem::EnrichmentItem::isDofManEnriched().
Referenced by ComputeBOrBHMatrix(), computeNCohesive(), and XfemElementInterface_createEnrNmatrixAt().
|
virtual |
Partitions the element into patches by a triangulation.
Definition at line 376 of file xfemelementinterface.C.
References oofem::Delaunay::triangulate().
Referenced by oofem::Tr2Shell7XFEM::updateIntegrationRuleMultiCrack(), oofem::XfemStructuralElementInterface::XfemElementInterface_updateIntegrationRule(), and XfemElementInterface_updateIntegrationRule().
|
virtual |
Returns an array of array of points. Each array of points defines the points of a subregion of the element.
Definition at line 478 of file xfemelementinterface.C.
References oofem::IntArray::at(), oofem::FEInterpolation::boundaryGiveNodes(), oofem::GeometryBasedEI::computeIntersectionPoints(), oofem::FloatArray::distance_square(), element, oofem::DofManager::giveCoordinates(), oofem::Element::giveDofManager(), oofem::FEMComponent::giveDomain(), oofem::GeometryBasedEI::giveElementTipCoord(), oofem::XfemManager::giveEnrichmentItem(), oofem::Element::giveInterpolation(), oofem::Element::giveNumberOfDofManagers(), oofem::FEInterpolation::giveNumberOfEdges(), oofem::IntArray::giveSize(), oofem::FloatArray::giveSize(), oofem::Domain::giveXfemManager(), max, min, OOFEM_ERROR, oofem::FloatArray::push_back(), putPointsInCorrectPartition(), oofem::FloatArray::resize(), oofem::FloatArray::resizeWithValues(), and oofem::FloatArray::zero().
Referenced by oofem::Tr2Shell7XFEM::updateIntegrationRuleMultiCrack(), oofem::XfemStructuralElementInterface::XfemElementInterface_updateIntegrationRule(), and XfemElementInterface_updateIntegrationRule().
|
virtual |
Definition at line 703 of file xfemelementinterface.C.
References oofem::GeometryBasedEI::computeIntersectionPoints(), element, oofem::DofManager::giveCoordinates(), oofem::Element::giveDofManager(), oofem::FEMComponent::giveDomain(), oofem::GeometryBasedEI::giveElementTipCoord(), oofem::XfemManager::giveEnrichmentItem(), oofem::FloatArray::giveSize(), oofem::BasicGeometry::giveVertex(), oofem::Domain::giveXfemManager(), max, min, oofem::FloatArray::push_back(), putPointsInCorrectPartition(), oofem::FloatArray::resize(), oofem::FloatArray::resizeWithValues(), and oofem::FloatArray::zero().
|
virtual |
Updates integration rule based on the triangulation.
Reimplemented in oofem::XfemStructuralElementInterface.
Definition at line 384 of file xfemelementinterface.C.
References element, oofem::FEMComponent::giveDomain(), oofem::XfemManager::giveDomain(), oofem::XfemManager::giveElementEnrichmentItemIndices(), oofem::Domain::giveElementPlaceInArray(), oofem::Element::giveGlobalNumber(), oofem::Element::giveMaterialMode(), oofem::XfemManager::giveNumGpPerTri(), oofem::XfemManager::giveVtkDebug(), oofem::Domain::giveXfemManager(), oofem::XfemManager::isElementEnriched(), oofem::Element::setIntegrationRules(), oofem::XFEMDebugTools::WriteTrianglesToVTK(), XfemElementInterface_partitionElement(), and XfemElementInterface_prepareNodesForDelaunay().
Referenced by oofem::XfemSolverInterface::propagateXfemInterfaces().
Element* oofem::XfemElementInterface::element |
Definition at line 66 of file xfemelementinterface.h.
Referenced by ComputeBOrBHMatrix(), oofem::XfemStructuralElementInterface::computeCohesiveForces(), oofem::XfemStructuralElementInterface::computeCohesiveTangent(), computeNCohesive(), oofem::XfemStructuralElementInterface::giveSubtriangulationCompositeExportData(), oofem::XfemStructuralElementInterface::initializeCZMaterial(), partitionEdgeSegment(), oofem::XfemStructuralElementInterface::useNonStdCz(), oofem::XfemStructuralElementInterface::XfemElementInterface_computeConsistentMassMatrix(), oofem::XfemStructuralElementInterface::XfemElementInterface_computeConstitutiveMatrixAt(), oofem::XfemStructuralElementInterface::XfemElementInterface_computeDeformationGradientVector(), oofem::XfemStructuralElementInterface::XfemElementInterface_computeStressVector(), XfemElementInterface_createEnrNmatrixAt(), XfemElementInterface_giveNumDofManEnrichments(), XfemElementInterface_prepareNodesForDelaunay(), oofem::XfemStructuralElementInterface::XfemElementInterface_updateIntegrationRule(), and XfemElementInterface_updateIntegrationRule().
std :: vector< int > oofem::XfemElementInterface::mCZEnrItemIndices |
Index of enrichment items associated with cohesive zones.
Definition at line 70 of file xfemelementinterface.h.
Referenced by oofem::XfemStructuralElementInterface::computeCohesiveForces(), oofem::XfemStructuralElementInterface::computeCohesiveTangent(), and oofem::XfemStructuralElementInterface::XfemElementInterface_updateIntegrationRule().
std :: vector< std :: vector< int > > oofem::XfemElementInterface::mCZTouchingEnrItemIndices |
Indices of enrichment items that give cohesive zone contributions to a given GP, even though the GP is not located on any of these enrichment items.
Definition at line 77 of file xfemelementinterface.h.
Referenced by oofem::XfemStructuralElementInterface::computeCohesiveForces(), oofem::XfemStructuralElementInterface::computeCohesiveTangent(), and oofem::XfemStructuralElementInterface::XfemElementInterface_updateIntegrationRule().
std :: vector< std :: unique_ptr< IntegrationRule > > oofem::XfemElementInterface::mIntRule_tmp |
Definition at line 147 of file xfemelementinterface.h.
Referenced by oofem::XfemStructuralElementInterface::XfemElementInterface_updateIntegrationRule().
std :: vector< std :: unique_ptr< IntegrationRule > > oofem::XfemElementInterface::mpCZExtraIntegrationRules |
Definition at line 141 of file xfemelementinterface.h.
Referenced by oofem::XfemStructuralElementInterface::computeCohesiveForces(), oofem::XfemStructuralElementInterface::computeCohesiveTangent(), updateYourselfCZ(), XfemElementInterface(), and oofem::XfemStructuralElementInterface::XfemElementInterface_updateIntegrationRule().
std :: vector< std :: unique_ptr< IntegrationRule > > oofem::XfemElementInterface::mpCZExtraIntegrationRules_tmp |
Definition at line 146 of file xfemelementinterface.h.
Referenced by oofem::XfemStructuralElementInterface::XfemElementInterface_updateIntegrationRule().
std :: vector< std :: unique_ptr< IntegrationRule > > oofem::XfemElementInterface::mpCZIntegrationRules |
Definition at line 138 of file xfemelementinterface.h.
Referenced by oofem::XfemStructuralElementInterface::computeCohesiveForces(), oofem::XfemStructuralElementInterface::computeCohesiveTangent(), oofem::OctreeSpatialLocalizer::giveClosestIP(), oofem::OctreeSpatialLocalizer::giveClosestIPWithinOctant(), oofem::OctreeSpatialLocalizer::giveElementsWithIPWithinBox(), updateYourselfCZ(), XfemElementInterface(), and oofem::XfemStructuralElementInterface::XfemElementInterface_updateIntegrationRule().
std :: vector< std :: unique_ptr< IntegrationRule > > oofem::XfemElementInterface::mpCZIntegrationRules_tmp |
Definition at line 145 of file xfemelementinterface.h.
Referenced by oofem::XfemStructuralElementInterface::XfemElementInterface_updateIntegrationRule().
bool oofem::XfemElementInterface::mUsePlaneStrain |
Flag that tells if plane stress or plane strain is assumed.
Definition at line 80 of file xfemelementinterface.h.
Referenced by ComputeBOrBHMatrix(), oofem::XfemStructuralElementInterface::giveCZInputRecord(), giveMaterialMode(), oofem::XfemStructuralElementInterface::initializeCZFrom(), oofem::XfemStructuralElementInterface::XfemElementInterface_computeConstitutiveMatrixAt(), and oofem::XfemStructuralElementInterface::XfemElementInterface_computeStressVector().