dmorse / pscfpp

Polymer Self-Consistent Field Theory (C++/CUDA version)
https://pscf-home.cems.umn.edu
GNU General Public License v3.0
25 stars 20 forks source link

Adding "EXPAND_W_RGRID" and "REPLICATE_UNIT_CELL" command #163

Closed chen7545 closed 5 months ago

dmorse commented 5 months ago

Kexin - I accepted the pull request into feature-pull, and pushed back the revised version, but there are a few problems I'd like you to check and fix in a separate pull request:

1) When I tried to run the pspc unit tests, I got a failure because of a mismatch in the signature of the function FieldIo::writeFieldsRGrid, which I suspect you may have changed.

2) The signature of that function, FieldIo::writeFieldsRGrid now takes a IntVec& meshDimensions argument that seems to be unnecessary. The second argument is of type DArray< RField > and each RField object has a member that stores its mesh dimensions. It might make sense to check that all of the fields in the array have the same dimensions, but there shouldn't be any reason to pass in the mesh dimensions separately from the fields - they already contain that information. The meshDimensions could be converted to a local variable that is copied from the meshDimensions of first field (index 0).

Please change accordingly in a separate pull request.