Skip to content

Commit

Permalink
Merge pull request #288 from cniethammer/fix_adaptie_parameter_in_FMM
Browse files Browse the repository at this point in the history
Fix type of _adaptive and _periodic parameters in FMM to bool
  • Loading branch information
cniethammer authored Feb 20, 2024
2 parents 49da39a + e216c40 commit 635c788
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion examples/FMM/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
<electrostatic type="FastMultipoleMethod">
<orderOfExpansions>10</orderOfExpansions>
<LJCellSubdivisionFactor>1</LJCellSubdivisionFactor>
<adaptiveContainer>0</adaptiveContainer>
<adaptiveContainer>false</adaptiveContainer>
<systemIsPeriodic>1</systemIsPeriodic>
</electrostatic>

Expand Down
8 changes: 4 additions & 4 deletions src/bhfmm/FastMultipoleMethod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,18 @@ void FastMultipoleMethod::readXML(XMLfileUnits& xmlconfig) {
Log::global_log->info() << "FastMultipoleMethod: LJCellSubdivisionFactor: " << _LJCellSubdivisionFactor << std::endl;

xmlconfig.getNodeValue("adaptiveContainer", _adaptive);
if (_adaptive == 1) {
if (_adaptive) {
Log::global_log->warning() << "FastMultipoleMethod: adaptiveContainer is not debugged yet and certainly delivers WRONG results!" << std::endl;
Log::global_log->warning() << "Unless you are in the process of debugging this container, please stop the simulation and restart with the uniform one" << std::endl;
} else {
Log::global_log->info() << "FastMultipoleMethod: UniformPseudoParticleSelected " << std::endl;
}

xmlconfig.getNodeValue("systemIsPeriodic", _periodic);
if (_periodic == 0) {
Log::global_log->warning() << "FastMultipoleMethod: periodicity is turned off!" << std::endl;
} else {
if (_periodic) {
Log::global_log->info() << "FastMultipoleMethod: Periodicity is on." << std::endl;
} else {
Log::global_log->warning() << "FastMultipoleMethod: periodicity is turned off!" << std::endl;
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/bhfmm/FastMultipoleMethod.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ class FastMultipoleMethod {
int _order;
unsigned _LJCellSubdivisionFactor;
int _wellSeparated;
int _adaptive;
int _periodic;
bool _adaptive;
bool _periodic;

PseudoParticleContainer * _pseudoParticleContainer;

Expand Down

0 comments on commit 635c788

Please sign in to comment.