exasim-project / NeoFOAM

WIP Prototype of a modern CFD core
26 stars 3 forks source link

Add fields from existing memory and internal fields #145

Closed greole closed 1 day ago

greole commented 1 week ago

This PR adds a Field constructor that allows to copy construct from existing host memory data. The motivation for this PR is to simplify creating NeoFOAM fields from existing OpenFOAM data structures. Additionally it adds constructor for VolumeField which allows to construct with given data.

For a future PR we should add constructor that allow to move data in instead of copying.