ug4
refinement

refinement classes and algorithms More...

Modules

 subdivision
 subdivision classes and algorithms
 

Classes

class  ug::AdaptiveRegularRefiner_MultiGrid
 Specialization of IRefiner for adaptive multigrid refinement with closure. More...
 
class  ug::GlobalFracturedMediaRefiner
 
class  ug::GlobalMultiGridRefiner
 
class  ug::GlobalSubdivisionMultiGridRefiner< TAPosition >
 Specialization of the GlobalMultiGridRefiner class to incorporate subdivision refinement. More...
 
class  ug::HangingNodeRefiner_Grid
 Specialization of ug::HangingNodeRefiner for ug::Grid. More...
 
class  ug::HangingNodeRefiner_MultiGrid
 Specialization of ug::HangingNodeRefiner for ug::MultiGrid. More...
 
class  ug::HangingNodeRefinerBase< TSelector >
 Base class for a hanging-node refiner. More...
 
class  ug::IRefiner
 The refiner interface allows to mark elements for refinement and to call refine. More...
 
class  ug::IRefMarkAdjuster
 

Typedefs

typedef SmartPtr< IRefMarkAdjusterug::SPIRefMarkAdjuster
 

Enumerations

enum  ug::RefinementMark {
  ug::RM_NONE = 0 , ug::RM_CLOSURE = 1 , ug::RM_COPY = RM_CLOSURE , ug::RM_ANISOTROPIC = RM_CLOSURE ,
  ug::RM_LOCAL = 1 << 1 , ug::RM_FULL = 1 << 2 , ug::RM_REFINE = RM_FULL , ug::RM_COARSEN = 1 << 3 ,
  ug::RM_DUMMY = 1 << 4 , ug::RM_MAX
}
 refinement-marks allow to specify how an element shall be processed during refinement. More...
 

Functions

bool ug::Refine (Grid &grid, Selector &sel, AInt &aInt, RefinementProjector *projector=NULL, bool useSnapPoints=false)
 refines selected faces and edges regularily and builds a closure on adjacent unselected faces. More...
 
bool ug::Refine (Grid &grid, Selector &sel, RefinementProjector *projector=NULL, bool useSnapPoints=false)
 refines selected faces and edges regularily and builds a closure on adjacent unselected faces. More...
 

Detailed Description

refinement classes and algorithms

The refinement section contains classes that allow to refine a ug::Grid or a ug::MultiGrid with different methods. An adaptive refiner that generates a grid that contains hanging vertices (ug::HangingVertex) and constrained and constraining edges (ug::ConstrainedEdge, ug::ConstrainingEdge) is featured as well as a refiner that builds a regular closure.

Please note that parallel refinement is adressed in the section Lib_grid_parallelization_refinement.

Performs global grid refinement, while performig anisotropic refinement in the given fractures.

Typedef Documentation

◆ SPIRefMarkAdjuster

Enumeration Type Documentation

◆ RefinementMark

refinement-marks allow to specify how an element shall be processed during refinement.

< Fully refines an element and all associated sides and edges

Enumerator
RM_NONE 

no refinement is performed

RM_CLOSURE 

Refines elements according to associated marked edges.

RM_COPY 

DEPRECATED. Use RM_CLOSURE or RM_LOCAL with localMark = 0 instead.

RM_ANISOTROPIC 

DEPRECATED. Use RM_CLOSURE instead.

RM_LOCAL 

Refines elements according to a local refinement mark (use 'mark_local')

RM_FULL 

Fully refines an element and all associated sides and edges.

RM_REFINE 

DEPRECATED. Use RM_FULL instead.

RM_COARSEN 

the element is coarsened (only valid for adaptive multi-grid refinement)

RM_DUMMY 

used internally during mark-adjustment

RM_MAX 

the highest constant in RefinementMark. Should always be smaller than 128!

Function Documentation

◆ Refine() [1/2]

