mirror of
https://github.com/NGSolve/netgen.git
synced 2025-03-19 04:57:57 +05:00
take autoscale value on drawn regions only
This commit is contained in:
parent
787c6043fa
commit
15bd6cbed0
@ -2667,6 +2667,8 @@ namespace netgen
|
|||||||
for (int i=first; i<next; i++)
|
for (int i=first; i<next; i++)
|
||||||
{
|
{
|
||||||
double val;
|
double val;
|
||||||
|
if(!VolumeElementActive(sol, *mesh, (*mesh)[ElementIndex(i)]))
|
||||||
|
continue;
|
||||||
bool considerElem = GetValue (sol, i, 0.333, 0.333, 0.333, comp, val);
|
bool considerElem = GetValue (sol, i, 0.333, 0.333, 0.333, comp, val);
|
||||||
if (considerElem)
|
if (considerElem)
|
||||||
{
|
{
|
||||||
@ -2698,6 +2700,8 @@ namespace netgen
|
|||||||
// for (int i = 0; i < nse; i++)
|
// for (int i = 0; i < nse; i++)
|
||||||
for (SurfaceElementIndex i : mesh->SurfaceElements().Range())
|
for (SurfaceElementIndex i : mesh->SurfaceElements().Range())
|
||||||
{
|
{
|
||||||
|
if(!SurfaceElementActive(sol, *mesh, (*mesh)[i]))
|
||||||
|
continue;
|
||||||
ELEMENT_TYPE type = (*mesh)[i].GetType();
|
ELEMENT_TYPE type = (*mesh)[i].GetType();
|
||||||
double val;
|
double val;
|
||||||
bool considerElem = (type == QUAD)
|
bool considerElem = (type == QUAD)
|
||||||
@ -4723,7 +4727,7 @@ namespace netgen
|
|||||||
|
|
||||||
|
|
||||||
bool VisualSceneSolution ::
|
bool VisualSceneSolution ::
|
||||||
SurfaceElementActive(const SolData *data, const Mesh & mesh, const Element2d & el)
|
SurfaceElementActive(const SolData *data, const Mesh & mesh, const Element2d & el) const
|
||||||
{
|
{
|
||||||
if(data == nullptr) return true;
|
if(data == nullptr) return true;
|
||||||
bool is_active = true;
|
bool is_active = true;
|
||||||
@ -4749,7 +4753,7 @@ namespace netgen
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool VisualSceneSolution ::
|
bool VisualSceneSolution ::
|
||||||
VolumeElementActive(const SolData *data, const Mesh & mesh, const Element & el)
|
VolumeElementActive(const SolData *data, const Mesh & mesh, const Element & el) const
|
||||||
{
|
{
|
||||||
bool is_active = true;
|
bool is_active = true;
|
||||||
if(data->draw_volumes)
|
if(data->draw_volumes)
|
||||||
|
@ -253,8 +253,8 @@ private:
|
|||||||
void DrawCone (const Point<3> & p1, const Point<3> & p2, double r);
|
void DrawCone (const Point<3> & p1, const Point<3> & p2, double r);
|
||||||
void DrawCylinder (const Point<3> & p1, const Point<3> & p2, double r);
|
void DrawCylinder (const Point<3> & p1, const Point<3> & p2, double r);
|
||||||
|
|
||||||
bool SurfaceElementActive(const SolData *data, const Mesh & mesh, const Element2d & sei);
|
bool SurfaceElementActive(const SolData *data, const Mesh & mesh, const Element2d & sei) const;
|
||||||
bool VolumeElementActive(const SolData *data, const Mesh & mesh, const Element & ei);
|
bool VolumeElementActive(const SolData *data, const Mesh & mesh, const Element & ei) const;
|
||||||
|
|
||||||
// Get Function Value, local coordinates lam1, lam2, lam3,
|
// Get Function Value, local coordinates lam1, lam2, lam3,
|
||||||
bool GetValue (const SolData * data, ElementIndex elnr,
|
bool GetValue (const SolData * data, ElementIndex elnr,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user