50 int numPointsTot = iNumPointsPerSeg *
mSegments.size();
60 double totalLength = 0.0;
62 totalLength += line.giveLength();
65 const FloatArray &xS = mSegments[0].giveVertex(1);
67 std :: vector< FloatArray >newGPCoord;
70 for (
size_t i = 0; i < mSegments.size(); i++ ) {
71 for (
int j = 0; j < iNumPointsPerSeg; j++ ) {
75 gp =
new GaussPoint(
this, pointsPassed + 1, {coords_xi.
at(j + 1)}, weights.
at(j + 1), mode);
80 for (
int m = 1; m <= xS.
giveSize(); m++ ) {
86 global.
at(m) = 0.5 * ( ( 1.0 - coord.at(1) ) * mSegments [ i ].giveVertex(1).at(m) + ( 1.0 + coord.at(1) ) * mSegments [ i ].giveVertex(2).at(m) );
89 newGPCoord.push_back(global);
93 double xi = 2.0 * ( global.
distance(xS) / totalLength - 0.5 );
static void giveLineCoordsAndWeights(int nPoints, FloatArray &coords_xi, FloatArray &weights)
double & at(int i)
Coefficient access function.
DiscontinuousSegmentIntegrationRule(int n, Element *e, const std::vector< Line > &iSegments)
Start and end points of the boundary segment.
void setGlobalCoordinates(const FloatArray &iCoord)
Abstract base class for all finite elements.
MaterialMode
Type representing material mode of integration point.
void setSubPatchCoordinates(const FloatArray &c)
double distance(const FloatArray &x) const
Computes the distance between position represented by receiver and position given as parameter...
virtual double giveWeight()
Returns integration weight of receiver.
virtual int SetUpPointsOnLine(int iNumPointsPerSeg, MaterialMode mode)
Sets up receiver's integration points on unit line integration domain.
Class representing vector of real numbers.
virtual ~DiscontinuousSegmentIntegrationRule()
void setNaturalCoordinates(const FloatArray &c)
int giveNumberOfIntegrationPoints() const
Returns number of integration points of receiver.
std::vector< Line > mSegments
int giveSize() const
Returns the size of receiver.
the oofem namespace is to define a context or scope in which all oofem names are defined.
Class representing integration point in finite element program.
std::vector< GaussPoint * > gaussPoints
Array containing integration points.
const FloatArray & giveNaturalCoordinates()
Returns coordinate array of receiver.
Class representing Gaussian-quadrature integration rule.
void resize(int s)
Resizes receiver towards requested size.