Go to the documentation of this file.
44 double xi = lcoords(0);
46 answer(0) = 0.5 * ( xi - 1.0 ) * xi;
47 answer(1) = 0.5 * ( xi + 1.0 ) * xi;
48 answer(2) = 1.0 - xi * xi;
61 double xi = lcoords(0);
63 answer.
at(1, 1) = xi - 0.5;
64 answer.
at(2, 1) = xi + 0.5;
65 answer.
at(3, 1) = -2.0 * xi;
71 this->
evalN(n, lcoords, cellgeo);
83 double x1_x2, y1_y2, px_x3, py_y3, x3_x2_x1, y3_y2_y1;
84 double b0, b1, b2, b3;
93 b0 = 0.50 * ( x1_x2 * px_x3 + y1_y2 * py_y3 );
94 b1 = 0.25 * ( x1_x2 * x1_x2 + y1_y2 * y1_y2 ) + x3_x2_x1 * px_x3 + y3_y2_y1 * py_y3;
95 b2 = 0.75 * ( x1_x2 * x3_x2_x1 + y1_y2 * y3_y2_y1 );
96 b3 = 0.50 * ( x3_x2_x1 * x3_x2_x1 + y3_y2_y1 * y3_y2_y1 );
100 cubic(b3, b2, b1, b0, & r [ 0 ], & r [ 1 ], & r [ 2 ], & roots);
107 for (
int i = 0; i < roots; i++ ) {
108 if ( r [ i ] > -1.0 && r [ i ] < 1.0 ) {
112 r [ i ] -= ( b0 + b1 * r [ i ] + b2 * r [ i ] * r [ i ] + b3 * r [ i ] * r [ i ] * r [ i ] ) / ( b1 + 2 * b2 * r [ i ] + 3 * b3 * r [ i ] * r [ i ] );
113 p [ points ] = r [ i ];
118 double min_distance2 = 0.0, min_xi = 0;
122 for (
int i = 0; i < points; i++ ) {
126 if ( i == 0 || distance2 < min_distance2 ) {
127 min_distance2 = distance2;
132 answer(0) =
clamp(min_xi, -1., 1.);
137IntArray FEI2dLineQuad :: computeLocalEdgeMapping(
int iedge)
const
144 this->
evalN(answer, lcoords, cellgeo);
147void FEI2dLineQuad :: edgeEvaldNds(
FloatArray &answer,
int iedge,
150 double xi = lcoords(0);
152 answer(0) = -0.5 + xi;
153 answer(1) = 0.5 + xi;
154 answer(2) = -2.0 * xi;
164 double J = sqrt(es1 * es1 + es2 * es2);
172 double xi = lcoords(0);
173 double dN1dxi = -0.5 + xi;
174 double dN2dxi = 0.5 + xi;
175 double dN3dxi = -2.0 * xi;
190void FEI2dLineQuad :: edgeLocal2global(
FloatArray &answer,
int iedge,
198 double xi = lcoords(0);
199 double a1 = -0.5 + xi;
200 double a2 = 0.5 + xi;
201 double a3 = -2.0 * xi;
210 return sqrt(es1 * es1 + es2 * es2);
215 double xi = lcoords(0);
216 double dN1dxi = -0.5 + xi;
217 double dN2dxi = 0.5 + xi;
218 double dN3dxi = -2.0 * xi;
227 double J = sqrt(es1 * es1 + es2 * es2);
230 jacobianMatrix.
resize(2, 2);
231 jacobianMatrix(0, 0) = es1 / J;
232 jacobianMatrix(0, 1) = es2 / J;
233 jacobianMatrix(1, 0) = -es2 / J;
234 jacobianMatrix(1, 1) = es1 / J;
243double FEI2dLineQuad :: evalNXIntegral(
int iEdge,
const FEICellGeometry &cellgeo)
const
246 double x1 = node1.
at(
xind);
247 double y1 = node1.at(
yind);
250 double x2 = node2.
at(
xind);
251 double y2 = node2.at(
yind);
254 double x3 = node3.
at(
xind);
255 double y3 = node3.at(
yind);
257 return ( x1 * y2 - x2 * y1 + 4 * ( x3 * ( y1 - y2 ) + y3 * ( x2 - x1 ) ) ) / 3.0;
262 auto iRule = std::make_unique<GaussIntegrationRule>(1,
nullptr);
263 int points = iRule->getRequiredNumberOfIntegrationPoints(
_Line,
order + 1);
264 iRule->SetUpPointsOnLine(points, _Unknown);
265 return std::move(iRule);
IntArray computeLocalEdgeMapping(int iedge) const override
void local2global(FloatArray &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo) const override
void evalN(FloatArray &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo) const override
virtual const FloatArray giveVertexCoordinates(int i) const =0
double normalize_giveNorm()
void resize(Index rows, Index cols)
*Sets size of receiver to be an empty matrix It will have zero rows and zero columns size void clear()
double at(std::size_t i, std::size_t j) const
void cubic(double a, double b, double c, double d, double *r1, double *r2, double *r3, int *num)
double distance_square(const FloatArray &x, const FloatArray &y)
double clamp(int a, int lower, int upper)
Returns the clamped value of a between upper and lower.
This page is part of the
OOFEM-3.0 documentation. Copyright Copyright (C) 1994-2025 Borek Patzak
Bořek Patzák
Project e-mail:
oofem@fsv.cvut.cz
Generated at for OOFEM by
doxygen
1.15.0 written by Dimitri van Heesch,
© 1997-2011