mirror of
https://github.com/NGSolve/netgen.git
synced 2025-01-12 22:20:35 +05:00
visualize deformation of 1d elements
This commit is contained in:
parent
819fca6940
commit
1629d6bf69
@ -1164,8 +1164,12 @@ namespace netgen
|
|||||||
const SolData * sol = NULL;
|
const SolData * sol = NULL;
|
||||||
if (scalfunction != -1) sol = soldata[scalfunction];
|
if (scalfunction != -1) sol = soldata[scalfunction];
|
||||||
|
|
||||||
|
const SolData * vsol = NULL;
|
||||||
|
if (deform && vecfunction != -1) vsol = soldata[vecfunction];
|
||||||
|
|
||||||
int ncomp = 0;
|
int ncomp = 0;
|
||||||
if (sol) ncomp = sol->components;
|
if (sol) ncomp = sol->components;
|
||||||
|
if (vsol) ncomp = vsol->components;
|
||||||
Array<double> mvalues(ncomp);
|
Array<double> mvalues(ncomp);
|
||||||
|
|
||||||
|
|
||||||
@ -1180,7 +1184,17 @@ namespace netgen
|
|||||||
for (int j = 0; j < npt; j++)
|
for (int j = 0; j < npt; j++)
|
||||||
mesh->GetCurvedElements().
|
mesh->GetCurvedElements().
|
||||||
CalcSegmentTransformation (pref[j], i, points[j]);
|
CalcSegmentTransformation (pref[j], i, points[j]);
|
||||||
if (sol)
|
if (vsol)
|
||||||
|
{
|
||||||
|
for (int j = 0; j < npt; j++)
|
||||||
|
{
|
||||||
|
vsol->solclass->GetSegmentValue (i, pref[j], &mvalues[0]);
|
||||||
|
// values[j] = ExtractValue (sol, scalcomp, &mvalues[0]);
|
||||||
|
points[j](0) += scaledeform * mvalues[0];
|
||||||
|
points[j](1) += scaledeform * mvalues[1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (sol)
|
||||||
{
|
{
|
||||||
for (int j = 0; j < npt; j++)
|
for (int j = 0; j < npt; j++)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user