Skip to content

Commit

Permalink
Merge pull request #146 from IBAMR/ibamr-0.15
Browse files Browse the repository at this point in the history
IBAMR 0.15
  • Loading branch information
drwells authored Jun 28, 2024
2 parents 9bf852b + 0dda54e commit afe0629
Show file tree
Hide file tree
Showing 6 changed files with 127 additions and 151 deletions.
6 changes: 4 additions & 2 deletions IBAMR-toolchain/packages/ibamr.package
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/usr/bin/bash
if [ "${IBAMR_VERSION}" = 0.14.0 ]
if [ "${IBAMR_VERSION}" = 0.15.0 ]
then
CHECKSUM=4af5bd79cd01916a564e5fbb424377c00bb5d682808fddbb5934dc20f64c96f5
elif [ "${IBAMR_VERSION}" = 0.14.0 ]
then
CHECKSUM=2442b19da8b0fcd9ef20fa17b4f68f87c9a323e28b8b46dc0623ed28ec88d364
elif [ "${IBAMR_VERSION}" = 0.13.0 ]
Expand Down
4 changes: 2 additions & 2 deletions IBAMR-toolchain/packages/libmesh.package
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
VERSION=1.7.1
CHECKSUM=df13cc53f149d3378b90064fd46eeddf75e0ea45b39f38e55c65faddf7f5b060
VERSION=1.6.2
CHECKSUM=745874f2b19f9345aac1676ea11deba8ac7f18b3

NAME=libmesh-${VERSION}
SOURCE=https://github.com/libMesh/libmesh/releases/download/v${VERSION}/
Expand Down
12 changes: 11 additions & 1 deletion IBAMR-toolchain/packages/samrai.package
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,24 @@ elif [ "${SAMRAI_VERSION}" = "2024.01.24" ]; then
VERSION=2024.01.24
CHECKSUM=ba1d0b6444355609fc98cdbfcbe686c194fdeecb

NAME=${VERSION}
PACKING=.tar.gz
SOURCE=https://github.com/IBAMR/IBSAMRAI2/archive/refs/tags/
EXTRACTSTO=IBSAMRAI2-$VERSION/
BUILDCHAIN=autotools
INSTALL_PATH=${INSTALL_PATH}/${EXTRACTSTO}
elif [ "${SAMRAI_VERSION}" = "2024.06.28" ]; then
VERSION=2024.06.28
CHECKSUM=552a00452a17a89df5ef7e2906a7ebd6b781b6d9

NAME=${VERSION}
PACKING=.tar.gz
SOURCE=https://github.com/IBAMR/IBSAMRAI2/archive/refs/tags/
EXTRACTSTO=IBSAMRAI2-$VERSION/
BUILDCHAIN=autotools
INSTALL_PATH=${INSTALL_PATH}/${EXTRACTSTO}
else
cecho ${BAD} "ERROR: at the present time autoibamr only supports SAMRAI/IBSAMRAI2 versions 2.4.4 and 2024.01.24."
cecho ${BAD} "ERROR: at the present time autoibamr only supports SAMRAI/IBSAMRAI2 versions 2.4.4, 2024.01.24, and 2024.06.28."
exit 1
fi

