45 int startIndx,
int endIndx,
bool dynamic) :
62 for (
int i = 1; i <= nPoints; i++ ) {
78 for (
int i = 1; i <= nPoints; i++ ) {
79 double x = ( coords_xi.
at(i) + 1.0 ) * 0.5;
84 this->
gaussPoints [ i - 1 ]->setSubPatchCoordinates(subpatchCoord);
87 ( 1. - x ) * coord0.
at(1) + x * coord1.
at(1),
88 ( 1. - x ) * coord0.
at(2) + x * coord1.
at(2) };
89 this->
gaussPoints [ i - 1 ]->setGlobalCoordinates(globalCoord);
93 this->
gaussPoints [ i - 1 ]->setNaturalCoordinates(naturalCoord);
105 int nPoints_xi1 = ( int ) floor( sqrt(
double ( nPoints ) ) );
106 int nPoints_xi2 = nPoints_xi1;
107 FloatArray coords_xi1, weights1, coords_xi2, weights2;
110 this->
gaussPoints.resize( nPoints_xi1 * nPoints_xi2 );
112 for (
int i = 1; i <= nPoints_xi1; i++ ) {
113 for (
int j = 1; j <= nPoints_xi2; j++ ) {
115 weights1.
at ( i ) *weights2.
at ( j ), mode);
128 int nPoints_xi1 = ( int ) floor(sqrt(
double ( nPointsXY ) ) + 0.1 );
129 int nPoints_xi2 = nPoints_xi1;
130 int nPoints_xi3 = nPointsZ;
131 FloatArray coords_xi1, weights1, coords_xi2, weights2, coords_xi3, weights3;
135 this->
gaussPoints.resize( nPoints_xi1 * nPoints_xi2 * nPoints_xi3 );
138 for (
int i = 1; i <= nPoints_xi1; i++ ) {
139 for (
int j = 1; j <= nPoints_xi2; j++ ) {
140 for (
int k = 1; k <= nPoints_xi3; k++ ) {
142 weights1.
at ( i ) *weights2.
at ( j ) *weights3.
at ( k ), mode);
155 int nPoints_xi1 = ( int ) floor(sqrt(
double ( nPointsXY ) ) + 0.1 );
156 int nPoints_xi2 = nPoints_xi1;
157 int nPoints_xi3 = nPointsZ;
158 FloatArray coords_xi1, weights1, coords_xi2, weights2, coords_xi3, weights3;
162 int pointsPerLayer = nPoints_xi1 * nPoints_xi2 * nPoints_xi3;
165 double totalThickness = layerThickness.
sum();
168 double scaledThickness;
170 for (
int t = 1; t <= layerThickness.
giveSize(); t++ ) {
171 scaledThickness = layerThickness.
at(t) / totalThickness;
173 for (
int i = 1; i <= nPoints_xi1; i++ ) {
174 for (
int j = 1; j <= nPoints_xi2; j++ ) {
175 for (
int k = 1; k <= nPoints_xi3; k++ ) {
176 this->
gaussPoints [ count ] =
new GaussPoint(
this, count + 1, {coords_xi1.
at(i), coords_xi2.
at(j), ( coords_xi3.
at(k) + 1. ) * scaledThickness + bottom},
177 weights1.
at(i)*weights2.
at(j)*weights3.
at(k)*scaledThickness, mode);
182 bottom += 2.0 * scaledThickness;
193 int nPoints_xi1 = ( int ) floor(
cbrt(
double ( nPoints ) ) + 0.5);
194 int nPoints_xi2 = nPoints_xi1;
195 int nPoints_xi3 = nPoints_xi1;
196 FloatArray coords_xi1, weights1, coords_xi2, weights2, coords_xi3, weights3;
200 this->
gaussPoints.resize( nPoints_xi1 * nPoints_xi2 * nPoints_xi3 );
202 for (
int i = 1; i <= nPoints_xi1; i++ ) {
203 for (
int j = 1; j <= nPoints_xi2; j++ ) {
204 for (
int k = 1; k <= nPoints_xi3; k++ ) {
206 weights1.
at ( i ) *weights2.
at ( j ) *weights3.
at ( k ), mode);
219 FloatArray coords_xi1, weights1, coords_xi2, weights2, coords_xi3, weights3;
223 int pointsPerLayer = nPoints1 * nPoints2 * nPointsDepth;
227 double totalThickness = layerThickness.
sum();
231 double scaledThickness;
232 for (
int t = 1; t <= layerThickness.
giveSize(); t++ ) {
233 scaledThickness = layerThickness.
at(t) / totalThickness;
234 for (
int i = 1; i <= nPoints1; i++ ) {
235 for (
int j = 1; j <= nPoints2; j++ ) {
236 for (
int k = 1; k <= nPointsDepth; k++ ) {
238 {coords_xi1.
at(i), coords_xi2.
at(j), ( coords_xi3.
at(k) + 1. ) * scaledThickness + bottom},
239 weights1.
at(i)*weights2.
at(j)*weights3.
at(k)*scaledThickness, mode);
244 bottom += 2.0 * scaledThickness;
259 for (
int i = 1; i <= nPoints; i++ ) {
271 FloatArray coords_xi1, coords_xi2, coords_xi3, weights;
275 for (
int i = 1; i <= nPoints; i++ ) {
277 {coords_xi1.
at(i), coords_xi2.
at(i), coords_xi3.
at(i)}, weights.
at ( i ), mode);
288 FloatArray coords_xi1, coords_xi2, coords_xi3, weightsTri, weightsDepth;
291 this->
gaussPoints.resize( nPointsTri * nPointsDepth );
294 for (
int i = 1; i <= nPointsTri; i++ ) {
295 for (
int j = 1; j <= nPointsDepth; j++ ) {
297 weightsTri.
at ( i ) *weightsDepth.
at ( j ), mode);
309 FloatArray coords_xi1, coords_xi2, coords_xi3, weightsTri, weightsDepth;
312 int pointsPerLayer = nPointsTri * nPointsDepth;
316 double totalThickness = layerThickness.
sum();
320 double scaledThickness;
321 for (
int k = 1; k <= layerThickness.
giveSize(); k++ ) {
322 scaledThickness = layerThickness.
at(k) / totalThickness;
323 for (
int i = 1; i <= nPointsTri; i++ ) {
324 for (
int j = 1; j <= nPointsDepth; j++ ) {
326 {coords_xi1.
at(i), coords_xi2.
at(i), ( coords_xi3.
at(j) + 1. ) * scaledThickness + bottom},
327 weightsTri.
at ( i ) * ( weightsDepth.
at ( j ) *scaledThickness ), mode);
331 bottom += 2.0 * scaledThickness;
344 if ( approxOrder < 0 ) {
350 requiredNIP = (int)ceil(( approxOrder + 1 ) / 2);
352 if ( requiredNIP <= 8 ) {
356 if ( requiredNIP <= 16 ) {
360 if ( requiredNIP <= 24 ) {
364 if ( requiredNIP <= 32 ) {
368 if ( requiredNIP <= 64 ) {
375 if ( approxOrder <= 1 ) {
379 if ( approxOrder <= 2 ) {
383 if ( approxOrder <= 3 ) {
387 if ( approxOrder <= 4 ) {
391 if ( approxOrder <= 5 ) {
395 if ( approxOrder <= 6 ) {
399 if ( approxOrder <= 7 ) {
403 if ( approxOrder <= 8 ) {
407 if ( approxOrder <= 9 ) {
411 if ( approxOrder <= 10 ) {
418 requiredNIP =
max( (
int)ceil( (
double)( approxOrder + 1 ) / (
double)2), 2 );
419 requiredNIP *= requiredNIP;
420 if ( requiredNIP > 64 * 64 ) {
427 requiredNIP =
max( (
int)ceil( (
double)( approxOrder + 1 ) / (
double)2), 2 );
428 requiredNIP *= requiredNIP * requiredNIP;
429 if ( requiredNIP > 64 * 64 * 64 ) {
436 if ( approxOrder <= 1 ) {
440 if ( approxOrder <= 2 ) {
444 if ( approxOrder <= 3 ) {
448 if ( approxOrder <= 4 ) {
452 if ( approxOrder <= 5 ) {
456 if ( approxOrder <= 6 ) {
460 if ( approxOrder <= 8 ) {
468 if ( approxOrder <= 1 ) {
472 if ( approxOrder <= 2 ) {
476 if ( approxOrder <= 3 ) {
480 if ( approxOrder <= 4 ) {
495 coords_xi1.
resize(nPoints);
496 coords_xi2.
resize(nPoints);
497 coords_xi3.
resize(nPoints);
510 a = ( 5. + 3. * sqrt(5.) ) / 20.;
511 b = ( 5. - sqrt(5.) ) / 20.;
585 a = ( 1. + sqrt(5. / 14.) ) / 4.;
586 b = ( 1. - sqrt(5. / 14.) ) / 4.;
617 w = 0.302836780970891856e-1;
624 w = 0.602678571428571597e-2;
643 w = 0.116452490860289742e-1;
660 a = 0.665501535736642813e-1;
661 b = 0.433449846426335728;
662 w = 0.109491415613864534e-1;
692 a = 0.356191386222544953;
693 b = 0.214602871259151684;
694 w = 0.665379170969464506e-2;
711 a = 0.877978124396165982;
712 b = 0.406739585346113397e-1;
713 w = 0.167953517588677620e-2;
730 a = 0.329863295731730594e-1;
731 b = 0.322337890142275646;
732 w = 0.922619692394239843e-2;
749 a = 0.603005664791649076;
750 b = 0.269672331458315867;
751 c = 0.636610018750175299e-1;
752 w = 0.803571428571428248e-2;
808 w = -0.393270066412926145e-1;
813 a = 0.617587190300082967;
814 b = 0.127470936566639015;
815 w = 0.408131605934270525e-2;
832 a = 0.903763508822103123;
833 b = 0.320788303926322960e-1;
834 w = 0.658086773304341943e-3;
851 a = 0.450222904356718978;
852 b = 0.497770956432810185e-1;
853 w = 0.438425882512284693e-2;
878 a = 0.316269552601450060;
879 b = 0.183730447398549945;
880 w = 0.138300638425098166e-1;
905 a = 0.513280033360881072;
906 b = 0.229177878448171174e-1;
907 c = 0.231901089397150906;
908 w = 0.424043742468372453e-2;
957 a = 0.193746475248804382;
958 b = 0.730313427807538396;
959 c = 0.379700484718286102e-1;
960 w = 0.223873973961420164e-2;
1013 OOFEM_SERROR(
"unsupported number of IPs (%d)", nPoints);
1023 switch ( nPoints ) {
1429 OOFEM_SERROR(
"unsupported number of IPs (%d)", nPoints);
1439 switch ( nPoints ) {
1450 coords_xi = {-0.577350269189626, 0.577350269189626};
1451 weights = {1.0, 1.0};
1484 -0.9061798459386639927976269,
1485 -0.5384693101056830910363144,
1487 0.5384693101056830910363144,
1488 0.9061798459386639927976269
1491 0.2369268850561890875142640,
1492 0.4786286704993664680412915,
1493 0.5688888888888888888888889,
1494 0.4786286704993664680412915,
1495 0.2369268850561890875142640
1501 -0.2386191860831969086305017,
1502 -0.6612093864662645136613996,
1503 -0.9324695142031520278123016,
1504 0.9324695142031520278123016,
1505 0.6612093864662645136613996,
1506 0.2386191860831969086305017
1509 0.4679139345726910473898703,
1510 0.3607615730481386075698335,
1511 0.1713244923791703450402961,
1512 0.1713244923791703450402961,
1513 0.3607615730481386075698335,
1514 0.4679139345726910473898703
1520 -0.9491079123427585245261897,
1521 -0.7415311855993944398638648,
1522 -0.4058451513773971669066064,
1524 0.4058451513773971669066064,
1525 0.7415311855993944398638648,
1526 0.9491079123427585245261897
1529 0.1294849661688696932706114,
1530 0.2797053914892766679014678,
1531 0.3818300505051189449503698,
1532 0.4179591836734693877551020,
1533 0.3818300505051189449503698,
1534 0.2797053914892766679014678,
1535 0.1294849661688696932706114
1864 OOFEM_SERROR(
"unsupported number of IPs (%d)", nPoints);
integrationDomain
Used by integrator class to supply integration points for proper domain to be integrated (Area...
integrationDomain intdomain
Integration domain.
static void giveTriCoordsAndWeights(int nPoints, FloatArray &coords_xi1, FloatArray &coords_xi2, FloatArray &weights)
static void giveLineCoordsAndWeights(int nPoints, FloatArray &coords_xi, FloatArray &weights)
#define OOFEM_SERROR(...)
double & at(int i)
Coefficient access function.
int max(int i, int j)
Returns bigger value form two given decimals.
virtual int SetUpPointsOn3dDegShellLayers(int nPointsXY, int nPointsZ, MaterialMode mode, const FloatArray &layerThickness)
Sets up receiver's integration points on shell integration domain wih layers.
Element * giveElement()
Returns reference to element containing receiver.
Abstract base class for all finite elements.
MaterialMode
Type representing material mode of integration point.
Abstract base class representing integration rule.
virtual ~GaussIntegrationRule()
Destructor.
virtual int SetUpPointsOnSquare(int nPoints, MaterialMode mode)
Sets up receiver's integration points on unit square integration domain.
double sum() const
Computes the sum of receiver values.
virtual int SetUpPointsOnTetrahedra(int nPoints, MaterialMode mode)
Sets up receiver's integration points on tetrahedra (volume coords) integration domain.
virtual int SetUpPointsOnCube(int nPoints, MaterialMode mode)
Sets up receiver's integration points on unit cube integration domain.
virtual int getRequiredNumberOfIntegrationPoints(integrationDomain dType, int approxOrder)
Abstract service.
Class representing vector of real numbers.
double cbrt(double x)
Returns the cubic root of x.
virtual int SetUpPointsOnWedgeLayers(int nPointsTri, int nPointsDepth, MaterialMode mode, const FloatArray &layerThickness)
Sets up receiver's integration points on a wedge integration domain divided into layers in the zeta-d...
int giveNumberOfIntegrationPoints() const
Returns number of integration points of receiver.
virtual int SetUpPointsOn2DEmbeddedLine(int nPoints, MaterialMode mode, const FloatArray &coord0, const FloatArray &coord1)
Sets up integration points on 2D embedded line inside 2D volume (the list of local coordinates should...
virtual bool computeLocalCoordinates(FloatArray &answer, const FloatArray &gcoords)
Computes the element local coordinates from given global coordinates.
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.
virtual int SetUpPointsOnWedge(int nPointsTri, int nPointsDepth, MaterialMode mode)
Sets up receiver's integration points on a wedge integration domain.
virtual int SetUpPointsOnLine(int nPoints, MaterialMode mode)
Sets up receiver's integration points on unit line integration domain.
virtual int SetUpPointsOn3dDegShell(int nPointsXY, int nPointsZ, MaterialMode mode)
Sets up receiver's integration points on shell integration domain.
Class representing integration point in finite element program.
std::vector< GaussPoint * > gaussPoints
Array containing integration points.
virtual int SetUpPointsOnCubeLayers(int nPoints1, int nPoints2, int nPointsDepth, MaterialMode mode, const FloatArray &layerThickness)
Sets up receiver's integration points on unit cube integration domain divided into layers in the zeta...
virtual int SetUpPointsOnTriangle(int nPoints, MaterialMode mode)
Sets up receiver's integration points on triangular (area coords) integration domain.
static void giveTetCoordsAndWeights(int nPoints, FloatArray &coords_xi1, FloatArray &coords_xi2, FloatArray &coords_xi3, FloatArray &weights)
GaussIntegrationRule(int n, Element *e, int startIndx, int endIndx, bool dynamic=false)
Constructor.
void resize(int s)
Resizes receiver towards requested size.