Skip to content

Mesh Cache Prototype #1

@JulienLoiseau

Description

@JulienLoiseau

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

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions