mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-26 22:00:33 +05:00
modernize and change to Point<3>
This commit is contained in:
parent
60223b2a86
commit
e956ca0fdc
@ -2067,8 +2067,6 @@ namespace netgen
|
|||||||
void Element ::
|
void Element ::
|
||||||
GetDShape (const Point<3> & hp, DenseMatrix & dshape) const
|
GetDShape (const Point<3> & hp, DenseMatrix & dshape) const
|
||||||
{
|
{
|
||||||
Point3d p = hp;
|
|
||||||
|
|
||||||
int np = GetNP();
|
int np = GetNP();
|
||||||
if (dshape.Height() != 3 || dshape.Width() != np)
|
if (dshape.Height() != 3 || dshape.Width() != np)
|
||||||
{
|
{
|
||||||
@ -2079,16 +2077,16 @@ namespace netgen
|
|||||||
double eps = 1e-6;
|
double eps = 1e-6;
|
||||||
Vector shaper(np), shapel(np);
|
Vector shaper(np), shapel(np);
|
||||||
|
|
||||||
for (int i = 1; i <= 3; i++)
|
for (auto i : Range(3))
|
||||||
{
|
{
|
||||||
Point3d pr(p), pl(p);
|
Point<3> pr(hp), pl(hp);
|
||||||
pr.X(i) += eps;
|
pr[i] += eps;
|
||||||
pl.X(i) -= eps;
|
pl[i] -= eps;
|
||||||
|
|
||||||
GetShape (pr, shaper);
|
GetShape (pr, shaper);
|
||||||
GetShape (pl, shapel);
|
GetShape (pl, shapel);
|
||||||
for (int j = 0; j < np; j++)
|
for (int j = 0; j < np; j++)
|
||||||
dshape(i-1, j) = (shaper(j) - shapel(j)) / (2 * eps);
|
dshape(i, j) = (shaper(j) - shapel(j)) / (2 * eps);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user