mirror of
https://github.com/NGSolve/netgen.git
synced 2025-01-27 13:20:34 +05:00
complex visualization
This commit is contained in:
parent
b225adb2cd
commit
6a930665ae
@ -594,6 +594,7 @@ namespace netgen
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
void VisualSceneSolution :: RealVec3d (const double * values, Vec3d & v,
|
void VisualSceneSolution :: RealVec3d (const double * values, Vec3d & v,
|
||||||
bool iscomplex, bool imag)
|
bool iscomplex, bool imag)
|
||||||
{
|
{
|
||||||
@ -619,6 +620,31 @@ namespace netgen
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
Vec<3> VisualSceneSolution :: RealVec3d (const double * values,
|
||||||
|
bool iscomplex, bool imag)
|
||||||
|
{
|
||||||
|
Vec<3> v;
|
||||||
|
if (!iscomplex)
|
||||||
|
{
|
||||||
|
for (int j = 0; j < 3; j++)
|
||||||
|
v(j) = values[j];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (!imag)
|
||||||
|
{
|
||||||
|
for (int j = 0; j < 3; j++)
|
||||||
|
v(j) = values[2*j];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
for (int j = 0; j < 3; j++)
|
||||||
|
v(j) = values[2*j+1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return v;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void VisualSceneSolution :: RealVec3d (const double * values, Vec3d & v,
|
void VisualSceneSolution :: RealVec3d (const double * values, Vec3d & v,
|
||||||
@ -804,7 +830,8 @@ namespace netgen
|
|||||||
|
|
||||||
bool drawelem =
|
bool drawelem =
|
||||||
GetValues (vsol, p.elnr, p.lami(0), p.lami(1), p.lami(2), values);
|
GetValues (vsol, p.elnr, p.lami(0), p.lami(1), p.lami(2), values);
|
||||||
RealVec3d (values, v, vsol->iscomplex, imag_part);
|
// RealVec3d (values, v, vsol->iscomplex, imag_part);
|
||||||
|
v = RealVec3d (values, vsol->iscomplex, imag_part);
|
||||||
|
|
||||||
double val = v.Length();
|
double val = v.Length();
|
||||||
|
|
||||||
@ -3487,7 +3514,10 @@ namespace netgen
|
|||||||
Vec<3> def;
|
Vec<3> def;
|
||||||
if (deform && vecfunction != -1)
|
if (deform && vecfunction != -1)
|
||||||
{
|
{
|
||||||
GetSurfValues (soldata[vecfunction], elnr, facetnr, lam1, lam2, &def(0));
|
// GetSurfValues (soldata[vecfunction], elnr, facetnr, lam1, lam2, &def(0));
|
||||||
|
double values[6];
|
||||||
|
GetSurfValues (soldata[vecfunction], elnr, facetnr, lam1, lam2, values);
|
||||||
|
def = RealVec3d (values, soldata[vecfunction]->iscomplex, imag_part);
|
||||||
def *= scaledeform;
|
def *= scaledeform;
|
||||||
|
|
||||||
if (soldata[vecfunction]->components == 2) def(2) = 0;
|
if (soldata[vecfunction]->components == 2) def(2) = 0;
|
||||||
|
@ -190,8 +190,13 @@ public:
|
|||||||
|
|
||||||
void SaveSolutionData (const char * filename);
|
void SaveSolutionData (const char * filename);
|
||||||
|
|
||||||
|
/*
|
||||||
static void RealVec3d (const double * values, Vec3d & v,
|
static void RealVec3d (const double * values, Vec3d & v,
|
||||||
bool iscomplex, bool imag);
|
bool iscomplex, bool imag);
|
||||||
|
*/
|
||||||
|
static Vec<3> RealVec3d (const double * values,
|
||||||
|
bool iscomplex, bool imag);
|
||||||
|
|
||||||
static void RealVec3d (const double * values, Vec3d & v,
|
static void RealVec3d (const double * values, Vec3d & v,
|
||||||
bool iscomplex, double phaser, double phasei);
|
bool iscomplex, double phaser, double phasei);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user