41LobattoIntegrationRule :: LobattoIntegrationRule(
int n,
Element *e,
42 int startIndx,
int endIndx,
bool dynamic) :
45LobattoIntegrationRule :: LobattoIntegrationRule(
int n,
Element *e) :
48LobattoIntegrationRule :: ~LobattoIntegrationRule()
53LobattoIntegrationRule :: SetUpPointsOnLine(
int nPoints, MaterialMode mode)
59 for (
int i = 1; i <= nPoints; i++ ) {
69LobattoIntegrationRule :: SetUpPointsOnSquare(
int nPoints, MaterialMode mode)
72 int nPoints_xi1 = ( int ) floor( sqrt(
double ( nPoints ) ) );
73 int nPoints_xi2 = nPoints_xi1;
74 FloatArray coords_xi1, weights1, coords_xi2, weights2;
77 this->
gaussPoints.resize( nPoints_xi1 * nPoints_xi2 );
79 for (
int i = 1; i <= nPoints_xi1; i++ ) {
80 for (
int j = 1; j <= nPoints_xi2; j++ ) {
83 weights1.
at ( i ) *weights2.
at ( j ), mode);
93LobattoIntegrationRule :: SetUpPointsOnCube(
int nPoints, MaterialMode mode)
96 int nPoints_xi1 = ( int ) floor(
cbrt(
double ( nPoints ) ) + 0.5);
97 int nPoints_xi2 = nPoints_xi1;
98 int nPoints_xi3 = nPoints_xi1;
99 FloatArray coords_xi1, weights1, coords_xi2, weights2, coords_xi3, weights3;
103 this->
gaussPoints.resize( nPoints_xi1 * nPoints_xi2 * nPoints_xi3 );
105 for (
int i = 1; i <= nPoints_xi1; i++ ) {
106 for (
int j = 1; j <= nPoints_xi2; j++ ) {
107 for (
int k = 1; k <= nPoints_xi3; k++ ) {
110 weights1.
at ( i ) *weights2.
at ( j ) *weights3.
at ( k ), mode);
121LobattoIntegrationRule :: SetUpPointsOnTriangle(
int nPoints, MaterialMode mode)
123 OOFEM_ERROR(
"unsupported number of IPs (%d)", nPoints);
136 if ( approxOrder <= 1 ) {
140 requiredNIP = ( int ) ceil( ( (
double ) approxOrder + 3.0 ) / 2. );
141 if ( requiredNIP > 6 ) {
160 coords_xi =
Vec1(0.0);
165 coords_xi =
Vec2(-1.0, 1.0);
166 weights =
Vec2(1.0, 1.0);
170 coords_xi =
Vec3(-1.0, 0.0, 1.0);
171 weights =
Vec3(0.333333333333333, 1.333333333333333, 0.333333333333333);
175 coords_xi =
Vec4(-1.0,
179 weights =
Vec4( 0.166666666666667,
186 coords_xi =
Vec5(-1.0,
199 coords_xi =
Vec6(-1.0,
205 weights =
Vec6( 0.066666666666667,
212 OOFEM_LOG_WARNING(
"Unsupported number of IPs (%d) for LobattoIR, using 6 ips instead.", nPoints);
int giveNumberOfIntegrationPoints() const
std::vector< GaussPoint * > gaussPoints
Array containing integration points.
integrationDomain intdomain
Integration domain.
IntegrationRule(int n, Element *e, int startIndx, int endIndx, bool dynamic)
static void giveLineCoordsAndWeights(int nPoints, FloatArray &coords_xi, FloatArray &weights)
#define OOFEM_LOG_WARNING(...)
static FloatArray Vec2(const double &a, const double &b)
double cbrt(double x)
Returns the cubic root of x.
static FloatArray Vec6(const double &a, const double &b, const double &c, const double &d, const double &e, const double &f)
static FloatArray Vec5(const double &a, const double &b, const double &c, const double &d, const double &e)
static FloatArray Vec4(const double &a, const double &b, const double &c, const double &d)
static FloatArray Vec1(const double &a)
static FloatArray Vec3(const double &a, const double &b, const double &c)