Template Struct mesh_adapt_context

Inheritance Relationships

Base Type

Struct Documentation

template<typename TMeshClass>
struct mesh_adapt_context : public t8_mesh_handle::detail::mesh_adapt_context_base

Templated mesh adaptation context holding the mesh handle and the user defined callback.

Struct inherits from mesh_adapt_context_base and implements the virtual adapt callback using the mesh and the callback.

Template Parameters:

TMeshClass – The mesh handle class.

Public Functions

inline mesh_adapt_context(TMeshClass &mesh_handle, typename TMeshClass::adapt_callback_type adapt_callback)

Constructor of the context with the mesh handle and the user defined callback.

Parameters:
  • mesh_handle[in] The mesh handle to adapt.

  • adapt_callback[in] The adapt callback.

inline virtual int adapt_mesh(const t8_locidx_t lelement_handle_id, const int num_elements) override

Callback for mesh adaptation using the user defined adapt callback.

Parameters:
  • lelement_handle_id[in] Local flat element ID in the mesh handle of the first element.

  • num_elements[in] The number of elements that should be considered. If >1, the elements are expected to form a family that can be coarsened.

Returns:

1 if the element with index lelement_handle_id should be refined, -1 if the family shall be coarsened, 0 else.