61 val = -21.0 * pow(r - rc, 3.0) *
62 (6.0 * r * r + 3.0 * r * rc + rc * rc) /
63 (5.0 * M_PI * pow(rc, 8.0));
79 (-63.0 * pow(r - rc, 2.0) * (6.0 * r * r + 3.0 * r * rc + rc * rc) -
80 63.0 * pow(r - rc, 3.0) * (4.0 * r + rc)) /
81 (5.0 * M_PI * pow(rc, 8.0));
96 val = (9.0 * pow(r, 7.0) - 30.0 * pow(r, 6.0) * rc +
97 28.0 * pow(r, 5.0) * pow(rc, 2.0) -
98 14.0 * pow(r, 2.0) * pow(rc, 5) + 12.0 * pow(rc, 7)) /
111 val = -1.0 / pow(r, 2.0);
115 val = (63.0 * pow(r, 6.0) - 180.0 * pow(r, 5.0) * rc +
116 140.0 * pow(r, 4.0) * pow(rc, 2.0) -
117 28.0 * pow(r, 1.0) * pow(rc, 5)) /
118 (5.0 * pow(rc, 8.0));
123 inline std::vector<double>
125 const std::vector<double> &latticeVectorsFlattened,
126 const std::vector<double> &coordWithRespectToCellCorner)
128 std::vector<double> latticeVectorsDup = latticeVectorsFlattened;
129 std::vector<double> coordDup = coordWithRespectToCellCorner;
142 &latticeVectorsDup[0],
148 AssertThrow(info == 0,
150 "LU solve in finding fractional coordinates failed."));
169 dealii::BoundingBox<3>
171 const double sphereRadius);
184 const double fermiEnergy,
199 const double fermiEnergy,
212 const std::vector<double> &b,
213 std::vector<double> & crossProductVector);
224 std::vector<std::vector<double>> & domainBoundingVectors,
225 const dealii::Tensor<2, 3, double> &deformationGradient);
238 const dealii::DataOut<3> & dataOut,
239 const MPI_Comm & mpiCommParent,
240 const MPI_Comm & mpiCommDomain,
241 const MPI_Comm & interpoolcomm,
242 const MPI_Comm & interBandGroupComm,
243 const std::string &folderName,
244 const std::string &fileName);
254 const MPI_Comm & interBandGroupComm,
255 const unsigned int numBands,
256 std::vector<unsigned int> &bandGroupLowHighPlusOneIndices);
260 const MPI_Comm & interKptPoolComm,
261 const int numberIndices,
262 std::vector<int> &kptGroupLowHighPlusOneIndices);
281 Pool(
const MPI_Comm & mpi_communicator,
282 const unsigned int n_pools,
283 const int verbosity);
304 ExcNotImplementedYet,
305 "This functionality is not implemented yet or not needed to be implemented.");
MPI_Comm & get_intrapool_comm()
get the communicator associated with processor group
MPI_Comm & get_interpool_comm()
get the communicator across the processor groups
MPI_Comm interpoolcomm
Definition dftUtils.h:298
Pool(const MPI_Comm &mpi_communicator, const unsigned int n_pools, const int verbosity)
MPI_Comm intrapoolcomm
Definition dftUtils.h:299
Contains repeatedly used functions in the KSDFT calculations.
Definition CompositeData.h:29
double smearedPot(double r, double rc)
Definition dftUtils.h:87
void transformDomainBoundingVectors(std::vector< std::vector< double > > &domainBoundingVectors, const dealii::Tensor< 2, 3, double > &deformationGradient)
Applies an affine transformation to the domain bounding vectors.
double smearedPotDr(double r, double rc)
Definition dftUtils.h:106
void dgesv_(int *N, int *NRHS, double *A, int *LDA, int *IPIV, double *B, int *LDB, int *INFO)
double getPartialOccupancy(const double eigenValue, const double fermiEnergy, const double kb, const double T)
Calculates partial occupancy of the atomic orbital using Fermi-Dirac smearing.
double getCompositeGeneratorVal(const double rc, const double r, const double a0, const double power)
Calculates value of composite generator.
double smearedChargeDr(double r, double rc)
Definition dftUtils.h:69
void createBandParallelizationIndices(const MPI_Comm &interBandGroupComm, const unsigned int numBands, std::vector< unsigned int > &bandGroupLowHighPlusOneIndices)
Create index vector which is used for band parallelization.
dealii::BoundingBox< 3 > createBoundingBoxForSphere(const dealii::Point< 3 > ¢er, const double sphereRadius)
Create bounding box around a sphere.
void createKpointParallelizationIndices(const MPI_Comm &interKptPoolComm, const int numberIndices, std::vector< int > &kptGroupLowHighPlusOneIndices)
void printCurrentMemoryUsage(const MPI_Comm &mpiComm, const std::string message)
Wrapper to print current memory usage (prints only the maximum across mpiComm) using PetscMemoryGetCu...
void writeDataVTUParallelLowestPoolId(const dealii::DoFHandler< 3 > &dofHandler, const dealii::DataOut< 3 > &dataOut, const MPI_Comm &mpiCommParent, const MPI_Comm &mpiCommDomain, const MPI_Comm &interpoolcomm, const MPI_Comm &interBandGroupComm, const std::string &folderName, const std::string &fileName)
Writes to vtu file only from the lowest pool id.
double smearedCharge(double r, double rc)
Definition dftUtils.h:52
double getPartialOccupancyDer(const double eigenValue, const double fermiEnergy, const double kb, const double T)
Calculates the derivative of the partial occupancy of the atomic orbital with respect to (x=eigenvalu...
void cross_product(const std::vector< double > &a, const std::vector< double > &b, std::vector< double > &crossProductVector)
Calculates cross product of two vectors.
DeclExceptionMsg(ExcNotImplementedYet, "This functionality is not implemented yet or not needed to be implemented.")
Exception handler for not implemented functionality.
std::vector< double > getFractionalCoordinates(const std::vector< double > &latticeVectorsFlattened, const std::vector< double > &coordWithRespectToCellCorner)
Definition dftUtils.h:124
Definition pseudoPotentialToDftfeConverter.cc:34
@ LDA
Definition ExcSSDFunctionalBaseClass.h:29