Indicator

template<class Grid>
class RatioIndicator

Class defining an indicator for grid remeshing regarding the edge length ratio. By default, we take 2x length of the longest edge contained in the interface as maximal edge length and 0.5x length of the shortest edge as minimal edge length.

Public Functions

inline RatioIndicator(ctype h = 0.0, ctype distProportion = 1.0, ctype factor = 1.0)

Calculates the indicator for each grid cell.

Parameters:
  • h – The objective edge length (aims at edge length in [h/4, 2*h]).

  • distProportion – Cells with distance to interface of value greater than distProportion * max(dist) are refined to …

  • factor – … edge length in [factor * minH, factor * maxH].

inline void init(const Grid &grid)

Calculates minH_ and maxH_ for the current interface edge length and sets factor_ to maxh / minh.

inline void update()

Update the distances of all vertices.

template<class Element>
inline int operator()(const Element &element) const

Function call operator to return mark.

Returns:

1 if an element should be refined, -1 if an element should be coarsened, 0 otherwise.

inline ctype maxH() const

Returns maxH.

inline ctype &maxH()

Returns reference to maxH.

inline ctype minH() const

Returns minH.

inline ctype &minH()

Returns reference to minH.

inline ctype &distProportion()

Returns reference to distProportion.

inline ctype &factor()

Returns reference to factor.