Refactoring field collections, FFT engines and solvers

Authored by junge on May 16 2018, 17:15.


Refactoring field collections, FFT engines and solvers

Changes were made to:

  1. FFT engines: they are no longer templated by material dimension, but rather by the number of components. This makes it now possible to exploit strain symmetry to reduce cost of fft (not yet implemented)
  2. Projections: to handle the new FFT engine API
  3. Fields: TypedFields (i.e., fields for which the number of components is dynamic, *not* a template parameter) are no longer abstract. They can now be constructed and statically sized FieldMaps can be created from them.
  4. Raw field iterators: arbitrary chunks of memory can now be iterated over as if they were a field map.
  5. FieldProxies: TypeFields can now be in either normal or proxy mode. In proxy mode, they wrap themselves on existing memory. This convenient feature makes it possible for input arrays (e.g., from numpy arrays) to be used as Fields and used as input for methods of the Cell classes for evaluating stresses, stiffnesses etc.
  6. Cell: A non-templated root class from which all CellBase classes inherit has been created. This class has an entirely virtual interface, and can therefore be used by non-templated solvers (such as the new solvers and SolverBase descendants, or scipy solvers)
  7. solvers and descendants of SolverBase: The solution algorithms (newton_cg and de_geus) are no longer templated, greatly simplifying their writing. Also, the iterative solvers for the linear system are no longer templated neither.

This closes T1851.

Warning: this introduced many changes. Reviewers, please make sure none of functionalities you rely upn is broken by this. (And if so, please add tests to make this evident).

Test Plan: tests pass on the CI

Reviewers: pastewka, afalsafi

Reviewed By: pastewka

Subscribers: rrezakha, gallyamov, maresca, RLeute

Maniphest Tasks: T1851

Differential Revision:


jungeMay 16 2018, 17:15
jungeMay 16 2018, 17:15
Differential Revision
Restricted Differential Revision
rMUSPECTRE4a925ee40fe1: require higher version for documentation
T1851: Refactor System, FFTEngine and FieldCollection