Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated the Cube force routine [WIP] #51

Merged
merged 75 commits into from
Dec 11, 2023
Merged

Updated the Cube force routine [WIP] #51

merged 75 commits into from
Dec 11, 2023

Conversation

The9Cat
Copy link
Contributor

@The9Cat The9Cat commented Oct 26, 2023

Main new features:

  • Cube is updated to use Eigen::Tensor coefficients rather than flat coefficients with a proper biorthonormal basis
  • Wrote HDF5 coefficient files for Cube. There was no coefficient dump capability earlier, so I Cube has no native binary coefficient format, only HDF5.
  • UserPeriodic has been promoted to a first-rank ExternalForce type called PeriodicBC. The parameters are the same as the older UserPeriodic. The thermal boundary condition has been removed but is still available in UserPeriodic, if needed.
  • I wrote a new BiorthCube basis class in exputils that implements the basis used in Cube. This is needed for pyEXP coefficient construction and FieldGenerator visualization.
  • The Coefs interface is changed to incorporate coefficient sets with arbitrary dimensionality. This is implemented with Eigen3 maps. The base class maintains a simple array that stores the flattened coefficient set and uses Eigen maps and tensor maps to provide views of that array.
  • Although the Coefs base interface changed, most of pyEXP interface is unchanged. E.g. the coefficient manipulators for SphCoefs and CylCoefs for setting coefficients are still called setMatrix. For CubeCoefs, its setTensor. One can still use the ()operator to get the native type for the specific instance (e.g. matrices forSphCoefandCylCoefsand a tensor forCubeCoefs`).

Test so far:

  • I've checked the Nbody example which is not totally trivial because the Coefs interface changed. Specifically Sphere and Cylinder use the view mechanism for accessing coefficients. That is good, so the changes to the base classes have not broken the n-body code.
  • I tried running pyEXP and it seems to work on some old notebooks. Needs more testing.

@The9Cat
Copy link
Contributor Author

The9Cat commented Oct 27, 2023

  • Fixed typo in the pybind11 wrappers that was causing a missing symbol
  • Added some dimensioning sanity checks in deepcopy() routines
  • Some additional comments
  • Pulled in the g++-13 changes from PR Fixes for GCC-13.x and PNG configuration #50 to prevent merge confusion later on

Nothing in Cube has been tested yet.

@The9Cat
Copy link
Contributor Author

The9Cat commented Oct 29, 2023

New stuff in the last round of commits:

  • Cube force no longer applies periodic boundary conditions to the phase space
  • Cuda implementation. Updated warpReduce generally to remove deprecated synchronization idiom. Checked on the Halo example but a full check on the Nbody example would be a good idea. I'll fire it up.
  • Multistep implementation. Not sure this is really needed, but it would be easier to do it now than later.
  • Suppress computation and evaluation of the constant term
  • Implemented a simple IC generator for the cube: cubeics
  • Added a test case to EXP-examples (see PR A simple cube force test EXP-examples#6

Tests:

  • Both CPU and GPU codes run with and without the multistep.
  • I have not verified forces (or something along those lines) with a real input test. E.g. a simple thing to do would be to update date cubeics to add a wave perturbation whose coefficient value is analytic available for testing. That still needs to be done.

Martin D. Weinberg and others added 27 commits November 6, 2023 08:55
… or '3d'; 1d triggered by: 'planes', 'axes', '1d'. 1d is the default.
…t was causing an Eigen::Matrix copy to fail. Added a signature header for the Euler rotation matrix routines to simplify maintenance moving forward.
…ns of CMake

- Flipped the default for SLURM from TRUE to FALSE, breaking CTest on Unity
@The9Cat The9Cat merged commit 81337cf into main Dec 11, 2023
1 of 8 checks passed
@The9Cat
Copy link
Contributor Author

The9Cat commented Dec 11, 2023

Done for now.

@The9Cat The9Cat deleted the CubeForce branch December 11, 2023 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant