Skip to content

Commit

Permalink
made changes corresponding to moving update_ghost_values inside distr…
Browse files Browse the repository at this point in the history
…ibute in forked dealii
  • Loading branch information
dsambit committed Mar 23, 2018
1 parent cec55f4 commit 3b4ae4c
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ set -e
set -o pipefail
#script to setup and build DFT-FE
#Provide paths for external libraries and optimization flag (0 for Debug, 1 for Release)
dealiiPetscRealDir="/home/vikramg/DFT-FE-softwares/softwareCentos/dealiiDev/intel_18.0.1_petscReal_noavx_64bit_thread"
dealiiPetscComplexDir="/home/vikramg/DFT-FE-softwares/softwareCentos/dealiiDev/intel_18.0.1_petscComplex_noavx_64bit_thread"
dealiiPetscRealDir="/home/vikramg/DFT-FE-softwares/softwareCentos/dealiiDev/intel_18.0.1_petscReal_noavx_64bit_thread_opt2"
dealiiPetscComplexDir="/home/vikramg/DFT-FE-softwares/softwareCentos/dealiiDev/intel_18.0.1_petscComplex_noavx_64bit_thread_opt2"
alglibDir="/nfs/mcfs_comp/home/rudraa/software/alglib/cpp/src"
libxcDir="/home/vikramg/DFT-FE-softwares/softwareCentos/libxcNew/install_intel18"
spglibDir="/home/vikramg/DFT-FE-softwares/softwareCentos/spglib"
optimizedMode=1
optimizedMode=0
#
#Usually, no changes are needed below this line
#
Expand Down
4 changes: 2 additions & 2 deletions src/dft/solveVself.cc
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ void dftClass<FEOrder>::solveVself()
}

poissonPtr->vselfBinScratch.compress(VectorOperation::insert);
poissonPtr->vselfBinScratch.update_ghost_values();
//poissonPtr->vselfBinScratch.update_ghost_values();
d_constraintsVector[constraintMatrixId]->distribute(poissonPtr->vselfBinScratch);
//
//call the poisson solver to compute vSelf in each bin
Expand Down Expand Up @@ -196,7 +196,7 @@ void dftClass<FEOrder>::solveVself()
}//bin loop

poissonPtr->phiExt.compress(VectorOperation::insert);
poissonPtr->phiExt.update_ghost_values();
//poissonPtr->phiExt.update_ghost_values();
d_constraintsVector[phiExtDofHandlerIndex]->distribute(poissonPtr->phiExt);
poissonPtr->phiExt.update_ghost_values();
//
Expand Down
2 changes: 1 addition & 1 deletion src/eigen/eigen.cc
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ void eigenClass<FEOrder>::HX(std::vector<vectorType> &src,
for (unsigned int i = 0; i < src.size(); i++)
{
src[i].scale(invSqrtMassVector); //M^{-1/2}*X
src[i].update_ghost_values();
//src[i].update_ghost_values();
//dftPtr->constraintsNoneEigen.distribute(*(dftPtr->tempPSI2[i]));
dftPtr->constraintsNoneEigenDataInfo.distribute(src[i]);
src[i].update_ghost_values();
Expand Down
4 changes: 2 additions & 2 deletions src/force/force.cc
Original file line number Diff line number Diff line change
Expand Up @@ -183,12 +183,12 @@ template<unsigned int FEOrder>
void forceClass<FEOrder>::configForceLinFEFinalize()
{
d_configForceVectorLinFE.compress(VectorOperation::add);//copies the ghost element cache to the owning element
d_configForceVectorLinFE.update_ghost_values();
//d_configForceVectorLinFE.update_ghost_values();
d_constraintsNoneForce.distribute(d_configForceVectorLinFE);//distribute to constrained degrees of freedom (for example periodic)
d_configForceVectorLinFE.update_ghost_values();
#ifdef ENABLE_PERIODIC_BC
d_configForceVectorLinFEKPoints.compress(VectorOperation::add);//copies the ghost element cache to the owning element
d_configForceVectorLinFEKPoints.update_ghost_values();
//d_configForceVectorLinFEKPoints.update_ghost_values();
d_constraintsNoneForce.distribute(d_configForceVectorLinFEKPoints);//distribute to constrained degrees of freedom (for example periodic)
d_configForceVectorLinFEKPoints.update_ghost_values();
#endif
Expand Down
2 changes: 1 addition & 1 deletion src/mesh/meshMovement/meshMovement.cc
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ void meshMovementClass::finalizeIncrementField()
if (d_isParallelMesh)
{
//d_incrementalDisplacement.compress(VectorOperation::insert);//inserts current value at owned node and sets ghosts to zero
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();
}
Expand Down
4 changes: 2 additions & 2 deletions src/poisson/poisson.cc
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ void poissonClass<FEOrder>::vmult(vectorType &dst, vectorType &src) const
{

dst=0.0;
src.update_ghost_values();
//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 @@ -363,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();
//phi.update_ghost_values();
dftPtr->d_constraintsVector[d_constraintMatrixId]->distribute(phi);
phi.update_ghost_values();
}
Expand Down

0 comments on commit 3b4ae4c

Please sign in to comment.