SpECTRE  v2024.04.12
amr::projectors::CopyFromCreatorOrLeaveAsIs< Tags > Struct Template Reference

For h-refinement copy the items from the parent/child, while for p-refinement leave the items unchanged. More...

#include <CopyFromCreatorOrLeaveAsIs.hpp>

Public Types

using return_tags = tmpl::list< Tags... >
 
using argument_tags = tmpl::list<>
 

Static Public Member Functions

template<size_t Dim>
static void apply (const gsl::not_null< typename Tags::type * >..., const std::pair< Mesh< Dim >, Element< Dim > > &)
 
template<typename... ParentTags>
static void apply (const gsl::not_null< typename Tags::type * >... items, const tuples::TaggedTuple< ParentTags... > &parent_items)
 
template<size_t Dim, typename... ChildrenTags>
static void apply (const gsl::not_null< typename Tags::type * >... items, const std::unordered_map< ElementId< Dim >, tuples::TaggedTuple< ChildrenTags... > > &children_items)
 

Detailed Description

template<typename... Tags>
struct amr::projectors::CopyFromCreatorOrLeaveAsIs< Tags >

For h-refinement copy the items from the parent/child, while for p-refinement leave the items unchanged.

There is a specialization for CopyFromCreatorOrLeaveAsIs<tmpl::list<Tags...>> that can be used if a tmpl::list is available.

Details

For each item corresponding to each tag:

  • When changing resolution (p-refinement), leave unchanged
  • When splitting, copy the value from the parent to the child
  • When joining, check that the children have the same value, and copy to the parent

The documentation for this struct was generated from the following file: