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

Advection diffusion - DO NOT MERGE #788

Draft
wants to merge 107 commits into
base: main
Choose a base branch
from

Conversation

uschille
Copy link
Member

@uschille uschille commented Aug 7, 2022

DO NOT MERGE THIS PR! There are several hard-coded changes to constants etc. in this branch that will break regression tests.

Development rebased onto a17372c.

.. 8d7cdc4

  • changes to PropertyWriter etc. to allow different data sources (i.e. lattice instances) for property output

.. d69f011

  • skeleton for advection diffusion model - adds a second hemelb::lb::LBM<latticeType>* for the ADE lattice

eb23e52 .. "All hope abandon ye who enter here.”

  • from here on, the LB routines have essentially been copied to extra files for ADE; there is a lot of room for refactoring here to avoid code duplication (i.e., most of the LB kernel routines are the same, so the ADE lattice should be an instance of a derived class or perhaps even the same class as the NS lattice).

  • imho the best starting point would be to comb through lb/ADELB.h and lb/ADELB.hpp and refactor to reuse the existing methods of hemelb::lb:LBM<latticeType> as much as possible

  • perhaps start at d69f011 and cherry-pick from the remainder of the branch (although I tend to think that a rewrite with some copy&paste may be faster)

uschille and others added 30 commits October 2, 2020 15:55
NOTE: At the moment, it is not possible to have different data sources for the same output file. This requires some more changes in the Write() methods. In principle, each hemelb::extraction::OutputField should have its own dataSource and OutputField should be virtual class. Each specific output can then be derived from OutputField and implement the proper Write() methods. This would eliminate the need for all that switch-case shenanigans.

This is a not so elegant but unavoidable workaround for the lack of abstraction in the PropertyWriter. Essentially, we introduce a std::map<OutputField::FieldType, IterableDataSource*>& that is passed through to hemelb::extraction::LocalPropertyOutput where the constructor initialises the dataSource according to the map. In principle, this information should be encapsulated in hemelb::extraction::PropertyOutputFile (which should really be called PropertyOutputDescriptor), however, during initialisation of PropertyOutputFile the propertyCaches are yet uniinitalised. Ultimately, the whole simulation master should be re-designed to have a proper distinction between allocation and initialisation.
…ceMap than a single dataSource. This is still not fully general, as the size and position will always be determine from the first data source.
…tionDiffusionDataManager, advectionDiffusionModel.
NOTE: At the moment, it is not possible to have different data sources for the same output file. This requires some more changes in the Write() methods. In principle, each hemelb::extraction::OutputField should have its own dataSource and OutputField should be virtual class. Each specific output can then be derived from OutputField and implement the proper Write() methods. This would eliminate the need for all that switch-case shenanigans.

This is a not so elegant but unavoidable workaround for the lack of abstraction in the PropertyWriter. Essentially, we introduce a std::map<OutputField::FieldType, IterableDataSource*>& that is passed through to hemelb::extraction::LocalPropertyOutput where the constructor initialises the dataSource according to the map. In principle, this information should be encapsulated in hemelb::extraction::PropertyOutputFile (which should really be called PropertyOutputDescriptor), however, during initialisation of PropertyOutputFile the propertyCaches are yet uniinitalised. Ultimately, the whole simulation master should be re-designed to have a proper distinction between allocation and initialisation.
the newly introduced map between OutputField::FieldType and IteratedDataSource.
This should be made a cmake option at some point.
* GeometryReader will now store all links read in the GeometrySite object.
* LatticeData will do the mapping to the links of the actual DnQm model used.
This change allows to instantiate separate LatticeData objects that use different DnQm lattices. This should resolve hemelb-codes#706.
@uschille uschille changed the title Advection diffusion DO NOT MERGE Advection diffusion Aug 7, 2022
@uschille uschille changed the title DO NOT MERGE Advection diffusion Advection diffusion - DO NOT MERGE Aug 7, 2022
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.

6 participants