52 OOFEM_ERROR(
"FEI3dTrQuad :: evaldNdx - Not supported");
75 n.
at(1) = 4.0 * l1 - 1.0;
77 n.
at(3) = -1.0 * ( 4.0 * l3 - 1.0 );
80 n.
at(6) = 4.0 * l3 - 4.0 * l1;
95 n.
at(2) = 4.0 * l2 - 1.0;
96 n.
at(3) = -1.0 * ( 4.0 * l3 - 1.0 );
98 n.
at(5) = 4.0 * l3 - 4.0 * l2;
109 answer.
at(1,1) = 1.0;
110 answer.
at(1,2) = 0.0;
111 answer.
at(1,3) = 0.0;
112 answer.
at(1,4) = 0.5;
113 answer.
at(1,5) = 0.0;
114 answer.
at(1,6) = 0.5;
116 answer.
at(2,1) = 0.0;
117 answer.
at(2,2) = 1.0;
118 answer.
at(2,3) = 0.0;
119 answer.
at(2,4) = 0.5;
120 answer.
at(2,5) = 0.5;
121 answer.
at(2,6) = 0.0;
130 this->
evalN(n, lcoords, cellgeo);
132 for (
int i = 1; i <= 6; ++i ) {
137#define POINT_TOL 1.e-3
156 double detJ = x1*(y2 - y3) + x2*(-y1 + y3) + x3*(y1 - y2);
159 answer.
at(1) = ( ( x2 * y3 - x3 * y2 ) + ( y2 - y3 ) * gcoords.
at(xind) + ( x3 - x2 ) * gcoords.
at(yind) ) / detJ;
160 answer.
at(2) = ( ( x3 * y1 - x1 * y3 ) + ( y3 - y1 ) * gcoords.
at(xind) + ( x1 - x3 ) * gcoords.
at(yind) ) / detJ;
161 answer.
at(3) = 1. - answer.
at(1) - answer.
at(2);
165 for (
int i = 1; i <= 3; i++ ) {
190 double xi = lcoords.
at(1);
192 answer[0] = 0.5 * ( xi - 1.0 ) * xi;
193 answer[1] = 0.5 * ( xi + 1.0 ) * xi;
194 answer[2] = 1.0 - xi * xi;
209 double xi = lcoords.
at(1);
211 answer[0] = xi - 0.5;
212 answer[1] = xi + 0.5;
217FEI3dTrQuad :: edgeLocal2global(
FloatArray &answer,
int iedge,
225 for (
int i = 0; i <
N.giveSize(); ++i ) {
235 double u = lcoords.
at(1);
245FEI3dTrQuad :: computeLocalEdgeMapping(
int iedge)
const
249 }
else if ( iedge == 2 ) {
251 }
else if ( iedge == 3 ) {
254 throw std::range_error(
"invalid edge number");
270 double l1 = lcoords.
at(1);
271 double l2 = lcoords.
at(2);
272 double l3 = 1. - l1 - l2;
276 answer.
at(1) = ( 2. * l1 - 1. ) * l1;
277 answer.
at(2) = ( 2. * l2 - 1. ) * l2;
278 answer.
at(3) = ( 2. * l3 - 1. ) * l3;
279 answer.
at(4) = 4. * l1 * l2;
280 answer.
at(5) = 4. * l2 * l3;
281 answer.
at(6) = 4. * l3 * l1;
293 for (
int i = 1; i <= 6; ++i ) {
294 answer.
at(i, 1) = dndxi.at(i);
295 answer.
at(i, 2) = dndeta.
at(i);
302FEI3dTrQuad :: surfaceLocal2global(
FloatArray &answer,
int isurf,
310 for (
int i = 1; i <=
N.giveSize(); ++i ) {
331 for (
int i = 0; i < 6; ++i ) {
357 jacobianMatrix.
resize(3, 3);
358 jacobianMatrix.
at(1, 1) = G1.
at(1);
359 jacobianMatrix.
at(1, 2) = G2.
at(1);
360 jacobianMatrix.
at(1, 3) = G3.
at(1);
361 jacobianMatrix.
at(2, 1) = G1.
at(2);
362 jacobianMatrix.
at(2, 2) = G2.
at(2);
363 jacobianMatrix.
at(2, 3) = G3.
at(2);
364 jacobianMatrix.
at(3, 1) = G1.
at(3);
365 jacobianMatrix.
at(3, 2) = G2.
at(3);
366 jacobianMatrix.
at(3, 3) = G3.
at(3);
377FEI3dTrQuad :: computeLocalSurfaceMapping(
int isurf)
const
386std::unique_ptr<IntegrationRule>
389 auto iRule = std::make_unique<GaussIntegrationRule>(1,
nullptr);
390 int points = iRule->getRequiredNumberOfIntegrationPoints(
_Triangle,
order);
391 iRule->SetUpPointsOnTriangle(points, _Unknown);
392 return std::move(iRule);
395std::unique_ptr<IntegrationRule>
399 OOFEM_ERROR(
"FEI3dTrQuad :: giveBoundaryIntegrationRule - Not supported");
409 double x1 = p1.
at(1);
410 double y1 = p1.at(2);
412 double x2 = p2.
at(1);
413 double y2 = p2.at(2);
415 double x3 = p3.
at(1);
416 double y3 = p3.at(2);
418 double x4 = p4.
at(1);
419 double y4 = p4.at(2);
421 double x5 = p5.
at(1);
422 double y5 = p5.at(2);
424 double x6 = p6.
at(1);
425 double y6 = p6.at(2);
427 return (4*(-(x4*y1) + x6*y1 + x4*y2 - x5*y2 + x5*y3 - x6*y3) + x2*(y1 - y3 - 4*y4 + 4*y5) +
428 x1*(-y2 + y3 + 4*y4 - 4*y6) + x3*(-y1 + y2 - 4*y5 + 4*y6))/6;
void surfaceEvalBaseVectorsAt(FloatArray &G1, FloatArray &G2, const FloatArray &lcoords, const FEICellGeometry &cellgeo) const
void evalN(FloatArray &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo) const override
void surfaceEvaldNdxi(FloatMatrix &answer, const FloatArray &lcoords) const override
void giveDerivativeEta(FloatArray &n, const FloatArray &lcoords) const
void giveDerivativeXi(FloatArray &n, const FloatArray &lcoords) const
void edgeEvalN(FloatArray &answer, int iedge, const FloatArray &lcoords, const FEICellGeometry &cellgeo) const override
IntArray computeLocalEdgeMapping(int iedge) const override
void surfaceEvalN(FloatArray &answer, int isurf, const FloatArray &lcoords, const FEICellGeometry &cellgeo) const override
virtual const FloatArray giveVertexCoordinates(int i) const =0
double computeNorm() const
void beVectorProductOf(const FloatArray &v1, const FloatArray &v2)
void add(const FloatArray &src)
void resize(Index rows, Index cols)
void zero()
Zeroes all coefficient of receiver.
double at(std::size_t i, std::size_t j) const