This pull request tidies up the last few details of the thin film feature, and amends/adds a few command file commands. The edits that pertain to the thin film feature are:
Renamed hasExternalField to hasExternalFields
Added Iterator::maskPhi() method
Removed the FieldCPU typedef from the pspc iterator hierarchy. Replaced with explicit use of DArray
maskField renamed to maskBasis
Iterator::hasExternalFields and Iterator::hasMask are no longer virtual; that was unnecessary
Improved text wrapping in comments to keep everything within ~75 characters
Iterator::externalField(s) and iterator::maskBasis check first that the system actually has external fields / mask
Fixed bug that was causing a crash when walls are asymmetric (needed to reset the counter variable on line 378 of FilmIteratorBase.tpp)
Check that space group is compatible each time we update the wall fields (each time we call solve())
Fixed FilmIteratorTest unit tests so that they compile along with everything else from the pspc/tests directory, and so they are compatible with the current code. All unit tests pass on both Mac and Linux (MSI).
The other edits are:
Removed the WRITE_DATA command as a command file option, replaced with WRITE_PARAM and WRITE_THERMO. WRITE_PARAM writes the full param file for the current system to a specified filename, omitting the Sweep block (just like the .out files in the Fortran code). WRITE_THERMO writes fHelmholtz, pressure, and phi/mu for each species to a specified filename. If the specified filename given to WRITE_THERMO points to a file that already exists, the thermodynamic data will be appended to the end of the existing file rather than overwriting it, allowing the user to direct WRITE_PARAM and WRITE_THERMO to the same file if desired, creating a single summary file.
Note: in order for WRITE_PARAM to be able to write the param file while omitting the Sweep block, I had to create a System::writeParam method that overwrites the default behavior (since the default behavior would write the Sweep block). This was added and tested in fd1d, pspc, and pspg.
Added KGRID_TO_BASIS and BASIS_TO_KGRID commands. Also, added round-trips for k-grid/r-grid and k-grid/basis conversions to the pspc System unit tests.
Added a brief mention of OUTPUT_WAVES and OUTPUT_STARS to the pspc command file documentation. We might want to describe in greater detail the contents and structure of these wave/star files somewhere in the documentation?
Added documentation describing how to set up the proper environment in a zsh terminal (Kexin was having trouble with this and it reminded me that we don't have documentation describing this nuance).
Edited the k-grid file format documentation to reflect the correct loop structure (the last index is the one that is halved, not the first index).
Renamed tmpFields to tmpFieldsBasis in pspc/System
The main outstanding issue for the thin film feature is that there is still no well-defined convention for the definition of phi in mixed ensembles. If we move maskPhi() from Iterator to Mixture, this may be able to resolve this problem. I will work on this when I get back. Eventually, I will also add the thin film feature to the GPU code.
This pull request tidies up the last few details of the thin film feature, and amends/adds a few command file commands. The edits that pertain to the thin film feature are:
The other edits are:
The main outstanding issue for the thin film feature is that there is still no well-defined convention for the definition of phi in mixed ensembles. If we move maskPhi() from Iterator to Mixture, this may be able to resolve this problem. I will work on this when I get back. Eventually, I will also add the thin film feature to the GPU code.