UG_API bool ug::Refine ( Grid grid,
Selector sel,
AInt aInt,
RefinementProjector projector = NULL,
bool  useSnapPoints = false 
)

refines selected faces and edges regularily and builds a closure on adjacent unselected faces.

Selected faces will be refined with regular refinement. Faces which are adjacent to selected faces or selected edges and which are not selected, will be refined too to build a closure. In this case however, the refinement is not regular - faces are refined in a way to avoid hanging nodes.

Pass a grid and a selector (which is working on the grid). The provided aInt is required by the algorithm to store temporary values. You have to pass it to the algorithm to allow maximal speed for repeated small refinements.

All involved geometric objects will be selected after the method terminated (This includes vertices adjacent to selected edges and faces).

aInt has to be attached to the edges of the grid.

If you are interested in rare, big refinements, you may also use the overloaded version of Refine, which only takes a Grid and a Selector.

If 'useSnapPoints' is set to 'true' (default is 'false'), selected vertices are used as snap-points. They play a role during refinement of quadrilaterals and of volume-elements with quadrilateral sides.

See also
ug::RegularRefiner, ug::HangingNodeRefiner

References ug::Grid::AttachmentAccessor< TElem, TAttachment >::access(), ug::AdjustSelection(), ug::aPosition, ug::Selector::begin(), ug::Selector::clear(), ug::Grid::create(), ug::Grid::enable_options(), ug::Selector::end(), ug::Grid::erase(), ug::FACEOPT_AUTOGENERATE_EDGES, ug::RefinementProjector::geometry(), ug::Grid::get_edge(), ug::Grid::get_face(), ug::Selector::get_grid_objects(), ug::ISelector::get_selection_status(), ug::Grid::has_edge_attachment(), ug::Grid::has_face_attachment(), ug::Grid::has_vertex_attachment(), ug::ISelector::is_selected(), LOG, make_sp(), ug::RefinementProjector::new_vertex(), ug::Grid::num(), ug::Selector::num(), ug::Grid::num_edges(), ug::Face::num_edges(), ug::Volume::num_edges(), ug::Grid::num_faces(), ug::Volume::num_faces(), ug::FaceVertices::num_vertices(), ug::VolumeVertices::num_vertices(), ug::Grid::num_volumes(), ug::Grid::option_is_enabled(), ug::IGeometry< dim >::pos(), ug::Edge::refine(), ug::Face::refine(), ug::Volume::refine(), ug::RefinementProjector::refinement_begins(), ug::RefinementProjector::refinement_ends(), ug::Grid::register_element(), s, ug::ISelector::select(), SelectAssociatedVertices(), ug::RefinementProjector::set_geometry(), UG_LOG, ug::VolumeVertices::vertex(), ug::FaceVertices::vertices(), ug::VolumeVertices::vertices(), ug::VOLOPT_AUTOGENERATE_FACES, ug::VRTOPT_STORE_ASSOCIATED_EDGES, ug::VRTOPT_STORE_ASSOCIATED_FACES, and ug::VRTOPT_STORE_ASSOCIATED_VOLUMES.

Referenced by ug::Refine().

◆ Refine() [2/2]

UG_API bool ug::Refine ( Grid grid,
Selector sel,
RefinementProjector projector = NULL,
bool  useSnapPoints = false 
)

refines selected faces and edges regularily and builds a closure on adjacent unselected faces.

This method overloads Refine(Grid& grid, Selector& sel, AInt& aInt). It is slower that the full version of refine, since it tempiroraily attaches the required aInt attachment to the edges of aInt before it calls the original version.

This method should only be used if only very few refinement steps are performed and if speed is not cruical.

See also
ug::RegularRefiner, ug::HangingNodeRefiner

References ug::Grid::attach_to_edges(), ug::Grid::attach_to_faces(), ug::Grid::detach_from_edges(), ug::Grid::detach_from_faces(), ug::Grid::num(), and ug::Refine().