Closed bindi-nagda closed 5 months ago
The bug from above has now been fixed by using unique pointers to the hierarchy data operations. I'm not certain why this fixed the problem though as I'm new to using the unique_ptr class.
unique_ptr
is a smart pointer that automatically deletes itself when the unique_ptr
goes out of scope, similar to SAMRAI::tbox::Pointer
and std::shared_ptr
. The main difference is that unique_ptr
can not be copied, meaning only one instantiation of unique_ptr
can be created. This is in contrast to shared_ptr
and Pointer
, where you can have multiple copies.
@bindi-nagda Do you want to fix the conflicts or should I?
@bindi-nagda Do you want to fix the conflicts or should I?
I can take care of those
@abarret This is ready for review.
These tests fail on my laptop. I will investigate.
I ran the linter and pushed the changes. Maybe the tests are failing because the formatting of the .input and .output files in tests/
needs to be adjusted using dos2unix(?) I didn't run into this issue today but it has happened in the past.
I'm getting error norms that are about half the size of the output.
This is specifically for the following tests
physical_bc/solve_2d.homogeneous.uniGrid.input
physical_bc/channel_2d.uniThn.uniGrid.input
physical_bc/solve_2d.inhomogeneous.uniGrid.input
physical_bc/channel_2d.uniThn.amrGrid.input
physical_bc/solve_2d.homogeneous.amrGrid.input
physical_bc/solve_2d.inhomogeneous.amrGrid.input
@abarret I updated the outputs so those should pass for you now. I had to do a git pull on IBAMR master because my last build was from Feb 11th.
I wanted to draft this PR so that @abarret can look at one of the tests that can't be run due to a bug. See tests/convective_op/convective_op_2d.uniThn.amrGrid.input. This file results in an error we observed before:
P=00000:Program abort called in file ``/home/bnagda2015/sfw/samrai/2.4.4/linux-g++-opt/include/GridGeometry.C'' at line 760 P=00000:ERROR MESSAGE: P=00000:Error in hier::GridGeometry<DIM> object with name = CartesianGeometry: in computeMaxGhostWidth(): Cannot add variables and increase maximum ghost width after creating the GridGeometry!
This was fixed in the hierarchy integrator class for tests with time stepping whereby we create the convective operators before the patch hierarchy is finished being created so we can specify the max ghost cell widths. I suppose we need to do a similar thing, but inside the convective manager class?