Skip to content
Snippets Groups Projects
Commit d492bb32 authored by Koen Hillewaert's avatar Koen Hillewaert
Browse files

Save one double (on 4) in adaptive view by using scalar value for first component in the vector

parent b57a56d3
No related branches found
No related tags found
No related merge requests found
...@@ -1301,7 +1301,7 @@ void adaptiveElements<T>::adapt(double tol, int numComp, ...@@ -1301,7 +1301,7 @@ void adaptiveElements<T>::adapt(double tol, int numComp,
adaptiveVertex *p = (adaptiveVertex*)&(*it); adaptiveVertex *p = (adaptiveVertex*)&(*it);
p->val = res(i); p->val = res(i);
if(resxyz){ if(resxyz){
p->valx = (*resxyz)(i, 0); p->val = (*resxyz)(i, 0);
p->valy = (*resxyz)(i, 1); p->valy = (*resxyz)(i, 1);
p->valz = (*resxyz)(i, 2); p->valz = (*resxyz)(i, 2);
} }
...@@ -1337,7 +1337,7 @@ void adaptiveElements<T>::adapt(double tol, int numComp, ...@@ -1337,7 +1337,7 @@ void adaptiveElements<T>::adapt(double tol, int numComp,
if(numComp == 1) if(numComp == 1)
values.push_back(PValues(p[i]->val)); values.push_back(PValues(p[i]->val));
else else
values.push_back(PValues(p[i]->valx, p[i]->valy, p[i]->valz)); values.push_back(PValues(p[i]->val, p[i]->valy, p[i]->valz));
} }
} }
} }
......
...@@ -18,8 +18,9 @@ class GMSH_PostPlugin; ...@@ -18,8 +18,9 @@ class GMSH_PostPlugin;
class adaptiveVertex { class adaptiveVertex {
public: public:
double x, y, z, X, Y, Z; float x, y, z; //!< parametric coordinates
double val, valx, valy, valz; double X, Y, Z; //!< cartesian coordinates
double val,valy,valz; //!< maximal three values
public: public:
static adaptiveVertex *add(double x, double y, double z, static adaptiveVertex *add(double x, double y, double z,
std::set<adaptiveVertex> &allVertice); std::set<adaptiveVertex> &allVertice);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment