mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-24 21:10:33 +05:00
visualization fixes
This commit is contained in:
parent
20cfea7f30
commit
1420b8dc9e
@ -267,6 +267,7 @@ namespace netgen
|
||||
void CalcPartition (double l, double h, double h1, double h2,
|
||||
double hcurve, double elto0, Array<double> & points)
|
||||
{
|
||||
cout << "calcpart, h = " << h << ", h1 = " << h1 << ", h2 = " << h2 << ", hcurve = " << hcurve << endl;
|
||||
int i, j, n, nel;
|
||||
double sum, t, dt, fun, fperel, oldf, f;
|
||||
|
||||
|
@ -876,6 +876,7 @@ void SplineGeometry<D> :: LoadData ( ifstream & infile )
|
||||
|
||||
geompoints.Append (GeomPoint<D>(x, hd));
|
||||
geompoints.Last().hpref = flags.GetDefineFlag ("hpref");
|
||||
geompoints.Last().hmax = 1e99;
|
||||
}
|
||||
|
||||
PrintMessage (3, nump, " points loaded");
|
||||
@ -935,6 +936,7 @@ void SplineGeometry<D> :: LoadData ( ifstream & infile )
|
||||
infile >> spline->reffak;
|
||||
spline -> leftdom = leftdom;
|
||||
spline -> rightdom = rightdom;
|
||||
spline -> hmax = 1e99;
|
||||
splines.Append (spline);
|
||||
|
||||
|
||||
|
@ -1180,6 +1180,8 @@ namespace netgen
|
||||
|
||||
bool CurvedElements :: IsSurfaceElementCurved (SurfaceElementIndex elnr) const
|
||||
{
|
||||
if (!IsHighOrder()) return false;
|
||||
|
||||
if (mesh.coarsemesh)
|
||||
{
|
||||
const HPRefElement & hpref_el =
|
||||
|
@ -490,8 +490,12 @@ public:
|
||||
// by JS, only for 2D meshes ????
|
||||
int GetPartition () const { return partitionNumber; }
|
||||
void SetPartition (int nr) { partitionNumber = nr; };
|
||||
|
||||
#else
|
||||
bool IsGhost () const { return false; }
|
||||
#endif
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
@ -756,6 +760,8 @@ public:
|
||||
bool IsGhost () const { return isghost; }
|
||||
|
||||
void SetGhost ( const bool aisghost ) { isghost = aisghost; }
|
||||
#else
|
||||
bool IsGhost () const { return false; }
|
||||
#endif
|
||||
|
||||
friend class Mesh;
|
||||
|
@ -184,7 +184,6 @@ namespace netgen
|
||||
void FieldLineCalc :: GenerateFieldLines(Array<Point3d> & potential_startpoints, const int numlines, const int gllist,
|
||||
const double minval, const double maxval, const int logscale, double phaser, double phasei)
|
||||
{
|
||||
glNewList(gllist, GL_COMPILE);
|
||||
|
||||
|
||||
Array<Point3d> points;
|
||||
@ -232,6 +231,9 @@ namespace netgen
|
||||
|
||||
cout << endl;
|
||||
|
||||
|
||||
|
||||
|
||||
for(int i=0; i<potential_startpoints.Size(); i++)
|
||||
{
|
||||
cout << "\rFieldline Calculation " << int(100.*i/potential_startpoints.Size()) << "%"; cout.flush();
|
||||
@ -253,19 +255,19 @@ namespace netgen
|
||||
usable = true;
|
||||
|
||||
// vss.SetOpenGlColor (0.5*(values[k]+values[k+1]), minval, maxval, logscale);
|
||||
|
||||
/*
|
||||
if (vss.usetexture == 1)
|
||||
glTexCoord1f ( 0.5*(values[k]+values[k+1]) );
|
||||
else
|
||||
vss.SetOpenGlColor (0.5*(values[k]+values[k+1]) );
|
||||
|
||||
|
||||
*/
|
||||
vss.SetOpenGlColor (0.5*(values[k]+values[k+1]) );
|
||||
vss.DrawCylinder (points[k], points[k+1], thickness);
|
||||
}
|
||||
|
||||
if(usable) calculated++;
|
||||
}
|
||||
cout << "\rFieldline Calculation " << 100 << "%" << endl;
|
||||
glEndList ();
|
||||
|
||||
}
|
||||
|
||||
@ -707,9 +709,14 @@ namespace netgen
|
||||
double phaser = cos(phi), phasei = sin(phi);
|
||||
|
||||
|
||||
|
||||
glNewList(fieldlineslist+ln, GL_COMPILE);
|
||||
|
||||
SetTextureMode (usetexture);
|
||||
linecalc.GenerateFieldLines(startpoints,num_fieldlines / num_fieldlineslists+1,
|
||||
fieldlineslist+ln,minval,maxval,logscale,phaser,phasei);
|
||||
|
||||
glEndList ();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -47,7 +47,7 @@ class VisualSceneSolution : public VisualScene
|
||||
int isolinelist;
|
||||
int clipplane_isolinelist;
|
||||
int surface_vector_list;
|
||||
int cone_list;
|
||||
// int cone_list;
|
||||
int isosurface_list;
|
||||
|
||||
int pointcurvelist;
|
||||
@ -299,10 +299,13 @@ public:
|
||||
const Array<ClipPlaneTrig> & trigs,
|
||||
const Array<ClipPlanePoint> & points);
|
||||
|
||||
void SetOpenGlColor(double val, double valmin, double valmax, int logscale = 0);
|
||||
// void SetOpenGlColor(double val, double valmin, double valmax, int logscale = 0);
|
||||
|
||||
void SetOpenGlColor(double val);
|
||||
|
||||
// 0 .. non, 1 .. scalar, 2 .. complex
|
||||
void SetTextureMode (int texturemode) const;
|
||||
|
||||
#ifndef SMALLLIB
|
||||
#ifndef NOTCL
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user