57 mRadius(0.0),mIncrementLength(0.0),mStrainThreshold(0.0), mUseRadialBasisFunc(false)
74 int useRadialBasisFunc = 0;
76 if ( useRadialBasisFunc == 1 ) {
125 std :: vector< double >sigTTArray, sigRTArray;
139 const double l = 1.0 * x1.
distance(x2);
143 const double searchRadius = 3.0 * l;
151 double sumWiVi = 0.0;
152 for (
int elIndex: elIndices ) {
179 bool inFrontOfCrack =
true;
181 inFrontOfCrack =
false;
186 if ( r < l && inFrontOfCrack ) {
187 double w = ( ( l - r ) / ( pow(2.0 *
M_PI, 1.5) * pow(l, 3) ) ) * exp( -0.5 * pow(r, 2) / pow(l, 2) );
206 sumQiWiVi.
add(w * V, strainVecGP);
215 if ( fabs(sumWiVi) > 1.0e-12 ) {
216 strainVec.
beScaled(1.0 / sumWiVi, sumQiWiVi);
220 bool useCZGP =
false;
235 bool useCZGP =
false;
256 printf(
"Max principal strain: %e\n", principalVals[0]);
262 FloatArray propTangent = {-propNormal(1), propNormal(0)};
265 propTangent.
times(-1.0);
The base class for all spatial localizers.
virtual void evalN(FloatArray &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo)=0
Evaluates the array of interpolation functions (shape functions) at given point.
virtual IntegrationRule * giveDefaultIntegrationRulePtr()
Access method for default integration rule.
FloatArray mPropagationDir
For computing principal strains from engineering strains.
#define _IFT_PLPrincipalStrain_StrainThreshold
Threshold for crack propagation.
double & at(int i)
Coefficient access function.
TipInfo gathers useful information about a crack tip, like its position and tangent direction...
This class implements a structural material status information.
#define _IFT_PLPrincipalStrain_RadialBasisFunc
If radial basis functions should be used for strain interpolation.
virtual FloatArray * giveCoordinates()
Abstract base class for all finite elements.
Base class for dof managers.
static void computePrincipalValDir(FloatArray &answer, FloatMatrix &dir, const FloatArray &s, stressStrainPrincMode mode)
Computes principal values and directions of stress or strain vector.
Class implementing an array of integers.
virtual void giveAllElementsWithIpWithinBox(elementContainerType &elemSet, const FloatArray &coords, const double radius)=0
Returns container (set) of all domain elements having integration point within given box...
virtual int giveNumberOfDofManagers() const
virtual FEInterpolation * giveInterpolation() const
void beDifferenceOf(const FloatArray &a, const FloatArray &b)
Sets receiver to be a - b.
void beColumnOf(const FloatMatrix &mat, int col)
Reciever will be set to a given column in a matrix.
virtual IRResultType initializeFrom(InputRecord *ir)
double distance(const FloatArray &x) const
Computes the distance between position represented by receiver and position given as parameter...
Class representing a general abstraction for finite element interpolation class.
void beScaled(double s, const FloatArray &b)
Sets receiver to be .
virtual double computeVolumeAround(GaussPoint *gp)
Returns volume related to given integration point.
Element * giveElement(int n)
Service for accessing particular domain fe element.
double dotProduct(const FloatArray &x) const
Computes the dot product (or inner product) of receiver and argument.
#define _IFT_PLPrincipalStrain_Radius
Radius away from tip used when picking sampling point.
#define _IFT_PLPrincipalStrain_IncLength
Increment length per time step.
Class EnrichmentFront: describes the edge or tip of an XFEM enrichment.
virtual ~PLPrincipalStrain()
SpatialLocalizer * giveSpatialLocalizer()
Returns receiver's associated spatial localizer.
virtual bool propagationIsAllowed() const
Wrapper around element definition to provide FEICellGeometry interface.
REGISTER_PropagationLaw(PLDoNothing)
virtual Element * giveElementContainingPoint(const FloatArray &coords, const IntArray *regionList=NULL)=0
Returns the element, containing given point and belonging to one of the region in region list...
virtual const char * giveInputRecordName() const
Class representing vector of real numbers.
Implementation of matrix containing floating point numbers.
virtual void giveInputRecord(DynamicInputRecord &input)
IRResultType
Type defining the return values of InputRecord reading operations.
IntegrationPointStatus * giveMaterialStatus()
Returns reference to associated material status (NULL if not defined).
void zero()
Zeroes all coefficients of receiver.
void times(double s)
Multiplies receiver with scalar.
const TipInfo & giveTipInfo() const
double mPropagationLength
virtual bool propagateInterface(Domain &iDomain, EnrichmentFront &iEnrFront, TipPropagation &oTipProp)
int giveSize() const
Returns the size of receiver.
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
virtual GaussPoint * giveClosestIP(const FloatArray &coords, int region, bool iCohesiveZoneGP=false)=0
Returns the integration point in associated domain, which is closest to given point.
const FloatArray & giveStrainVector() const
Returns the const pointer to receiver's strain vector.
Class representing integration point in finite element program.
void add(const FloatArray &src)
Adds array src to receiver.
void resize(int s)
Resizes receiver towards requested size.