diff --git a/CMakeLists.txt b/CMakeLists.txt index b227a47d6..bb76da386 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,30 +5,30 @@ ##Note: Set ALGLIB, LIBXC, PETSC and SLEPC paths below. ##set ALGLIB paths -SET(ALGLIB_INCLUDE "/nfs/mcfs_comp/home/rudraa/software/alglib/cpp/src/") #path to interpolation.h -SET(ALGLIB_LIB "/nfs/mcfs_comp/home/rudraa/software/alglib/cpp/src/libAlglib.so") #path to libAlglib.so +SET(ALGLIB_INCLUDE "/home/phanim/softwares/alglib/cpp/src/") #path to interpolation.h +SET(ALGLIB_LIB "/home/phanim/softwares/alglib/cpp/src/libAlglib.so") #path to libAlglib.so ##Note: On some platforms, you may have to set DYLD_LIBRARY_PATH(OSX)/LD_LIBRARY_PATH to include path ALGLIB_LIB. For example: ##export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/Algib/.so/file ##set LIBXC paths -SET(LIBXC_INCLUDE "/nfs/mcfs_comp/home/rudraa/software/libxc/libxc-2.2.0/installDir/include") #path to xc.h -SET(LIBXC_LIB "/nfs/mcfs_comp/home/rudraa/software/libxc/libxc-2.2.0/installDir/lib/libxc.a") #path to libxc.a +SET(LIBXC_INCLUDE "/home/phanim/softwares/libxc/install_caen_libxc/include") #path to xc.h +SET(LIBXC_LIB "/home/phanim/softwares/libxc/install_caen_libxc/lib/libxc.a") #path to libxc.a ##set PETSc Real paths -SET(PETSC_REAL_INCLUDE "/home/vikramg/DFT-FE-softwares/softwareCentos/petsc/intel_petsc3.7.5_double_elemental/include") -SET(PETSC_REAL_LIB "/home/vikramg/DFT-FE-softwares/softwareCentos/petsc/intel_petsc3.7.5_double_elemental/lib/libpetsc.so") +SET(PETSC_REAL_INCLUDE "/home/phanim/softwares/PETSc/install_caen_double/include") +SET(PETSC_REAL_LIB "/home/phanim/softwares/PETSc/install_caen_double/lib/libpetsc.so") ##set SLEPc Real paths -SET(SLEPC_REAL_INCLUDE "/home/vikramg/DFT-FE-softwares/softwareCentos/slepc/intel_slepc3.7.3_double_elemental/include") -SET(SLEPC_REAL_LIB "/home/vikramg/DFT-FE-softwares/softwareCentos/slepc/intel_slepc3.7.3_double_elemental/lib/libslepc.so") +SET(SLEPC_REAL_INCLUDE "/home/phanim/softwares/SLEPc/install_caen_double/include") +SET(SLEPC_REAL_LIB "/home/phanim/softwares/SLEPc/install_caen_double/lib/libslepc.so") ##set PETSc Complex paths -SET(PETSC_COMPLEX_INCLUDE "/home/vikramg/DFT-FE-softwares/softwareCentos/petsc/intel_petsc3.7.5_complex/include") -SET(PETSC_COMPLEX_LIB "/home/vikramg/DFT-FE-softwares/softwareCentos/petsc/intel_petsc3.7.5_complex/lib/libpetsc.so") +SET(PETSC_COMPLEX_INCLUDE "/home/phanim/softwares/PETSc/install_caen_complex/include") +SET(PETSC_COMPLEX_LIB "/home/phanim/softwares/PETSc/install_caen_complex/lib/libpetsc.so") ##set SLEPc Complex paths -SET(SLEPC_COMPLEX_INCLUDE "/home/vikramg/DFT-FE-softwares/softwareCentos/slepc/intel_slepc3.7.3_complex/include") -SET(SLEPC_COMPLEX_LIB "/home/vikramg/DFT-FE-softwares/softwareCentos/slepc/intel_slepc3.7.3_complex/lib/libslepc.so") +SET(SLEPC_COMPLEX_INCLUDE "/home/phanim/softwares/SLEPc/install_caen_complex/include") +SET(SLEPC_COMPLEX_LIB "/home/phanim/softwares/SLEPc/install_caen_complex/lib/libslepc.so") # # Usually, you will not need to modify anything beyond this point... diff --git a/examples/allElectron/nonPeriodic/carbonSingleAtom/parameterFile.prm b/examples/allElectron/nonPeriodic/carbonSingleAtom/parameterFile.prm index 1e5e86ab7..a6089061a 100644 --- a/examples/allElectron/nonPeriodic/carbonSingleAtom/parameterFile.prm +++ b/examples/allElectron/nonPeriodic/carbonSingleAtom/parameterFile.prm @@ -1,6 +1,6 @@ #path specifying the location of the "build" directory which is usually the location of "src" folder # -set DFT PATH = "/home/phanim/KohnShamCodes/DEALIICode/dft-fe" +set DFT PATH = "/home/phanim/DFT-FE/dft-fe" # #finite-element related parameters diff --git a/include/headers.h b/include/headers.h index 38f65519d..dfd1539e3 100644 --- a/include/headers.h +++ b/include/headers.h @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include diff --git a/setup.sh b/setup.sh index 970dd6557..379788938 100755 --- a/setup.sh +++ b/setup.sh @@ -3,7 +3,7 @@ set -e set -o pipefail #script to setup and build DFT-FE #set CMAKE path -cmake=/sw/arcts/centos7/cmake/3.5.2/bin/cmake +cmake=/usr/bin/cmake # #Usually, no changes are needed below this line # diff --git a/src/dft/initPseudo.cc b/src/dft/initPseudo.cc index 7803b9de8..402df99f8 100644 --- a/src/dft/initPseudo.cc +++ b/src/dft/initPseudo.cc @@ -141,7 +141,7 @@ void dftClass::initLocalPseudoPotential() double *pseudoValuesPtr = &((*pseudoValues)[cell->id()][0]); for (unsigned int q = 0; q < n_q_points; ++q) { - MappingQ<3> test(1); + MappingQ1<3,3> test; Point<3> quadPoint(test.transform_unit_to_real_cell(cell, fe_values.get_quadrature().point(q))); double pseudoValueAtQuadPt=0.0; //loop over atoms @@ -782,7 +782,7 @@ void dftClass::computeSparseStructureNonLocalProjectors() const int globalSplineId = d_deltaVlIdToFunctionIdDetails[pseudoPotentialId][0]; for(int iQuadPoint = 0; iQuadPoint < numberQuadraturePoints; ++iQuadPoint) { - MappingQ<3> test(1); + MappingQ1<3,3> test; Point<3> quadPoint(test.transform_unit_to_real_cell(cell, fe_values.get_quadrature().point(iQuadPoint))); for(int iImageAtomCount = 0; iImageAtomCount < imageIdsList.size(); ++iImageAtomCount) @@ -1003,7 +1003,7 @@ void dftClass::computeElementalProjectorKets() for(int iQuadPoint = 0; iQuadPoint < numberQuadraturePoints; ++iQuadPoint) { - MappingQ<3> test(1); + MappingQ1<3,3> test; Point<3> quadPoint(test.transform_unit_to_real_cell(cell, fe_values.get_quadrature().point(iQuadPoint))); for(int iImageAtomCount = 0; iImageAtomCount < imageIdsList.size(); ++iImageAtomCount) diff --git a/src/dft/initRho.cc b/src/dft/initRho.cc index b8640e85b..5c0267708 100644 --- a/src/dft/initRho.cc +++ b/src/dft/initRho.cc @@ -69,7 +69,7 @@ void dftClass::initRho() double *rhoInValuesPtr = &((*rhoInValues)[cell->id()][0]); for (unsigned int q = 0; q < n_q_points; ++q) { - MappingQ<3> test(1); + MappingQ1<3,3> test; Point<3> quadPoint(test.transform_unit_to_real_cell(cell, fe_values.get_quadrature().point(q))); double rhoValueAtQuadPt = 0.0; @@ -130,7 +130,7 @@ void dftClass::initRho() for (unsigned int q = 0; q < n_q_points; ++q) { - MappingQ<3> test(1); + MappingQ1<3,3> test; Point<3> quadPoint(test.transform_unit_to_real_cell(cell, fe_values.get_quadrature().point(q))); double gradRhoXValueAtQuadPt = 0.0; double gradRhoYValueAtQuadPt = 0.0; diff --git a/src/poisson/poisson.cc b/src/poisson/poisson.cc index 0573cd338..32055168e 100644 --- a/src/poisson/poisson.cc +++ b/src/poisson/poisson.cc @@ -115,6 +115,7 @@ void poissonClass::computeRHS2() } rhs2.compress(VectorOperation::add); jacobianDiagonal.compress(VectorOperation::add); + //remove zero entries of the jacobianDiagonal which occur at the hanging nodes for (unsigned int i=0; i::computeRHS2() { jacobianDiagonal.local_element(i)=1.0; } + else + { + jacobianDiagonal.local_element(i) = 1.0/jacobianDiagonal.local_element(i); + } } jacobianDiagonal.update_ghost_values(); //pcout << "rhs2: " << rhs2.l2_norm() << std::endl; @@ -233,7 +238,7 @@ void poissonClass::computeRHS(std::mapis_identity_constrained(i)) { if(rhoValues) rhs(i)=0.0; - else rhs(i)=constraintMatrix->get_inhomogeneity(i)*jacobianDiagonal(i); + else rhs(i)=constraintMatrix->get_inhomogeneity(i)/jacobianDiagonal(i); } } } @@ -346,7 +351,8 @@ void poissonClass::vmult(vectorType &dst, const vectorType &src) const template void poissonClass::precondition_Jacobi(vectorType& dst, const vectorType& src, const double omega) const { - dst.ratio(src, jacobianDiagonal); + dst = src; + dst.scale(jacobianDiagonal); } //