fix uninizialized area and maybe deleted value being appended

pout3d may be deleted when array resizes, so copy it
This commit is contained in:
Christopher Lackner 2020-09-07 15:19:53 +02:00
parent a45cbd6f84
commit 218c4a531b
2 changed files with 2 additions and 2 deletions

View File

@ -797,7 +797,7 @@ namespace netgen
double area; double area;
public: public:
CSurfaceArea (const Mesh & amesh) CSurfaceArea (const Mesh & amesh)
: mesh(amesh), valid(false) { ; } : mesh(amesh), valid(false), area(0.) { ; }
void Add (const Element2d & sel) void Add (const Element2d & sel)
{ {

View File

@ -675,7 +675,7 @@ namespace netgen
plainpoints.Append (newpout); plainpoints.Append (newpout);
const auto& pout3d = locpoints.Get(pouti); auto pout3d = locpoints.Get(pouti);
locpoints.Append (pout3d); locpoints.Append (pout3d);
plainzones.Append (0); plainzones.Append (0);