ug4
ug::GridMessage_Adaption Class Reference

A message sent along with "GridRefinement" messages. More...

#include <lib_grid_messages.h>

+ Inheritance diagram for ug::GridMessage_Adaption:

Public Member Functions

GridMessageAdaptionType adaption_type () const
 
bool adaptive () const
 tells whether refinement / coarsening is adaptive (adaptive() == !global()) More...
 
const GridObjectCollectionaffected_elements () const
 returns the geometric-object-collection, which holds lists with affected elements. More...
 
bool coarsening () const
 tells whether a step is a coarsen step More...
 
bool global () const
 tells whether refinement / coarsening is global (global() == !adaptive()) More...
 
 GridMessage_Adaption (GridMessageAdaptionType adaptionType)
 
 GridMessage_Adaption (GridMessageAdaptionType adaptionType, const GridObjectCollection &affectedElements)
 
bool refinement () const
 tells whether a step is a refinement step. More...
 
bool adaption_begins () const
 tells whether grid adaption has just been started or has been finished. More...
 
bool adaption_ends () const
 tells whether grid adaption has just been started or has been finished. More...
 
bool step_begins () const
 tells whether an adaption step has just been started or has been finished. More...
 
bool step_ends () const
 tells whether an adaption step has just been started or has been finished. More...
 
- Public Member Functions inherited from ug::MessageHub::IMessage
 IMessage ()
 
virtual ~IMessage ()
 

Protected Attributes

GridMessageAdaptionType m_adaptionType
 
GridObjectCollection m_affectedElements
 

Detailed Description

A message sent along with "GridRefinement" messages.

Constructor & Destructor Documentation

◆ GridMessage_Adaption() [1/2]

ug::GridMessage_Adaption::GridMessage_Adaption ( GridMessageAdaptionType  adaptionType)
inline

◆ GridMessage_Adaption() [2/2]

ug::GridMessage_Adaption::GridMessage_Adaption ( GridMessageAdaptionType  adaptionType,
const GridObjectCollection affectedElements 
)
inline

Member Function Documentation

◆ adaption_begins()

bool ug::GridMessage_Adaption::adaption_begins ( ) const

tells whether grid adaption has just been started or has been finished.

Note that begins and ends may both be false. An adaption consists of multiple steps.

References ug::GMAT_GLOBAL_ADAPTION_BEGINS, ug::GMAT_HNODE_ADAPTION_BEGINS, and m_adaptionType.

Referenced by ug::IDomain< TGrid, TSubsetHandler >::grid_adaption_callback(), ug::IApproximationSpace::grid_changed_callback(), and ug::GridFunction< TDomain, TAlgebra >::grid_changed_callback().

◆ adaption_ends()

bool ug::GridMessage_Adaption::adaption_ends ( ) const

tells whether grid adaption has just been started or has been finished.

Note that begins and ends may both be false. An adaption consists of multiple steps.

References ug::GMAT_GLOBAL_ADAPTION_ENDS, ug::GMAT_HNODE_ADAPTION_ENDS, and m_adaptionType.

Referenced by ug::IDomain< TGrid, TSubsetHandler >::grid_adaption_callback(), ug::DegeneratedLayerManager< dim >::grid_adaption_callback(), ug::IApproximationSpace::grid_changed_callback(), and ug::GridFunction< TDomain, TAlgebra >::grid_changed_callback().

◆ adaption_type()

GridMessageAdaptionType ug::GridMessage_Adaption::adaption_type ( ) const
inline

References m_adaptionType.

◆ adaptive()

bool ug::GridMessage_Adaption::adaptive ( ) const

◆ affected_elements()

const GridObjectCollection& ug::GridMessage_Adaption::affected_elements ( ) const
inline

returns the geometric-object-collection, which holds lists with affected elements.

  • REFINEMENT_BEGINS: Elements on which new elements will occur or which are transformed to a new element type (e.g. constrained/constraining)
  • REFINEMENT_ENDS: Elements which were refined.
  • COARSENING_BEGINS: Elements which will be removed or replaced during coarsening

For all other adaption types, the geometric-object-collection should be empty and should be ignored.

Note
during refinement only elements on which a new child was actually created are considered to be affected. Elements which were replaced by elements of a different type are not considered in the list of affected elements.
(THIS MAY CHANGE SOON!) Some of the elements marked for coarsening may actually only be replaced by a normal/constraining/constrained element. Note that elements may be marked during coarsening which actually have children themselves, even if not all of those children are removed during coarsening (e.g. edges which are replaced by constraining edges).

References m_affectedElements.

Referenced by ug::AdaptionSurfaceGridFunction< TDomain >::prolongate(), and ug::AdaptionSurfaceGridFunction< TDomain >::select_parents().

◆ coarsening()

bool ug::GridMessage_Adaption::coarsening ( ) const

◆ global()

bool ug::GridMessage_Adaption::global ( ) const

◆ refinement()

bool ug::GridMessage_Adaption::refinement ( ) const

◆ step_begins()

bool ug::GridMessage_Adaption::step_begins ( ) const

tells whether an adaption step has just been started or has been finished.

Note that both may be false. An adaption consists of multiple adaption steps.

References ug::GMAT_GLOBAL_COARSENING_BEGINS, ug::GMAT_GLOBAL_REFINEMENT_BEGINS, ug::GMAT_HNODE_COARSENING_BEGINS, ug::GMAT_HNODE_REFINEMENT_BEGINS, and m_adaptionType.

Referenced by ug::GridFunction< TDomain, TAlgebra >::grid_changed_callback().

◆ step_ends()

bool ug::GridMessage_Adaption::step_ends ( ) const

tells whether an adaption step has just been started or has been finished.

Note that both may be false. An adaption consists of multiple adaption steps.

References ug::GMAT_GLOBAL_COARSENING_ENDS, ug::GMAT_GLOBAL_REFINEMENT_ENDS, ug::GMAT_HNODE_COARSENING_ENDS, ug::GMAT_HNODE_REFINEMENT_ENDS, and m_adaptionType.

Referenced by ug::GridFunction< TDomain, TAlgebra >::grid_changed_callback().

Member Data Documentation

◆ m_adaptionType

◆ m_affectedElements

GridObjectCollection ug::GridMessage_Adaption::m_affectedElements
protected

Referenced by affected_elements().


The documentation for this class was generated from the following files: