fix memleak

This commit is contained in:
Tim MJ Nijssen
2022-12-05 12:38:13 +01:00
parent 60983f8e96
commit 9a4bf92207

View File

@ -177,12 +177,14 @@ void twoWayOne2One::createProcMap()
// calculate bounding box of LIG subdomain
// this may have to move to couple when dynamic LB occurs
List<boundBox> ligBoxes(Pstream::nProcs());
double** ligbb = o2o_liggghts_get_boundingbox(lmp);
double** ligbb = new double*[2];
o2o_liggghts_get_boundingbox(lmp,ligbb);
boundBox thisLigBox
(
point(ligbb[0][0], ligbb[0][1], ligbb[0][2]),
point(ligbb[1][0], ligbb[1][1], ligbb[1][2])
);
delete [] ligbb;
if (boundBoxMargin_ > 0.)
{
thisLigBox.max() = thisLigBox.max() + boundBoxMargin_ * vector::one;