Skip to content

Commit

Permalink
CPlot: corr. displayActivePoint
Browse files Browse the repository at this point in the history
  • Loading branch information
benoit128 committed Dec 16, 2024
1 parent b6d489a commit 9b35b2f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Cassiopee/CPlot/CPlot/Display/displayActivePoint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -352,17 +352,21 @@ void Data::displayActivePoint()
E_Int ncon = ptrState->activePointL;
E_Int* connect = z->connect[ncon];
E_Int net = z->nec[ncon];

E_Int eltType = z->eltType[ncon];
E_Int ind1, ind2;
double dx, dy, dz, h;
bool is1D = false;
if (eltType == 1) is1D = true;
if (ne >= net || ne < 0) is1D = false; // force

if (is1D)
{
h = 0.;
ind1 = connect[ne];
ind2 = connect[ne+net];
if (ne+1 < net) ind2 = connect[ne+1];
else if (ne-1 >= 0) ind2 = connect[ne-1];
else ind2 = ind1;
dx = z->x[ind2] - z->x[ind1];
h += dx*dx;
dy = z->y[ind2] - z->y[ind1];
Expand Down

0 comments on commit 9b35b2f

Please sign in to comment.