Skip to content

Commit

Permalink
Merge branch 'develop' into lroberts36/add-task-graph
Browse files Browse the repository at this point in the history
  • Loading branch information
lroberts36 authored Jun 10, 2024
2 parents 6090cac + 7b02ac6 commit 5ca7436
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

### Added (new features/APIs/variables/...)
- [[PR 1099]](https://github.com/parthenon-hpc-lab/parthenon/pull/1099) Functionality for outputting task graphs in GraphViz format.
- [[PR 1100]](https://github.com/parthenon-hpc-lab/parthenon/pull/1100) Custom refinement ops propagated to fluxes
- [[PR 1090]](https://github.com/parthenon-hpc-lab/parthenon/pull/1090) SMR with swarms
- [[PR 1079]](https://github.com/parthenon-hpc-lab/parthenon/pull/1079) Address XDMF/Visit Issues
- [[PR 1084]](https://github.com/parthenon-hpc-lab/parthenon/pull/1084) Properly free swarm boundary MPI requests
Expand Down
7 changes: 7 additions & 0 deletions doc/sphinx/src/interface/refinement_operations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,10 @@ You must register both prolongation and restriction together. You may,
however, use the default Parthenon structs if desired. Then any variable
registered with this metadata object will use your custom prolongation
and restriction operations.

When a variable with custom operations is enrolled and marked
``Metadata::WithFluxes``, the resulting flux variables that are created will
also have the same custom operations enrolled. In general the custom operations
will need to be different for the variable and for its fluxes; these can be
distinguished inside the custom operations by referring to the
``TopologicalElement`` template parameter.
10 changes: 9 additions & 1 deletion src/interface/state_descriptor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,15 @@ bool StateDescriptor::AddFieldImpl(const VarID &vid, const Metadata &m_in,
mFlags.push_back(Metadata::Edge);
else if (m.IsSet(Metadata::Edge))
mFlags.push_back(Metadata::Node);
Metadata mf(mFlags, m.Shape());

Metadata mf;
if (m.GetRefinementFunctions().label().size() > 0) {
// Propagate custom refinement ops to flux field
mf = Metadata(mFlags, m.Shape(), std::vector<std::string>(), std::string(),
m.GetRefinementFunctions());
} else {
mf = Metadata(mFlags, m.Shape());
}
auto fId = VarID{internal_fluxname + internal_varname_seperator + vid.base_name,
vid.sparse_id};
AddFieldImpl(fId, mf, control_vid);
Expand Down

0 comments on commit 5ca7436

Please sign in to comment.