fix uninitialized values

This commit is contained in:
Lukas Kogler 2019-04-16 16:04:22 +02:00
parent d6f1cf2bda
commit 5423242cd8
2 changed files with 2 additions and 3 deletions

View File

@ -246,8 +246,7 @@ namespace netgen
: FlatArray<T, BASE, TIND> (asize, asize ? new T[asize] : nullptr)
{
allocsize = asize;
if(asize)
ownmem = 1;
ownmem = (asize == 0) ? 0 : 1;
}
/// Generate array in user data

View File

@ -873,7 +873,7 @@ namespace netgen
*testout << "got " << numvert << " vertices" << endl;
{
Element el;
Element el(dim==2 ? 3 : 4);
Array<int> elarray;
MyMPI_Recv (elarray, 0, MPI_TAG_MESH+2, comm);