-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implemented ElectrostaticAllElectronFE.t.cpp
- Loading branch information
Avirup Sircar
committed
May 9, 2024
1 parent
e04fb1f
commit 4438f67
Showing
22 changed files
with
1,527 additions
and
299 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/****************************************************************************** | ||
* Copyright (c) 2021. * | ||
* The Regents of the University of Michigan and DFT-EFE developers. * | ||
* * | ||
* This file is part of the DFT-EFE code. * | ||
* * | ||
* DFT-EFE is free software: you can redistribute it and/or modify * | ||
* it under the terms of the Lesser GNU General Public License as * | ||
* published by the Free Software Foundation, either version 3 of * | ||
* the License, or (at your option) any later version. * | ||
* * | ||
* DFT-EFE is distributed in the hope that it will be useful, but * | ||
* WITHOUT ANY WARRANTY; without even the implied warranty * | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * | ||
* See the Lesser GNU General Public License for more details. * | ||
* * | ||
* You should have received a copy of the GNU Lesser General Public * | ||
* License at the top level of DFT-EFE distribution. If not, see * | ||
* <https://www.gnu.org/licenses/>. * | ||
******************************************************************************/ | ||
|
||
/* | ||
* @author Avirup Sircar | ||
*/ | ||
#include <ksdft/Defaults.h> | ||
#include <limits.h> | ||
namespace dftefe | ||
{ | ||
namespace ksdft | ||
{ | ||
/** | ||
* @brief Setting all the PoissonProblemDefaults | ||
*/ | ||
const linearAlgebra::PreconditionerType PoissonProblemDefaults::PC_TYPE = | ||
linearAlgebra::PreconditionerType::JACOBI; | ||
const size_type PoissonProblemDefaults::MAX_CELL_TIMES_NUMVECS = 50; | ||
const size_type PoissonProblemDefaults::MAX_ITER = 1e8; | ||
const double PoissonProblemDefaults::ABSOLUTE_TOL = 1e-13; | ||
const double PoissonProblemDefaults::RELATIVE_TOL = 1e-14; | ||
const double PoissonProblemDefaults::DIVERGENCE_TOL = 1e6; | ||
|
||
/** | ||
* @brief Setting all the LinearEigenSolverDefaults | ||
*/ | ||
const double LinearEigenSolverDefaults::ILL_COND_TOL = 1e-14; | ||
const double LinearEigenSolverDefaults::LANCZOS_EXTREME_EIGENVAL_TOL = 1e-6; | ||
|
||
} // end of namespace ksdft | ||
} // end of namespace dftefe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
/****************************************************************************** | ||
* Copyright (c) 2021. * | ||
* The Regents of the University of Michigan and DFT-EFE developers. * | ||
* * | ||
* This file is part of the DFT-EFE code. * | ||
* * | ||
* DFT-EFE is free software: you can redistribute it and/or modify * | ||
* it under the terms of the Lesser GNU General Public License as * | ||
* published by the Free Software Foundation, either version 3 of * | ||
* the License, or (at your option) any later version. * | ||
* * | ||
* DFT-EFE is distributed in the hope that it will be useful, but * | ||
* WITHOUT ANY WARRANTY; without even the implied warranty * | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * | ||
* See the Lesser GNU General Public License for more details. * | ||
* * | ||
* You should have received a copy of the GNU Lesser General Public * | ||
* License at the top level of DFT-EFE distribution. If not, see * | ||
* <https://www.gnu.org/licenses/>. * | ||
******************************************************************************/ | ||
|
||
/* | ||
* @author Avirup Sircar | ||
*/ | ||
|
||
#ifndef dftefeDFTDefaults_h | ||
#define dftefeDFTDefaults_h | ||
|
||
#include <utils/TypeConfig.h> | ||
#include <string> | ||
#include <linearAlgebra/LinearAlgebraTypes.h> | ||
|
||
namespace dftefe | ||
{ | ||
namespace ksdft | ||
{ | ||
class PoissonProblemDefaults | ||
{ | ||
public: | ||
// | ||
// The CG Preconditioner Type chosen for L2 Projection | ||
// | ||
static const linearAlgebra::PreconditionerType PC_TYPE; | ||
|
||
// | ||
// The number of batched gemms done | ||
// | ||
static const size_type MAX_CELL_TIMES_NUMVECS; | ||
|
||
// | ||
// Maximum iteration for CG | ||
// | ||
static const size_type MAX_ITER; | ||
|
||
// | ||
// Absolute tolerance of the residual |AX-b| | ||
// | ||
static const double ABSOLUTE_TOL; | ||
|
||
// | ||
// Relative tolerance of the residual |AX-b|/|b| | ||
// | ||
static const double RELATIVE_TOL; | ||
|
||
// | ||
// Maximum residual tolerance for divergence | ||
// | ||
static const double DIVERGENCE_TOL; | ||
|
||
}; // end of class PoissonProblemDefaults | ||
|
||
class LinearEigenSolverDefaults | ||
{ | ||
public: | ||
// | ||
// Tolerance of ill conditioning for the | ||
// orthogonalization step in CHFSi | ||
// | ||
static const double ILL_COND_TOL; | ||
|
||
// | ||
// Tolerance for lanczos extreme eigenvalues | ||
// | ||
static const double LANCZOS_EXTREME_EIGENVAL_TOL; | ||
|
||
}; // end of class PoissonProblemDefaults | ||
|
||
} // end of namespace ksdft | ||
} // end of namespace dftefe | ||
#endif // dftefeDFTDefaults_h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.