From ef05eda6474bdd0a35d33b6c7cc47822727cc4e1 Mon Sep 17 00:00:00 2001 From: Sambit Das Date: Tue, 11 Mar 2025 13:01:20 -0400 Subject: [PATCH 1/3] wip --- src/dft/dft.cc | 2 +- src/dft/vselfBinsManager.cc | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/dft/dft.cc b/src/dft/dft.cc index 4df745810..a9b12db57 100644 --- a/src/dft/dft.cc +++ b/src/dft/dft.cc @@ -4288,7 +4288,7 @@ namespace dftfe } } - const double fdparam = 1e-5; + const double fdparam = 1e-6; unsigned int flattenedIdCount = 0; for (unsigned int idim = 0; idim < 3; ++idim) for (unsigned int jdim = 0; jdim <= idim; jdim++) diff --git a/src/dft/vselfBinsManager.cc b/src/dft/vselfBinsManager.cc index 51aa9e8c7..ddb1f2060 100644 --- a/src/dft/vselfBinsManager.cc +++ b/src/dft/vselfBinsManager.cc @@ -565,7 +565,7 @@ namespace dftfe if (d_dftParams.smearedNuclearCharges && (d_storedAdaptiveBallRadius < 1e-6)) - radiusAtomBallAdaptive = ((d_dftParams.meshSizeOuterBall > 1.5 && + radiusAtomBallAdaptive = ((d_dftParams.meshSizeOuterBall > 0.1 && d_dftParams.outerAtomBallRadius < 6.0) || (d_dftParams.meshSizeOuterBall > 2.2)) ? 6.0 : @@ -589,9 +589,9 @@ namespace dftfe n_mpi_processes, mpi_communicator, computing_timer); - while (check != 0 && radiusAtomBallAdaptive >= 1.0) + while (check != 0 && radiusAtomBallAdaptive >= 0.1) { - radiusAtomBallAdaptive -= 0.25; + radiusAtomBallAdaptive -= 0.05; check = internal::createAndCheckInteractionMap(interactionMap, dofHandler, @@ -609,7 +609,7 @@ namespace dftfe std::string message; if (check == 1 || check == 2) message = - "DFT-FE error: Tried to adaptively determine the ball radius for nuclear self-potential solve and it has reached the minimum allowed value of 1.0, which can severly detoriate the accuracy of the KSDFT groundstate energy and forces. Please use a larger periodic super cell which can accomodate a larger ball radius."; + "DFT-FE error: Tried to adaptively determine the ball radius for nuclear self-potential solve and it has reached the minimum allowed value of 0.1, which can severly detoriate the accuracy of the KSDFT groundstate energy and forces. Please use a larger periodic super cell which can accomodate a larger ball radius."; AssertThrow(check == 0, dealii::ExcMessage(message)); @@ -1274,9 +1274,9 @@ namespace dftfe if (!d_dftParams.reproducible_output) AssertThrow( - radiusAtomBallReduced >= 1.5, + radiusAtomBallReduced >= 0.1, dealii::ExcMessage( - "DFT-FE error: Adaptively determined reduced ball radius for applying correct Dirichlet boundary condtions taking hanging nodes into account is less than minimum value of 1.5. Try increasing SELF POTENTIAL RADIUS to > 6.0. If that is not possible due to small domain sizes along the periodic directions, reduce MESH SIZE AROUND ATOM and/or increase ATOM BALL RADIUS.")); + "DFT-FE error: Adaptively determined reduced ball radius for applying correct Dirichlet boundary condtions taking hanging nodes into account is less than minimum value of 0.1. Try increasing SELF POTENTIAL RADIUS to > 6.0. If that is not possible due to small domain sizes along the periodic directions, reduce MESH SIZE AROUND ATOM and/or increase ATOM BALL RADIUS.")); } if (d_dftParams.verbosity >= 4 && !d_dftParams.reproducible_output) From e9add9b0407a9c07470df1f58e3b16eb3bd897ba Mon Sep 17 00:00:00 2001 From: Sambit Das Date: Tue, 11 Mar 2025 15:47:56 -0400 Subject: [PATCH 2/3] Update dft.cc --- src/dft/dft.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dft/dft.cc b/src/dft/dft.cc index a9b12db57..4df745810 100644 --- a/src/dft/dft.cc +++ b/src/dft/dft.cc @@ -4288,7 +4288,7 @@ namespace dftfe } } - const double fdparam = 1e-6; + const double fdparam = 1e-5; unsigned int flattenedIdCount = 0; for (unsigned int idim = 0; idim < 3; ++idim) for (unsigned int jdim = 0; jdim <= idim; jdim++) From b151c7df81c948d533999d9992a01e8d21a9dc5a Mon Sep 17 00:00:00 2001 From: Sambit Das Date: Wed, 19 Mar 2025 05:09:23 -0400 Subject: [PATCH 3/3] fix --- src/dft/dft.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dft/dft.cc b/src/dft/dft.cc index 4df745810..7598f25ae 100644 --- a/src/dft/dft.cc +++ b/src/dft/dft.cc @@ -4402,7 +4402,7 @@ namespace dftfe // reset deformDomain(dealii::invert(deformationGradientPerturb2), - true, + false, false, d_dftParamsPtr->verbosity >= 4 ? true : false); }