AMRRegion< dim, number > Class Template Reference

Developer Documentation: MeltPoolDG::AMR::AMRRegion< dim, number > Class Template Reference
Developer Documentation
MeltPoolDG::AMR::AMRRegion< dim, number > Class Template Reference

Type-erased wrapper representing a geometric region for adaptive mesh refinement. More...

#include <amr_regions.hpp>

Classes

struct  Concept
 Abstract base interface for all region types. More...
 
struct  Model
 Concrete wrapper around a user-defined region type. More...
 

Public Member Functions

template<typename T >
 AMRRegion (T &&region)
 Constructs an AMRRegion from a user-defined region object.
 
bool point_inside (const dealii::Point< dim, number > &p) const
 Checks whether a given point lies inside this region.
 

Private Attributes

std::unique_ptr< Conceptregion
 

Detailed Description

template<int dim, typename number>
class MeltPoolDG::AMR::AMRRegion< dim, number >

Type-erased wrapper representing a geometric region for adaptive mesh refinement.

This class provides a generic interface for region-based adaptive mesh refinement. It allows users to define arbitrary region objects (e.g., boxes, spheres, or complex predicates) that implement a method:

bool point_inside(const dealii::Point<dim, number> &p) const;
bool point_inside(const dealii::Point< dim, number > &p) const
Checks whether a given point lies inside this region.
Definition amr_regions.hpp:68

and then wrap them in an AMRRegion instance for use in the provided refinement algorithms.

Internally, a type erasure pattern is employed to store heterogeneous region types behind a uniform interface.

Constructor & Destructor Documentation

◆ AMRRegion()

template<int dim, typename number >
template<typename T >
MeltPoolDG::AMR::AMRRegion< dim, number >::AMRRegion ( T &&  region)
inline

Constructs an AMRRegion from a user-defined region object.

Parameters
regionThe region object to wrap.

Member Function Documentation

◆ point_inside()

template<int dim, typename number >
bool MeltPoolDG::AMR::AMRRegion< dim, number >::point_inside ( const dealii::Point< dim, number > &  p) const
inline

Checks whether a given point lies inside this region.

Parameters
pThe point to test.
Returns
true if the point is inside the region, otherwise false.

Member Data Documentation

◆ region

template<int dim, typename number >
std::unique_ptr<Concept> MeltPoolDG::AMR::AMRRegion< dim, number >::region
private

Pointer to the type erasure model which holds the actual object describing the behavior of the region.


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