Expand Down
103 changes: 103 additions & 0 deletions IBAMR-toolchain/patches/libmesh-1.6.2-petsc.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
diff --git a/src/solvers/petsc_linear_solver.C b/src/solvers/petsc_linear_solver.C
index 5096f6a..dd11e5d 100644
--- a/src/solvers/petsc_linear_solver.C
+++ b/src/solvers/petsc_linear_solver.C
@@ -1567,7 +1567,6 @@ LinearConvergenceReason PetscLinearSolver<T>::get_converged_reason() const
case KSP_CONVERGED_ITS : return CONVERGED_ITS;
case KSP_CONVERGED_CG_NEG_CURVE : return CONVERGED_CG_NEG_CURVE;
case KSP_CONVERGED_CG_CONSTRAINED : return CONVERGED_CG_CONSTRAINED;
- case KSP_CONVERGED_STEP_LENGTH : return CONVERGED_STEP_LENGTH;
case KSP_CONVERGED_HAPPY_BREAKDOWN : return CONVERGED_HAPPY_BREAKDOWN;
case KSP_DIVERGED_NULL : return DIVERGED_NULL;
case KSP_DIVERGED_ITS : return DIVERGED_ITS;
diff --git a/src/solvers/petscdmlibmeshimpl.C b/src/solvers/petscdmlibmeshimpl.C
index f2e4179..552fa0a 100644
--- a/src/solvers/petscdmlibmeshimpl.C
+++ b/src/solvers/petscdmlibmeshimpl.C
@@ -99,7 +99,8 @@ PetscErrorCode DMlibMeshSetSystem_libMesh(DM dm, NonlinearImplicitSystem & sys)
PetscValidHeaderSpecific(dm,DM_CLASSID,1);
PetscBool islibmesh;
ierr = PetscObjectTypeCompare((PetscObject)dm, DMLIBMESH,&islibmesh);
- if (!islibmesh) SETERRQ2(((PetscObject)dm)->comm, PETSC_ERR_ARG_WRONG, "Got DM of type %s, not of type %s", ((PetscObject)dm)->type_name, DMLIBMESH);
+ if (!islibmesh)
+ SETERRQ(((PetscObject)dm)->comm, PETSC_ERR_ARG_WRONG, "DM has wrong type");

