-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #339 from ls1mardyn/reflective-boundaries
Reflecting boundaries
- Loading branch information
Showing
33 changed files
with
1,330 additions
and
208 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ build*/ | |
.idea/ | ||
.project | ||
.settings | ||
.vscode | ||
|
||
# Generated documentation | ||
doxygen_doc/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,15 @@ | ||
option(MAMICO_COUPLING "Couple with MaMiCo" OFF) | ||
if (MAMICO_COUPLING) | ||
message(STATUS "MaMiCo coupling enabled. ls1 mardyn will compile as library. No executable will be created.") | ||
set(MAMICO_COMPILE_DEFINITIONS MAMICO_COUPLING MDDim3) | ||
option(MAMICO_ENABLE_FPIC "Enable -fPIC flag for MaMiCo python bindings" OFF) | ||
set(MAMICO_SRC_DIR CACHE PATH "Root directory of the MaMiCo codebase") | ||
message(STATUS "MaMiCo coupling enabled. ls1 mardyn will compile as library. No executable will be created.") | ||
set(MAMICO_COMPILE_DEFINITIONS MAMICO_COUPLING MDDim3) | ||
option(MAMICO_ENABLE_FPIC "Enable -fPIC flag for MaMiCo python bindings" OFF) | ||
set(MAMICO_SRC_DIR CACHE PATH "Root directory of the MaMiCo codebase") | ||
if(NOT MAMICO_SRC_DIR) | ||
message(FATAL_ERROR "MaMiCo source directory not specified.") | ||
endif() | ||
if(ENABLE_MPI) | ||
set(MAMICO_MPI_DEFINITIONS MDCoupledParallel TarchParallel) | ||
endif() | ||
if(MAMICO_ENABLE_FPIC) | ||
set(MAMICO_COMPILE_OPTIONS "${MAMICO_COMPILE_OPTIONS} -fPIC") | ||
endif() | ||
message(FATAL_ERROR "MaMiCo source directory not specified.") | ||
endif() | ||
if(ENABLE_MPI) | ||
set(MAMICO_MPI_DEFINITIONS MDCoupledParallel TarchParallel) | ||
endif() | ||
else() | ||
message(STATUS "MaMiCo coupling disabled.") | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<mardyn version="20100525"> | ||
<refunits type="SI"> | ||
<length unit="nm">0.34</length> | ||
<mass unit="u">39.948</mass> | ||
<energy unit="K">120</energy> | ||
</refunits> | ||
<simulation type="MD"> | ||
<integrator type="Leapfrog"> | ||
<timestep unit="reduced">0.005</timestep> | ||
</integrator> | ||
<run> | ||
<currenttime>0</currenttime> | ||
<equilibration><steps>0</steps></equilibration> | ||
<production> | ||
<steps>800</steps> | ||
</production> | ||
</run> | ||
<ensemble type="NVT"> | ||
<temperature unit="reduced">1.1</temperature> | ||
<domain type="box"> | ||
<lx>10</lx> | ||
<ly>10</ly> | ||
<lz>10</lz> | ||
</domain> | ||
<components> | ||
<moleculetype id="1" name="Arbitrary"> | ||
<site type="LJ126" id="1" > | ||
<coords> <x>0.0</x> <y>0.0</y> <z>0.0</z> </coords> | ||
<mass>1.0</mass> | ||
<sigma>1.0</sigma> | ||
<epsilon>1.0</epsilon> | ||
<shifted>true</shifted> | ||
</site> | ||
</moleculetype> | ||
</components> | ||
<phasespacepoint> | ||
<file type="ASCII">simple_checkpoint.inp</file> | ||
</phasespacepoint> | ||
</ensemble> | ||
<algorithm> | ||
<parallelisation type="DomainDecomposition"> | ||
<!--<updateFrequency> 10000 </updateFrequency> | ||
<loadBalancer type="none"> | ||
</loadBalancer>--> | ||
<!--<MPIGridDims> <x>2</x><y>2</y> <z>2</z> </MPIGridDims>--> | ||
<boundaries> <x>reflective</x><y>outflow</y><z>reflective</z> </boundaries> | ||
</parallelisation> | ||
<datastructure type="AutoPas"> | ||
</datastructure> | ||
<cutoffs type="CenterOfMass"> | ||
<radiusLJ unit="reduced">2.2</radiusLJ> | ||
</cutoffs> | ||
<electrostatic type="ReactionField"> | ||
<epsilon>1.0e+10</epsilon> | ||
</electrostatic> | ||
</algorithm> | ||
<output> | ||
<outputplugin name="VTKMoleculeWriter"> | ||
<outputprefix>vtkOutput</outputprefix> | ||
<writefrequency>1</writefrequency> | ||
</ouputplugin> | ||
<outputplugin name="Adios2Writer"> | ||
<outputfile>particles.bp</outputfile> | ||
<adios2enginetype>BP4</adios2enginetype> | ||
<writefrequency>1</writefrequency> | ||
</outputplugin> | ||
<!--<outputplugin name="CheckpointWriter"> | ||
<type>ASCII</type> | ||
<writefrequency>1</writefrequency> | ||
<outputprefix>cp_binary</outputprefix> | ||
</outputplugin>--> | ||
</output> | ||
</simulation> | ||
</mardyn> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
mardyn trunk 20120726 | ||
currentTime 0 | ||
Length 10 10 10 | ||
Temperature 1.1 | ||
NumberOfComponents 1 | ||
1 0 0 0 0 | ||
0 0 0 1 1 1 0 | ||
0 0 0 | ||
1e+10 | ||
NumberOfMolecules 10 | ||
MoleculeFormat IRV | ||
0 7.5 5 5 -3 0 0 | ||
1 2.5 5 5 0 0 0 | ||
2 2.5 7.5 5 0 0 0 | ||
3 2.5 2.5 5 0 0 0 | ||
4 2.5 5 2.5 0 0 0 | ||
5 2.5 5 7.5 0 0 0 | ||
6 2.5 7.5 7.5 0 0 0 | ||
7 2.5 7.5 2.5 0 0 0 | ||
8 2.5 2.5 7.5 0 0 0.69 | ||
9 2.5 2.5 2.5 0 -1.1 -1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -142,9 +142,9 @@ double Domain::getGlobalPressure() | |
return globalTemperature * _globalRho + _globalRho * getAverageGlobalVirial()/3.; | ||
} | ||
|
||
double Domain::getAverageGlobalVirial() { return _globalVirial/_globalNumMolecules; } | ||
double Domain::getAverageGlobalVirial() const { return _globalVirial/_globalNumMolecules; } | ||
|
||
double Domain::getAverageGlobalUpot() { return getGlobalUpot()/_globalNumMolecules; } | ||
double Domain::getAverageGlobalUpot() const { return getGlobalUpot()/_globalNumMolecules; } | ||
double Domain::getGlobalUpot() const { return _globalUpot; } | ||
|
||
Comp2Param& Domain::getComp2Params(){ | ||
|
@@ -786,9 +786,9 @@ void Domain::updateMaxMoleculeID(ParticleContainer* particleContainer, DomainDec | |
#endif | ||
} | ||
|
||
double Domain::getglobalRho(){ return _globalRho;} | ||
double Domain::getglobalRho() const { return _globalRho;} | ||
|
||
void Domain::setglobalRho(double grho){ _globalRho = grho;} | ||
void Domain::setglobalRho(double grho) { _globalRho = grho;} | ||
|
||
unsigned long Domain::getglobalRotDOF() | ||
{ | ||
|
@@ -827,10 +827,10 @@ double Domain::cv() | |
|
||
//! methods implemented by Stefan Becker <[email protected]> | ||
// the following two methods are used by the MmspdWriter (writing the output file in a format used by MegaMol) | ||
double Domain::getSigma(unsigned cid, unsigned nthSigma){ | ||
double Domain::getSigma(unsigned cid, unsigned nthSigma) const { | ||
return _simulation.getEnsemble()->getComponent(cid)->getSigma(nthSigma); | ||
} | ||
unsigned Domain::getNumberOfComponents(){ | ||
unsigned Domain::getNumberOfComponents() const { | ||
return _simulation.getEnsemble()->getComponents()->size(); | ||
} | ||
|
||
|
@@ -858,10 +858,10 @@ void Domain::submitDU(unsigned /*cid*/, double DU, double* r) | |
|
||
void Domain::setLocalUpotCompSpecific(double UpotCspec){_localUpotCspecif = UpotCspec;} | ||
|
||
double Domain::getLocalUpotCompSpecific(){return _localUpotCspecif;} | ||
double Domain::getLocalUpotCompSpecific() const {return _localUpotCspecif;} | ||
|
||
|
||
double Domain::getAverageGlobalUpotCSpec() { | ||
double Domain::getAverageGlobalUpotCSpec() const { | ||
Log::global_log->debug() << "number of fluid molecules = " << getNumFluidMolecules() << "\n"; | ||
return _globalUpotCspecif / getNumFluidMolecules(); | ||
} | ||
|
@@ -871,7 +871,7 @@ void Domain::setNumFluidComponents(unsigned nc){_numFluidComponent = nc;} | |
|
||
unsigned Domain::getNumFluidComponents(){return _numFluidComponent;} | ||
|
||
unsigned long Domain::getNumFluidMolecules(){ | ||
unsigned long Domain::getNumFluidMolecules() const { | ||
unsigned long numFluidMolecules = 0; | ||
for(unsigned i = 0; i < _numFluidComponent; i++){ | ||
Component& ci=*(global_simulation->getEnsemble()->getComponent(i)); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -140,7 +140,7 @@ class Domain { | |
unsigned getNumFluidComponents(); | ||
|
||
//! @brief get the fluid and fluid-solid potential of the local process | ||
double getLocalUpotCompSpecific(); | ||
double getLocalUpotCompSpecific() const; | ||
|
||
//! @brief set the virial of the local process | ||
void setLocalVirial(double Virial); | ||
|
@@ -214,28 +214,30 @@ class Domain { | |
//! | ||
//! Before this method is called, it has to be sure that the | ||
//! global potential has been calculated (method calculateGlobalValues) | ||
double getAverageGlobalUpot(); | ||
double getAverageGlobalUpot() const; | ||
double getGlobalUpot() const; | ||
|
||
//! by Stefan Becker: return the average global potential of the fluid-fluid and fluid-solid interaction (but NOT solid-solid interaction) | ||
double getAverageGlobalUpotCSpec(); | ||
double getAverageGlobalUpotCSpec() const; | ||
|
||
//! @brief get the global kinetic energy | ||
//! | ||
//! Before this method is called, it has to be sure that the | ||
//! global energies has been calculated (method calculateGlobalValues) | ||
double getGlobalUkinTrans() { return 0.5*_globalsummv2; } | ||
double getGlobalUkinRot() { return 0.5*_globalsumIw2; } | ||
//! Before this method is called, the user has to be sure that the | ||
//! global energy (rot and trans) has been calculated via calculateGlobalValues() | ||
//! Since variables _globalsummv2 and _globalsumIw2 store the sum of m_i*(v_i^2). | ||
//! Therefore, the constant factor 0.5 has to be applied to yield the kinetic energies | ||
double getGlobalUkinTrans() const { return 0.5*_globalsummv2; } | ||
double getGlobalUkinRot() const { return 0.5*_globalsumIw2; } | ||
|
||
//! by Stefan Becker: determine and return the totel number of fluid molecules | ||
//! this method assumes all molecules with a component-ID less than _numFluidComponent to be fluid molecules | ||
unsigned long getNumFluidMolecules(); | ||
unsigned long getNumFluidMolecules() const; | ||
|
||
//! @brief get the global average virial per particle | ||
//! | ||
//! Before this method is called, it has to be sure that the | ||
//! global virial has been calculated (method calculateGlobalValues) | ||
double getAverageGlobalVirial(); | ||
double getAverageGlobalVirial() const; | ||
|
||
//! @brief sets _localSummv2 to the given value | ||
void setLocalSummv2(double summv2, int thermostat); | ||
|
@@ -250,7 +252,7 @@ class Domain { | |
} | ||
|
||
//! @brief get globalRho | ||
double getglobalRho(); | ||
double getglobalRho() const; | ||
|
||
//! @brief set globalRho | ||
void setglobalRho(double grho); | ||
|
@@ -386,9 +388,9 @@ class Domain { | |
// by Stefan Becker <[email protected]> | ||
/* method returning the sigma parameter of a component | ||
=> needed in the output of the MmspdWriter (specifying the particles' radii in a movie) */ | ||
double getSigma(unsigned cid, unsigned nthSigma); | ||
double getSigma(unsigned cid, unsigned nthSigma) const; | ||
// needed for the MmspdWriter (MegaMol) | ||
unsigned getNumberOfComponents(); | ||
unsigned getNumberOfComponents() const; | ||
|
||
void setUpotCorr(double upotcorr){ _UpotCorr = upotcorr; } | ||
void setVirialCorr(double virialcorr){ _VirialCorr = virialcorr; } | ||
|
Oops, something went wrong.