Skip to content

Commit

Permalink
Testing new modified version of distribute
Browse files Browse the repository at this point in the history
  • Loading branch information
phanimotamarri committed Feb 16, 2018
1 parent d689934 commit 4bda93e
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 127 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ SET(SPG_LIB "/home/vikramg/DFT-FE-softwares/softwareCentos/spglib/lib/libsymspg.
#

## set DEAL_II dir path
SET(DEAL_II_DIR "/home/vikramg/DFT-FE-softwares/softwareCentos/dealiiDev/intel_17.0.1_nopetsc_mkl_noavx")
SET(DEAL_II_DIR "/home/vikramg/DFT-FE-softwares/softwareCentos/dealiiDev/intel_17.0.1_nopetsc_mkl_noavx_bugfix")
#
# Usually, you will not need to modify anything beyond this point...
#
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ set INNER DOMAIN SIZE X = 0.0 #2*Ln1
set INNER DOMAIN SIZE Y = 0.0
set INNER DOMAIN SIZE Z = 0.0
set OUTER ATOM BALL RADIUS = 0.0
set MESH SIZE OUTER DOMAIN = 1.0 #0.5 #hn
set MESH SIZE OUTER DOMAIN = 1.3 #0.5 #hn
set MESH SIZE INNER DOMAIN = 1.0 #0.5 #hn-1
set MESH SIZE NEAR ATOM = 0.24 #0.5
set MESH SIZE NEAR ATOM = 0.12 #0.5
set MESH SIZE OUTER ATOM BALL = 1.0 #0.2 #h0

#
Expand Down Expand Up @@ -94,12 +94,12 @@ set NUMBER OF KOHN-SHAM WAVEFUNCTIONS = 10
#Approximate estimate of lower bound of the wanted spectrum
set LOWER BOUND WANTED SPECTRUM = -10.0
#Chebyshev Filter polynomial degree
set CHEBYSHEV POLYNOMIAL DEGREE = 100
set CHEBYSHEV POLYNOMIAL DEGREE = 0

#
#SCF parameters
#
set SCF CONVERGENCE MAXIMUM ITERATIONS = 1
set SCF CONVERGENCE MAXIMUM ITERATIONS = 30
set SCF CONVERGENCE TOLERANCE = 1e-11
set ANDERSON SCHEME MIXING PARAMETER = 0.1
set ANDERSON SCHEME MIXING HISTORY = 70
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ set ATOMIC COORDINATES FILE = coordinates.inp
#

#Radius of the atom-centered ball in which self-potential of the associated nuclear charge is solved
set SELF POTENTIAL ATOM BALL RADIUS = 2.8
set SELF POTENTIAL ATOM BALL RADIUS = 3.0
#Simulation domain sizes
#Values listed here are not relevant if external mesh is used for non-periodic calculations
set DOMAIN SIZE X = 7.6
Expand All @@ -43,14 +43,28 @@ set LATTICE VECTORS FILE = latticeVectors.inp
#kPoint Quadrature Rule file for sampling the Brillouin zone (used only in Periodic calculation)
#(Located in $DFT PATH/data/kPointList)
#
set kPOINT RULE FILE = GammaPoint.inp
#set kPOINT RULE FILE = GammaPoint.inp
set BZ SAMPLING POINTS ALONG X = 1
set BZ SAMPLING POINTS ALONG Y = 1
set BZ SAMPLING POINTS ALONG Z = 1
set BZ SAMPLING SHIFT ALONG X = 0.0
set BZ SAMPLING SHIFT ALONG Y = 0.0
set BZ SAMPLING SHIFT ALONG Z = 0.0
set USE GROUP SYMMETRY = false

#
#Symmetry matrix file
#
set SYMMETRY MATRIX FILE = symmetryMatrixFile.inp
set READ SYMMETRY FROM FILE = false

#
#DFT functional related parameters
#

#Pseudopotential calculation or all-electron calculation
set PSEUDOPOTENTIAL CALCULATION = true
set PSEUDOPOTENTIAL TYPE = 1

#Exhchange-correlation functional
# 1 (LDA: Perdew Zunger Ceperley Alder correlation with Slater Exchange[PRB. 23, 5048 (1981)])
Expand All @@ -68,12 +82,12 @@ set NUMBER OF KOHN-SHAM WAVEFUNCTIONS = 10
#Approximate estimate of lower bound of the wanted spectrum
set LOWER BOUND WANTED SPECTRUM = -10.0
#Chebyshev Filter polynomial degree
set CHEBYSHEV POLYNOMIAL DEGREE = 50
set CHEBYSHEV POLYNOMIAL DEGREE = 100

#
#SCF parameters
#
set SCF CONVERGENCE MAXIMUM ITERATIONS = 30
set SCF CONVERGENCE MAXIMUM ITERATIONS = 1
set SCF CONVERGENCE TOLERANCE = 1e-11
set ANDERSON SCHEME MIXING PARAMETER = 0.5
set ANDERSON SCHEME MIXING HISTORY = 70
Expand Down
2 changes: 1 addition & 1 deletion setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -e
set -o pipefail
#script to setup and build DFT-FE
#set CMAKE path
cmake=/opt/cmake/bin/cmake
#cmake=/opt/cmake/bin/cmake

#
#Usually, no changes are needed below this line
Expand Down
1 change: 1 addition & 0 deletions src/dft/density.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ void dftClass<FEOrder>::compute_rhoOut()
{
*eigenVectorsOrig[kPoint][i]=*eigenVectors[kPoint][i];
(*eigenVectorsOrig[kPoint][i]).scale(eigenPtr->massVector);
eigenVectorsOrig[kPoint][i]->update_ghost_values();
constraintsNoneEigen.distribute(*eigenVectorsOrig[kPoint][i]);
eigenVectorsOrig[kPoint][i]->update_ghost_values();
}
Expand Down
1 change: 1 addition & 0 deletions src/dft/psiInitialGuess.cc
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,7 @@ void dftClass<FEOrder>::readPSIRadialValues(){
//pcout << buffer;
eigenVectors[kPoint][i]->zero_out_ghosts();
eigenVectors[kPoint][i]->compress(VectorOperation::insert);
eigenVectors[kPoint][i]->update_ghost_values();
constraintsNoneEigen.distribute(*eigenVectors[kPoint][i]);
eigenVectors[kPoint][i]->update_ghost_values();
}
Expand Down
6 changes: 4 additions & 2 deletions src/mesh/meshMovement/meshMovement.cc
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,13 @@ void meshMovementClass::finalizeIncrementField()
if (d_isParallelMesh)
{
//d_incrementalDisplacement.compress(VectorOperation::insert);//inserts current value at owned node and sets ghosts to zero
d_constraintsMoveMesh.distribute(d_incrementalDisplacementParallel);//distribute to constrained degrees of freedom (periodic and hanging nodes)
d_incrementalDisplacementParallel.update_ghost_values();
d_incrementalDisplacementParallel.update_ghost_values();
d_constraintsMoveMesh.distribute(d_incrementalDisplacementParallel);//distribute to constrained degrees of freedom (periodic and hanging nodes)
d_incrementalDisplacementParallel.update_ghost_values();
}
else
{
d_incrementalDisplacementSerial.update_ghost_values();
d_constraintsMoveMesh.distribute(d_incrementalDisplacementSerial);
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/poisson/poisson.cc
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ void poissonClass<FEOrder>::vmult(vectorType &dst, vectorType &src) const
{

dst=0.0;
src.update_ghost_values();
dftPtr->d_constraintsVector[d_constraintMatrixId]->distribute(src);
for(types::global_dof_index i = 0; i < src.size(); ++i)
{
Expand Down Expand Up @@ -362,7 +363,7 @@ void poissonClass<FEOrder>::solve(vectorType& phi, int constraintMatrixId, std::
}
phi.update_ghost_values();
solver.solve(*this, phi, rhs, preconditioner);

phi.update_ghost_values();
dftPtr->d_constraintsVector[d_constraintMatrixId]->distribute(phi);
phi.update_ghost_values();
}
Expand Down
1 change: 1 addition & 0 deletions src/symmetry/symmetrizeRho.cc
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ void symmetryClass<FEOrder>::computeLocalrhoOut()
{
*((dftPtr->eigenVectorsOrig)[kPoint][i])=*((dftPtr->eigenVectors)[kPoint][i]);
(*((dftPtr->eigenVectorsOrig)[kPoint][i])).scale(dftPtr->eigenPtr->massVector);
((dftPtr->eigenVectorsOrig)[kPoint][i])->update_ghost_values();
(dftPtr->constraintsNoneEigen).distribute(*((dftPtr->eigenVectorsOrig)[kPoint][i]));
((dftPtr->eigenVectorsOrig)[kPoint][i])->update_ghost_values();
}
Expand Down

0 comments on commit 4bda93e

Please sign in to comment.