Skip to content

Commit

Permalink
added a function to check sanity of input parameters and print the pa…
Browse files Browse the repository at this point in the history
…ramaters for verbosity>=1
  • Loading branch information
dsambit committed Apr 5, 2018
1 parent 460deae commit 32dd3c6
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
5 changes: 5 additions & 0 deletions include/dftParameters.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ namespace dftfe {
*/
void parse_parameters(dealii::ParameterHandler &prm);

/**
* Check and print parameters
*/
void check_print_parameters(const dealii::ParameterHandler &prm);

};

}
Expand Down
2 changes: 1 addition & 1 deletion setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ dealiiPetscComplexDir="/home/vikramg/DFT-FE-softwares/softwareCentos/dealiiDev/i
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=0
optimizedMode=1
#
#Usually, no changes are needed below this line
#
Expand Down
12 changes: 11 additions & 1 deletion utils/dftParameters.cc
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,16 @@ namespace dftParameters
}
prm.leave_subsection ();

check_print_parameters(prm);
}


void check_print_parameters(const dealii::ParameterHandler &prm)
{
if (Utilities::MPI::this_mpi_process(MPI_COMM_WORLD)== 0 && dftParameters::verbosity>=1)
{
prm.print_parameters (std::cout, ParameterHandler::Text);
}

const bool printParametersToFile=false;
if (printParametersToFile)
Expand All @@ -425,7 +435,7 @@ namespace dftParameters
AssertThrow(dftParameters::periodicX || dftParameters::periodicY || dftParameters::periodicZ,ExcMessage("Incorrect executable: periodic executable being used for non-periodic problem."));
#else
AssertThrow(!(dftParameters::periodicX || dftParameters::periodicY || dftParameters::periodicZ),ExcMessage("Incorrect executable: non-periodic executable being used for periodic problem."));
#endif
#endif
}

}
Expand Down

0 comments on commit 32dd3c6

Please sign in to comment.