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

Mesh Cache Prototype #1

Open
JulienLoiseau opened this issue Apr 29, 2022 · 0 comments
Open

Mesh Cache Prototype #1

JulienLoiseau opened this issue Apr 29, 2022 · 0 comments
Assignees

Comments

@JulienLoiseau
Copy link
Contributor

I added the different types of accessors as specified in: https://github.com/amanzi/mesh_cache_prototype/blob/master/base_class_example.hpp
Please complete this file with more details on the desired implementation.

I will do some tests to see if the creation of Kokkos::subview is slower than the access via getCellFace(i,j).

Example 1: DV and if constexpr, see mesh_DV_constexpr.cc

The default accessor is based on the type of the MeshCache. Host access needs to be specified in each calls.

Example of Device Access:

if(mc.getCellVolume(i) != i)

Example of Host Access:

v_h = mc.getCellFaces<memory::host>(2);

Example 2: DV and copy constructor, see mesh_DV_layer.cc

In this case the MeshCache is "copied" (which doesnt imply deep copy for the Kokkos::View) and the type of MeshCache can be changed when rquesting the Mesh. This is a first version and can be improved.

Example of Device MeshCache and access:

MeshCache mc(&m);

Example of Host MeshCache creation (from the Device MeshCache):

MeshCache<host> mc_h(mc);

This could be solved in the state when requesting the MeshCache with state->getMesh<host>().

Example 3: Multiple MeshCache with Kokkos::View (no DV), see mesh_V_dual.cc

WIP

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

No branches or pull requests

4 participants