74 if ( closestEl !=
nullptr ) {
81 printf(
"Could not find closest element.\n");
86 std::unordered_map<int, double> weightInNodes;
88 for (
int elIndex : elList ) {
93 for (
int nodeInd : elNodes ) {
102 for(
int elIndex : elList ) {
106 if ( el ==
nullptr ) {
107 OOFEM_ERROR(
"Could not cast to NLStructuralElement.")
115 const FloatArray &pos = gp->giveGlobalCoordinates();
122 interp->
evaldNdx(dNdx, gp->giveNaturalCoordinates(), geomWrapper);
126 weightInElNodes.
resize( elNodes.giveSize() );
127 for(
int i = 0; i < weightInElNodes.
giveSize(); i++) {
128 weightInElNodes[i] = weightInNodes[elNodes[i]];
152 StructuralMaterial :: giveFullVectorForm( fullEshelbyStressV, eshelbyStressV, _PlaneStrain );
172 oMatForce.
add(contrib);
186 double r =
distance(iTipCoord, iCoord);
188 weight = 1.0 - r/iRadius;
const FloatArray & giveCoordinates() const
SpatialLocalizer * giveSpatialLocalizer()
int giveElementPlaceInArray(int iGlobalElNum) const
DofManager * giveDofManager(int n)
Element * giveElement(int n)
int giveGlobalNumber() const
virtual FEInterpolation * giveInterpolation() const
const IntArray & giveDofManArray() const
virtual IntegrationRule * giveDefaultIntegrationRulePtr()
virtual double computeVolumeAround(GaussPoint *gp)
virtual double evaldNdx(FloatMatrix &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo) const =0
double computeNorm() const
Index giveSize() const
Returns the size of receiver.
void beProductOf(const FloatMatrix &aMatrix, const FloatArray &anArray)
void beScaled(double s, const FloatArray &b)
void beTProductOf(const FloatMatrix &aMatrix, const FloatArray &anArray)
void add(const FloatArray &src)
void beSubMatrixOf(const FloatMatrix &src, Index topRow, Index bottomRow, Index topCol, Index bottomCol)
void beMatrixForm(const FloatArray &aArray)
bool insertSortedOnce(int value, int allocChunk=0)
double computeWeightFunctionInPoint(const FloatArray &iCoord, const FloatArray &iTipCoord, const double &iRadius) const
void computeMaterialForce(FloatArray &oMatForce, Domain &iDomain, const TipInfo &iTipInfo, TimeStep *tStep, const double &iRadius)
virtual ~MaterialForceEvaluator()
virtual void computeDeformationGradientVector(FloatArray &answer, GaussPoint *gp, TimeStep *tStep)
virtual void giveAllElementsWithNodesWithinBox(elementContainerType &elemSet, const FloatArray &coords, const double radius)
virtual Element * giveElementClosestToPoint(FloatArray &lcoords, FloatArray &closest, const FloatArray &coords, int region=0)=0
virtual void giveEshelbyStresses(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedvF, TimeStep *tStep)
static FloatArray Vec2(const double &a, const double &b)
double distance(const FloatArray &x, const FloatArray &y)