if (dm->setupcalled) SETERRQ(((PetscObject)dm)->comm, PETSC_ERR_ARG_WRONGSTATE, "Cannot reset the libMesh system after DM has been set up.");
DM_libMesh * dlm = (DM_libMesh *)(dm->data);
@@ -159,7 +160,8 @@ PetscErrorCode DMlibMeshGetSystem_libMesh(DM dm, NonlinearImplicitSystem *& sys)
PetscValidHeaderSpecific(dm,DM_CLASSID,1);
PetscBool islibmesh;
ierr = PetscObjectTypeCompare((PetscObject)dm, DMLIBMESH,&islibmesh);CHKERRQ(ierr);
- if (!islibmesh) SETERRQ2(((PetscObject)dm)->comm, PETSC_ERR_ARG_WRONG, "Got DM of type %s, not of type %s", ((PetscObject)dm)->type_name, DMLIBMESH);
+ if (!islibmesh)
+ SETERRQ(((PetscObject)dm)->comm, PETSC_ERR_ARG_WRONG, "DM has wrong type");
DM_libMesh * dlm = (DM_libMesh *)(dm->data);
sys = dlm->sys;
PetscFunctionReturn(0);
@@ -176,7 +178,8 @@ PetscErrorCode DMlibMeshGetBlocks(DM dm, PetscInt * n, char *** blocknames)
PetscValidHeaderSpecific(dm,DM_CLASSID,1);
PetscBool islibmesh;
ierr = PetscObjectTypeCompare((PetscObject)dm, DMLIBMESH,&islibmesh);
- if (!islibmesh) SETERRQ2(((PetscObject)dm)->comm, PETSC_ERR_ARG_WRONG, "Got DM of type %s, not of type %s", ((PetscObject)dm)->type_name, DMLIBMESH);
+ if (!islibmesh)
+ SETERRQ(((PetscObject)dm)->comm, PETSC_ERR_ARG_WRONG, "DM has wrong type");
DM_libMesh * dlm = (DM_libMesh *)(dm->data);
PetscValidPointer(n,2);
*n = cast_int<unsigned int>(dlm->blockids->size());
@@ -201,7 +204,8 @@ PetscErrorCode DMlibMeshGetVariables(DM dm, PetscInt * n, char *** varnames)
PetscBool islibmesh;
PetscInt i;
ierr = PetscObjectTypeCompare((PetscObject)dm, DMLIBMESH,&islibmesh);
- if (!islibmesh) SETERRQ2(((PetscObject)dm)->comm, PETSC_ERR_ARG_WRONG, "Got DM of type %s, not of type %s", ((PetscObject)dm)->type_name, DMLIBMESH);
+ if (!islibmesh)
+ SETERRQ(((PetscObject)dm)->comm, PETSC_ERR_ARG_WRONG, "DM has wrong type");
DM_libMesh * dlm = (DM_libMesh *)(dm->data);
PetscValidPointer(n,2);
*n = cast_int<unsigned int>(dlm->varids->size());
@@ -487,7 +491,8 @@ PetscErrorCode DMlibMeshCreateFieldDecompositionDM(DM dm, PetscInt dnumber, Pets
PetscFunctionBegin;
PetscValidHeaderSpecific(dm,DM_CLASSID,1);
ierr = PetscObjectTypeCompare((PetscObject)dm, DMLIBMESH,&islibmesh);
- if (!islibmesh) SETERRQ2(((PetscObject)dm)->comm, PETSC_ERR_ARG_WRONG, "Got DM of type %s, not of type %s", ((PetscObject)dm)->type_name, DMLIBMESH);
+ if (!islibmesh)
+ SETERRQ(((PetscObject)dm)->comm, PETSC_ERR_ARG_WRONG, "DM has wrong type");
if (dnumber < 0) SETERRQ1(((PetscObject)dm)->comm, PETSC_ERR_ARG_WRONG, "Negative number %D of decomposition parts", dnumber);
PetscValidPointer(ddm,5);
DM_libMesh * dlm = (DM_libMesh *)(dm->data);
@@ -539,7 +544,8 @@ PetscErrorCode DMlibMeshCreateDomainDecompositionDM(DM dm, PetscInt dnumber, Pet
PetscFunctionBegin;
PetscValidHeaderSpecific(dm,DM_CLASSID,1);
ierr = PetscObjectTypeCompare((PetscObject)dm, DMLIBMESH,&islibmesh);
- if (!islibmesh) SETERRQ2(((PetscObject)dm)->comm, PETSC_ERR_ARG_WRONG, "Got DM of type %s, not of type %s", ((PetscObject)dm)->type_name, DMLIBMESH);
+ if (!islibmesh)
+ SETERRQ(((PetscObject)dm)->comm, PETSC_ERR_ARG_WRONG, "DM has wrong type");
if (dnumber < 0) SETERRQ1(((PetscObject)dm)->comm, PETSC_ERR_ARG_WRONG, "Negative number %D of decomposition parts", dnumber);
PetscValidPointer(ddm,5);
DM_libMesh * dlm = (DM_libMesh *)(dm->data);
@@ -767,7 +773,7 @@ static PetscErrorCode DMCreateGlobalVector_libMesh(DM dm, Vec *x)
ierr = PetscObjectTypeCompare((PetscObject)dm, DMLIBMESH, &eq); CHKERRQ(ierr);

if (!eq)
- SETERRQ2(((PetscObject)dm)->comm, PETSC_ERR_ARG_WRONG, "DM of type %s, not of type %s", ((PetscObject)dm)->type, DMLIBMESH);
+ SETERRQ(((PetscObject)dm)->comm, PETSC_ERR_ARG_WRONG, "DM has wrong type");

if (!dlm->sys)
SETERRQ(PETSC_COMM_WORLD, PETSC_ERR_ARG_WRONGSTATE, "No libMesh system set for DM_libMesh");
@@ -814,7 +820,7 @@ static PetscErrorCode DMCreateMatrix_libMesh(DM dm, Mat * A)
ierr = PetscObjectTypeCompare((PetscObject)dm, DMLIBMESH, &eq); CHKERRQ(ierr);

if (!eq)
- SETERRQ2(((PetscObject)dm)->comm, PETSC_ERR_ARG_WRONG, "DM of type %s, not of type %s", ((PetscObject)dm)->type, DMLIBMESH);
+ SETERRQ(((PetscObject)dm)->comm, PETSC_ERR_ARG_WRONG, "DM has wrong type");

if (!dlm->sys)
SETERRQ(PETSC_COMM_WORLD, PETSC_ERR_ARG_WRONGSTATE, "No libMesh system set for DM_libMesh");
@@ -896,7 +902,7 @@ static PetscErrorCode DMSetUp_libMesh(DM dm)
ierr = PetscObjectTypeCompare((PetscObject)dm, DMLIBMESH, &eq); CHKERRQ(ierr);

if (!eq)
- SETERRQ2(((PetscObject)dm)->comm, PETSC_ERR_ARG_WRONG, "DM of type %s, not of type %s", ((PetscObject)dm)->type, DMLIBMESH);
+ SETERRQ(((PetscObject)dm)->comm, PETSC_ERR_ARG_WRONG, "DM has wrong type");

if (!dlm->sys)
SETERRQ(PETSC_COMM_WORLD, PETSC_ERR_ARG_WRONGSTATE, "No libMesh system set for DM_libMesh");
141 changes: 0 additions & 141 deletions IBAMR-toolchain/patches/libmesh-1.7.1-petsc.patch

This file was deleted.

12 changes: 7 additions & 5 deletions autoibamr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ DEBUGGING=OFF
DEPENDENCIES_ONLY=OFF
EXTERNAL_BOOST=OFF
EXTERNAL_BOOST_DIR=
IBAMR_VERSION=0.14.0
IBAMR_VERSION=0.15.0
JOBS=1
NATIVE_OPTIMIZATIONS=OFF
PREFIX=~/autoibamr
Expand Down Expand Up @@ -143,7 +143,7 @@ while [ -n "$1" ]; do
echo " no external dependencies on Linux."
echo " --external-boost=<path> Use an external copy of boost instead of the one bundled with IBAMR."
echo " --ibamr-version Version of IBAMR to install. Presently, versions 0.10.1, 0.11.0, 0.12.0,"
echo " 0.12.1, 0.13.0, and 0.14.0 are supported."
echo " 0.12.1, 0.13.0, 0.14.0, and 0.15.0 are supported."
echo " --python-interpreter Absolute path to a python interpreter. Defaults to the first of"
echo " {python,python3,python2.7} found on the present machine."
echo " -p <path>, --prefix=<path> Set a different prefix path (default $PREFIX)"
Expand Down Expand Up @@ -282,8 +282,10 @@ if [ ${DEBUGGING} = "ON" ] && [ ${NATIVE_OPTIMIZATIONS} = "ON" ]; then
exit 1
fi

if [ "${IBAMR_VERSION}" = "0.14.0" ]; then
SAMRAI_VERSION=2024.01.24
if [ "${IBAMR_VERSION}" = "0.15.0" ]; then
SAMRAI_VERSION=2024.06.28
elif [ "${IBAMR_VERSION}" = "0.14.0" ]; then
SAMRAI_VERSION=2024.06.28
elif [ "${IBAMR_VERSION}" = "0.13.0" ]; then
SAMRAI_VERSION=2.4.4
elif [ "${IBAMR_VERSION}" = "0.12.1" ]; then
Expand All @@ -295,7 +297,7 @@ elif [ "${IBAMR_VERSION}" = "0.11.0" ]; then
elif [ "${IBAMR_VERSION}" = "0.10.1" ]; then
SAMRAI_VERSION=2.4.4
else
cecho ${BAD} "ERROR: at the present time autoibamr only supports IBAMR versions 0.14.0, 0.13.0, 0.12.1, 0.12.0, 0.11.0, and 0.10.1."
cecho ${BAD} "ERROR: at the present time autoibamr only supports IBAMR versions 0.15.0, 0.14.0, 0.13.0, 0.12.1, 0.12.0, 0.11.0, and 0.10.1."
exit 1
fi

Expand Down

0 comments on commit afe0629

Please sign in to comment.