PTEMS  0.1.0-dev+git.81fd0e4
PolyTopic Element Method Solver
ptems::HPRefinementStrategy< DIM, X, N > Struct Template Referenceabstract

Base type for refinement strategies for \(hp\)-adaptive refinement. More...

#include <ptems/hpstrategies.hpp>

Classes

struct  RefinementDataImpl
 Implentation of HPRefinementData which hides type of the estimator and function containers. More...
 

Public Member Functions

 HPRefinementStrategy (const PDiscreteFunctionSpace< DIM, X, N > &space, std::size_t minP=1)
 Creates the base type for a \(hp\)-refinement strategy. More...
 
const PDiscreteFunctionSpace< DIM, X, N > & Space ()
 Gets the finite element space the refinement strategy is on. More...
 
template<typename MarkingStrategy , typename Estimators , typename... Args>
FEMesh< DIM >::Modifications AdaptWithStrategyAndDefaultSmoothing (const Estimators &estimators, Args... args)
 Perform \(hp\)-adaptive refinement on the contained space and mesh using a marking strategy functor object which takes error indicators as the first argument to the constructor, and with default mesh smoothing options (default constructed MeshSmoother). More...
 
template<typename MarkingStrategy , typename Estimators , typename... Args>
FEMesh< DIM >::Modifications AdaptWithStrategyAndDefaultSmoothing (const Estimators &estimators, const DiscreteFunction< DIM, X, N, N > &func, Args... args)
 Perform \(hp\)-adaptive refinement on the contained space and mesh using a marking strategy functor object which takes error indicators as the first argument to the constructor with the specified function defined on the space, and with default mesh smoothing options (default constructed MeshSmoother). More...
 
template<typename MarkingStrategy , typename Estimators , typename DiscreteFuncs , typename... Args, typename = typename DiscreteFuncs::value_type>
FEMesh< DIM >::Modifications AdaptWithStrategyAndDefaultSmoothing (const Estimators &estimators, const DiscreteFuncs &funcs, Args... args)
 Perform \(hp\)-adaptive refinement on the contained space and mesh using a marking strategy functor object which takes error indicators as the first argument to the constructor with the specified functions defined on the space, and with default mesh smoothing options (default constructed MeshSmoother). More...
 
template<typename MarkingStrategy , typename Estimators , typename... Args>
FEMesh< DIM >::Modifications AdaptConformingWithStrategy (const Estimators &estimators, Args... args)
 Perform \(hp\)-adaptive refinement on the contained space and mesh using a marking strategy functor object which takes error indicators as the first argument to the constructor, with mesh smoothing options for conforming meshes (i.e., MeshSmoother::Conforming()). More...
 
template<typename MarkingStrategy , typename Estimators , typename... Args>
FEMesh< DIM >::Modifications AdaptConformingWithStrategy (const Estimators &estimators, const DiscreteFunction< DIM, X, N, N > &func, Args... args)
 Perform \(hp\)-adaptive refinement on the contained space and mesh using a marking strategy functor object which takes error indicators as the first argument to the constructor with the specified function defined on the space with mesh smoothing options for conforming meshes (i.e., MeshSmoother::Conforming()). More...
 
template<typename MarkingStrategy , typename Estimators , typename DiscreteFuncs , typename... Args, typename = typename DiscreteFuncs::value_type>
FEMesh< DIM >::Modifications AdaptConformingWithStrategy (const Estimators &estimators, const DiscreteFuncs &funcs, Args... args)
 Perform \(hp\)-adaptive refinement on the contained space and mesh using a marking strategy functor object which takes error indicators as the first argument to the constructor with the specified functions defined on the space with mesh smoothing options for conforming meshes (i.e., MeshSmoother::Conforming()). More...
 
template<typename MarkingStrategy , typename Estimators , typename... Args>
FEMesh< DIM >::Modifications AdaptWithStrategy (const Estimators &estimators, MeshSmoother smoother, Args... args)
 Perform \(hp\)-adaptive refinement on the contained space and mesh using a marking strategy functor object which takes error indicators as the first argument to the constructor and with the specified mesh smoothing options. More...
 
template<typename MarkingStrategy , typename Estimators , typename... Args>
FEMesh< DIM >::Modifications AdaptWithStrategy (const Estimators &estimators, const DiscreteFunction< DIM, X, N, N > &func, MeshSmoother smoother, Args... args)
 Perform \(hp\)-adaptive refinement on the contained space and mesh using a marking strategy functor object which takes error indicators as the first argument to the constructor with the specified function defined on the space and with the specified mesh smoothing options. More...
 
template<typename MarkingStrategy , typename Estimators , typename DiscreteFuncs , typename... Args, typename = typename DiscreteFuncs::value_type>
FEMesh< DIM >::Modifications AdaptWithStrategy (const Estimators &estimators, const DiscreteFuncs &funcs, MeshSmoother smoother, Args... args)
 Perform \(hp\)-adaptive refinement on the contained space and mesh using a marking strategy functor object which takes error indicators as the first argument to the constructor with the specified functions defined on the space and with the specified mesh smoothing options. More...
 
template<typename Container , typename Estimators , typename = typename Container::value_type>
FEMesh< DIM >::Modifications Adapt (const Container &flags, const Estimators &estimators, MeshSmoother smoother=MeshSmoother{})
 Perform \(hp\)-adaptive refinement on the contained space and using a container of flags indicating the refinement to perform. More...
 
template<typename Container , typename Estimators , typename = typename Container::value_type>
FEMesh< DIM >::Modifications Adapt (const Container &flags, const Estimators &estimators, const DiscreteFunction< DIM, X, N, N > &func, MeshSmoother smoother=MeshSmoother{})
 Perform \(hp\)-adaptive refinement on the contained space and using a container of flags indicating the refinement to perform. More...
 
template<typename Container , typename Estimators , typename DiscreteFuncs , typename = typename Container::value_type>
FEMesh< DIM >::Modifications Adapt (const Container &flags, const Estimators &estimators, const DiscreteFuncs &funcs, MeshSmoother smoother=MeshSmoother{})
 Perform \(hp\)-adaptive refinement on the contained space and using a container of flags indicating the refinement to perform. More...
 
template<typename Container , typename Estimators >
FEMesh< DIM >::Modifications Adapt (const Container &refine, const Container &coarsen, const Estimators &estimators, MeshSmoother smoother=MeshSmoother{})
 Perform \(hp\)-adaptive refinement on the contained space and mesh using a set of elements to refine and coarsen. More...
 
template<typename Container , typename Estimators >
FEMesh< DIM >::Modifications Adapt (const Container &refine, const Container &coarsen, const Estimators &estimators, const DiscreteFunction< DIM, X, N, N > &func, MeshSmoother smoother=MeshSmoother{})
 Perform \(hp\)-adaptive refinement on the contained space and mesh using a set of elements to refine and coarsen. More...
 
template<typename Container , typename Estimators , typename DiscreteFuncs >
FEMesh< DIM >::Modifications Adapt (const Container &refine, const Container &coarsen, const Estimators &estimators, const DiscreteFuncs &funcs, MeshSmoother smoother=MeshSmoother{})
 Perform \(hp\)-adaptive refinement on the contained space and mesh using a set of elements to refine and coarsen. More...
 
template<typename Func , typename Estimators , typename = std::enable_if_t<std::is_same_v<decltype(std::declval<Func>()(std::declval<std::size_t>())), AdaptationType>>
FEMesh< DIM >::Modifications Adapt (Func flagFunction, const Estimators &estimators, MeshSmoother smoother=MeshSmoother{})
 Perform \(hp\)-adaptive refinement on the contained space and mesh using a function for deciding which elements to refine. More...
 
template<typename Func , typename Estimators , typename = std::enable_if_t<std::is_same_v<decltype(std::declval<Func>()(std::declval<std::size_t>())), AdaptationType>>
FEMesh< DIM >::Modifications Adapt (Func flagFunction, const Estimators &estimators, const DiscreteFunction< DIM, X, N, N > &func, MeshSmoother smoother=MeshSmoother{})
 Perform \(hp\)-adaptive refinement on the contained space and mesh using a function for deciding which elements to refine. More...
 
template<typename Func , typename Estimators , typename DiscreteFuncs , typename = std::enable_if_t<std::is_same_v<decltype(std::declval<Func>()(std::declval<std::size_t>())), AdaptationType>>
FEMesh< DIM >::Modifications Adapt (Func flagFunction, const Estimators &estimators, const DiscreteFuncs &funcs, MeshSmoother smoother=MeshSmoother{})
 Perform \(hp\)-adaptive refinement on the contained space and mesh using a function for deciding which elements to refine. More...
 

Protected Member Functions

virtual bool ShouldPolydegAdapt (const HPRefinementData< DIM, X, N > &data, std::size_t element, bool refine)=0
 Method called by the adaptation routines to decide if \(p\)-refinement should be performed for an element. More...
 
virtual void PostProcessSpaceRefine ([[maybe_unused]] const HPRefinementData< DIM, X, N > &data, [[maybe_unused]] const std::vector< AdaptationType > &pRefinements)
 Method called by the adaptation routines after \(p\)-refinement, but before \(h\)-refinement. More...
 
virtual void PostProcessMeshRefine ([[maybe_unused]] const HPRefinementData< DIM, X, N > &data, [[maybe_unused]] const typename FEMesh< DIM >::Modifications &changes, [[maybe_unused]] const std::vector< AdaptationType > &pRefinements)
 Method called by the adaptation routines after both \(h\)-refinement and \(p\)-refinement. More...
 

Detailed Description

template<std::size_t DIM, typename X = double, std::size_t N = 1>
struct ptems::HPRefinementStrategy< DIM, X, N >

Base type for refinement strategies for \(hp\)-adaptive refinement.

An implementation of a \(hp\)-adaptive refinement strategy should derive from this function and override the virtual methods.

Template Parameters
DIMThe dimension of the mesh and spaces to refine
XThe type of the result of the functions (double, std::complex, etc) for each space
NThe size of the resulting vector space (N=1 for scalars) for each space

Constructor & Destructor Documentation

◆ HPRefinementStrategy()

template<std::size_t DIM, typename X = double, std::size_t N = 1>
ptems::HPRefinementStrategy< DIM, X, N >::HPRefinementStrategy ( const PDiscreteFunctionSpace< DIM, X, N > &  space,
std::size_t  minP = 1 
)
inline

Creates the base type for a \(hp\)-refinement strategy.

Parameters
spaceThe function space to refine (containing the mesh to refine)
minPMinimum polynomial degree. Coarsen will not occur if the polynomial degree of ANY component will fall below this minimum (default = 1)

Member Function Documentation

◆ Adapt() [1/9]

template<std::size_t DIM, typename X = double, std::size_t N = 1>
template<typename Container , typename Estimators , typename DiscreteFuncs , typename = typename Container::value_type>
FEMesh<DIM>::Modifications ptems::HPRefinementStrategy< DIM, X, N >::Adapt ( const Container flags,
const Estimators &  estimators,
const DiscreteFuncs &  funcs,
MeshSmoother  smoother = MeshSmoother{} 
)
inline

Perform \(hp\)-adaptive refinement on the contained space and using a container of flags indicating the refinement to perform.

A container of flags can be one of the following:

  • A random access container of AdaptationType (i.e., supports operator[] and size()) containing an AdaptationType for each element
  • An associative container (map/unordered_map etc) of element number (std::size_t) to AdaptationType containing an AdaptationType for SOME elements, all other elements are left unrefined
  • A container of element numbers to perform refinement on, all other elements are left unrefined
Template Parameters
ContainerContainer type containing AdaptationType or std::size_t, or map from std::size_t to AdaptationType
EstimatorsType of the list of error indicators, must be random access container of the same length as the number of elements on the mesh
DiscreteFuncsType of the list of functions, must be random access container.
Parameters
flagsContainer of AdaptationType or std::size_t, or map from std::size_t to AdaptationType
estimatorsError indicators for each element in mesh, necessary for checking convergence against expected
funcsList of functions defined on the space to use for the refinement strategy
smootherSpecifies options for smoothing the mesh during refinemnt. Default options are as for a default constructed MeshSmoother object
Returns
Structure denoting changes that occurred to the mesh (but NOT the space polynomial degrees)
See also
MeshSmoother::MeshSmoother

◆ Adapt() [2/9]

template<std::size_t DIM, typename X = double, std::size_t N = 1>
template<typename Container , typename Estimators , typename = typename Container::value_type>
FEMesh<DIM>::Modifications ptems::HPRefinementStrategy< DIM, X, N >::Adapt ( const Container flags,
const Estimators &  estimators,
const DiscreteFunction< DIM, X, N, N > &  func,
MeshSmoother  smoother = MeshSmoother{} 
)
inline

Perform \(hp\)-adaptive refinement on the contained space and using a container of flags indicating the refinement to perform.

A container of flags can be one of the following:

  • A random access container of AdaptationType (i.e., supports operator[] and size()) containing an AdaptationType for each element
  • An associative container (map/unordered_map etc) of element number (std::size_t) to AdaptationType containing an AdaptationType for SOME elements, all other elements are left unrefined
  • A container of element numbers to perform refinement on, all other elements are left unrefined
Template Parameters
ContainerContainer type containing AdaptationType or std::size_t, or map from std::size_t to AdaptationType
EstimatorsType of the list of error indicators, must be random access container of the same length as the number of elements on the mesh
Parameters
flagsContainer of AdaptationType or std::size_t, or map from std::size_t to AdaptationType
estimatorsError indicators for each element in mesh, necessary for checking convergence against expected
funcFunction defined on the space to use for the refinement strategy
smootherSpecifies options for smoothing the mesh during refinemnt. Default options are as for a default constructed MeshSmoother object
Returns
Structure denoting changes that occurred to the mesh (but NOT the space polynomial degrees)
See also
MeshSmoother::MeshSmoother

◆ Adapt() [3/9]

template<std::size_t DIM, typename X = double, std::size_t N = 1>
template<typename Container , typename Estimators , typename = typename Container::value_type>
FEMesh<DIM>::Modifications ptems::HPRefinementStrategy< DIM, X, N >::Adapt ( const Container flags,
const Estimators &  estimators,
MeshSmoother  smoother = MeshSmoother{} 
)
inline

Perform \(hp\)-adaptive refinement on the contained space and using a container of flags indicating the refinement to perform.

A container of flags can be one of the following:

  • A random access container of AdaptationType (i.e., supports operator[] and size()) containing an AdaptationType for each element
  • An associative container (map/unordered_map etc) of element number (std::size_t) to AdaptationType containing an AdaptationType for SOME elements, all other elements are left unrefined
  • A container of element numbers to perform refinement on, all other elements are left unrefined
Template Parameters
ContainerContainer type containing AdaptationType or std::size_t, or map from std::size_t to AdaptationType
EstimatorsType of the list of error indicators, must be random access container of the same length as the number of elements on the mesh
Parameters
flagsContainer of AdaptationType or std::size_t, or map from std::size_t to AdaptationType
estimatorsError indicators for each element in mesh, necessary for checking convergence against expected
smootherSpecifies options for smoothing the mesh during refinemnt. Default options are as for a default constructed MeshSmoother object
Returns
Structure denoting changes that occurred to the mesh (but NOT the space polynomial degrees)
See also
MeshSmoother::MeshSmoother

◆ Adapt() [4/9]

template<std::size_t DIM, typename X = double, std::size_t N = 1>
template<typename Container , typename Estimators , typename DiscreteFuncs >
FEMesh<DIM>::Modifications ptems::HPRefinementStrategy< DIM, X, N >::Adapt ( const Container refine,
const Container coarsen,
const Estimators &  estimators,
const DiscreteFuncs &  funcs,
MeshSmoother  smoother = MeshSmoother{} 
)
inline

Perform \(hp\)-adaptive refinement on the contained space and mesh using a set of elements to refine and coarsen.

Attention
While the container of element numbers to refine/coarsen can be ANY container time, it is strongly recommended to use a set-like container which can perform fast searching (e.g. std::set or std::unordered_set)
Template Parameters
ContainerContainer type for refinement and coarsen flags
EstimatorsType of the list of error indicators, must be random access container of the same length as the number of elements on the mesh
DiscreteFuncsType of the list of functions, must be random access container.
Parameters
refineContainer of indices of elements to refine
coarsenContainer of indices of elements to coarsen
estimatorsError indicators for each element in mesh, necessary for checking convergence against expected
funcsList of functions defined on the space to use for the refinement strategy
smootherSpecifies options for smoothing the mesh during refinemnt. Default options are as for a default constructed MeshSmoother object
Returns
Structure denoting changes that occurred to the mesh (but NOT the space polynomial degrees)
See also
MeshSmoother::MeshSmoother

◆ Adapt() [5/9]

template<std::size_t DIM, typename X = double, std::size_t N = 1>
template<typename Container , typename Estimators >
FEMesh<DIM>::Modifications ptems::HPRefinementStrategy< DIM, X, N >::Adapt ( const Container refine,
const Container coarsen,
const Estimators &  estimators,
const DiscreteFunction< DIM, X, N, N > &  func,
MeshSmoother  smoother = MeshSmoother{} 
)
inline

Perform \(hp\)-adaptive refinement on the contained space and mesh using a set of elements to refine and coarsen.

Attention
While the container of element numbers to refine/coarsen can be ANY container time, it is strongly recommended to use a set-like container which can perform fast searching (e.g. std::set or std::unordered_set)
Template Parameters
ContainerContainer type for refinement and coarsen flags
EstimatorsType of the list of error indicators, must be random access container of the same length as the number of elements on the mesh
Parameters
refineContainer of indices of elements to refine
coarsenContainer of indices of elements to coarsen
estimatorsError indicators for each element in mesh, necessary for checking convergence against expected
funcFunction defined on the space to use for the refinement strategy
smootherSpecifies options for smoothing the mesh during refinemnt. Default options are as for a default constructed MeshSmoother object
Returns
Structure denoting changes that occurred to the mesh (but NOT the space polynomial degrees)
See also
MeshSmoother::MeshSmoother

◆ Adapt() [6/9]

template<std::size_t DIM, typename X = double, std::size_t N = 1>
template<typename Container , typename Estimators >
FEMesh<DIM>::Modifications ptems::HPRefinementStrategy< DIM, X, N >::Adapt ( const Container refine,
const Container coarsen,
const Estimators &  estimators,
MeshSmoother  smoother = MeshSmoother{} 
)
inline

Perform \(hp\)-adaptive refinement on the contained space and mesh using a set of elements to refine and coarsen.

Attention
While the container of element numbers to refine/coarsen can be ANY container time, it is strongly recommended to use a set-like container which can perform fast searching (e.g. std::set or std::unordered_set)
Template Parameters
ContainerContainer type for refinement and coarsen flags
EstimatorsType of the list of error indicators, must be random access container of the same length as the number of elements on the mesh
Parameters
refineContainer of indices of elements to refine
coarsenContainer of indices of elements to coarsen
estimatorsError indicators for each element in mesh, necessary for checking convergence against expected
smootherSpecifies options for smoothing the mesh during refinemnt. Default options are as for a default constructed MeshSmoother object
Returns
Structure denoting changes that occurred to the mesh (but NOT the space polynomial degrees)
See also
MeshSmoother::MeshSmoother

◆ Adapt() [7/9]

template<std::size_t DIM, typename X = double, std::size_t N = 1>
template<typename Func , typename Estimators , typename DiscreteFuncs , typename = std::enable_if_t<std::is_same_v<decltype(std::declval<Func>()(std::declval<std::size_t>())), AdaptationType>>
FEMesh<DIM>::Modifications ptems::HPRefinementStrategy< DIM, X, N >::Adapt ( Func  flagFunction,
const Estimators &  estimators,
const DiscreteFuncs &  funcs,
MeshSmoother  smoother = MeshSmoother{} 
)
inline

Perform \(hp\)-adaptive refinement on the contained space and mesh using a function for deciding which elements to refine.

Template Parameters
FuncA function type which takes a std::size_t, and returns an AdaptionType; e.g., of form AdaptionType operator()(std::size_t idx).
EstimatorsType of the list of error indicators, must be random access container of the same length as the number of elements on the mesh
DiscreteFuncsType of the list of functions, must be random access container.
Parameters
flagFunctionFunction which takes an element index in range [0, Mesh()->ElementCount()), and returns an AdaptionType flag value indicating if the element should be refined, coarsened, or left 'as-is'
estimatorsError indicators for each element in mesh, necessary for checking convergence against expected
funcsList of functions defined on the space to use for the refinement strategy
smootherSpecifies options for smoothing the mesh during refinemnt. Default options are as for a default constructed MeshSmoother object
Returns
Structure denoting changes that occurred to the mesh (but NOT the space polynomial degrees)
See also
MeshSmoother::MeshSmoother

◆ Adapt() [8/9]

template<std::size_t DIM, typename X = double, std::size_t N = 1>
template<typename Func , typename Estimators , typename = std::enable_if_t<std::is_same_v<decltype(std::declval<Func>()(std::declval<std::size_t>())), AdaptationType>>
FEMesh<DIM>::Modifications ptems::HPRefinementStrategy< DIM, X, N >::Adapt ( Func  flagFunction,
const Estimators &  estimators,
const DiscreteFunction< DIM, X, N, N > &  func,
MeshSmoother  smoother = MeshSmoother{} 
)
inline

Perform \(hp\)-adaptive refinement on the contained space and mesh using a function for deciding which elements to refine.

Template Parameters
FuncA function type which takes a std::size_t, and returns an AdaptionType; e.g., of form AdaptionType operator()(std::size_t idx).
EstimatorsType of the list of error indicators, must be random access container of the same length as the number of elements on the mesh
Parameters
flagFunctionFunction which takes an element index in range [0, Mesh()->ElementCount()), and returns an AdaptionType flag value indicating if the element should be refined, coarsened, or left 'as-is'
estimatorsError indicators for each element in mesh, necessary for checking convergence against expected
funcFunction defined on the space to use for the refinement strategy
smootherSpecifies options for smoothing the mesh during refinemnt. Default options are as for a default constructed MeshSmoother object
Returns
Structure denoting changes that occurred to the mesh (but NOT the space polynomial degrees)
See also
MeshSmoother::MeshSmoother

◆ Adapt() [9/9]

template<std::size_t DIM, typename X = double, std::size_t N = 1>
template<typename Func , typename Estimators , typename = std::enable_if_t<std::is_same_v<decltype(std::declval<Func>()(std::declval<std::size_t>())), AdaptationType>>
FEMesh<DIM>::Modifications ptems::HPRefinementStrategy< DIM, X, N >::Adapt ( Func  flagFunction,
const Estimators &  estimators,
MeshSmoother  smoother = MeshSmoother{} 
)
inline

Perform \(hp\)-adaptive refinement on the contained space and mesh using a function for deciding which elements to refine.

Template Parameters
FuncA function type which takes a std::size_t, and returns an AdaptionType; e.g., of form AdaptionType operator()(std::size_t idx).
EstimatorsType of the list of error indicators, must be random access container of the same length as the number of elements on the mesh
Parameters
flagFunctionFunction which takes an element index in range [0, Mesh()->ElementCount()), and returns an AdaptionType flag value indicating if the element should be refined, coarsened, or left 'as-is'
estimatorsError indicators for each element in mesh, necessary for checking convergence against expected
smootherSpecifies options for smoothing the mesh during refinemnt. Default options are as for a default constructed MeshSmoother object
Returns
Structure denoting changes that occurred to the mesh (but NOT the space polynomial degrees)
See also
MeshSmoother::MeshSmoother

◆ AdaptConformingWithStrategy() [1/3]

template<std::size_t DIM, typename X = double, std::size_t N = 1>
template<typename MarkingStrategy , typename Estimators , typename... Args>
FEMesh<DIM>::Modifications ptems::HPRefinementStrategy< DIM, X, N >::AdaptConformingWithStrategy ( const Estimators &  estimators,
Args...  args 
)
inline

Perform \(hp\)-adaptive refinement on the contained space and mesh using a marking strategy functor object which takes error indicators as the first argument to the constructor, with mesh smoothing options for conforming meshes (i.e., MeshSmoother::Conforming()).

Convenience method for call to

Adapt(MarkingStrategy{estimators, args...}, estimators, MeshSmoother::Conforming())
FEMesh< DIM >::Modifications Adapt(const Container &flags, const Estimators &estimators, MeshSmoother smoother=MeshSmoother{})
Perform -adaptive refinement on the contained space and using a container of flags indicating the ref...
Definition: hpstrategies.hpp:502
static constexpr MeshSmoother Conforming(bool refineUnrefined=true)
Get a mesh smoother to create a conforming mesh with green refinement as necessary.
Definition: mesh.hpp:273
Exceptions
std::out_of_rangeMay be thrown if length of the estimators is not number of elements in mesh
Template Parameters
MarkingStrategyThe type of the marking strategy to use. The constructor of this type must take the error indicators as the first argument Must be explicitly specified
EstimatorsType of the list of error indicators, must be random access container of the same length as the number of elements on the mesh
ArgsType of extra arguments to pass to the MarkingStrategy constructor
Parameters
estimatorsError indicators for each element in mesh, passed to first argument of MarkingStrategy constructor.
argsExtra arguments to pass to the MarkingStrategy constructor
Returns
Structure denoting changes that occurred to the mesh (but NOT the space polynomial degrees)
See also
MeshSmoother::Conforming

◆ AdaptConformingWithStrategy() [2/3]

template<std::size_t DIM, typename X = double, std::size_t N = 1>
template<typename MarkingStrategy , typename Estimators , typename DiscreteFuncs , typename... Args, typename = typename DiscreteFuncs::value_type>
FEMesh<DIM>::Modifications ptems::HPRefinementStrategy< DIM, X, N >::AdaptConformingWithStrategy ( const Estimators &  estimators,
const DiscreteFuncs &  funcs,
Args...  args 
)
inline

Perform \(hp\)-adaptive refinement on the contained space and mesh using a marking strategy functor object which takes error indicators as the first argument to the constructor with the specified functions defined on the space with mesh smoothing options for conforming meshes (i.e., MeshSmoother::Conforming()).

Convenience method for call to

Adapt(MarkingStrategy{estimators, args...}, estimators, funcs, MeshSmoother::Conforming())
Exceptions
std::out_of_rangeMay be thrown if length of the estimators is not number of elements in mesh
Template Parameters
MarkingStrategyThe type of the marking strategy to use. The constructor of this type must take the error indicators as the first argument Must be explicitly specified
EstimatorsType of the list of error indicators, must be random access container of the same length as the number of elements on the mesh
DiscreteFuncsType of the list of functions, must be random access container.
ArgsType of extra arguments to pass to the MarkingStrategy constructor
Parameters
estimatorsError indicators for each element in mesh, passed to first argument of MarkingStrategy constructor.
funcsList of functions defined on the space to use for the refinement strategy
argsExtra arguments to pass to the MarkingStrategy constructor
Returns
Structure denoting changes that occurred to the mesh (but NOT the space polynomial degrees)
See also
MeshSmoother::Conforming

◆ AdaptConformingWithStrategy() [3/3]

template<std::size_t DIM, typename X = double, std::size_t N = 1>
template<typename MarkingStrategy , typename Estimators , typename... Args>
FEMesh<DIM>::Modifications ptems::HPRefinementStrategy< DIM, X, N >::AdaptConformingWithStrategy ( const Estimators &  estimators,
const DiscreteFunction< DIM, X, N, N > &  func,
Args...  args 
)
inline

Perform \(hp\)-adaptive refinement on the contained space and mesh using a marking strategy functor object which takes error indicators as the first argument to the constructor with the specified function defined on the space with mesh smoothing options for conforming meshes (i.e., MeshSmoother::Conforming()).

Convenience method for call to

Adapt(MarkingStrategy{estimators, args...}, estimators, func, MeshSmoother::Conforming())
Exceptions
std::out_of_rangeMay be thrown if length of the estimators is not number of elements in mesh
Template Parameters
MarkingStrategyThe type of the marking strategy to use. The constructor of this type must take the error indicators as the first argument Must be explicitly specified
EstimatorsType of the list of error indicators, must be random access container of the same length as the number of elements on the mesh
ArgsType of extra arguments to pass to the MarkingStrategy constructor
Parameters
estimatorsError indicators for each element in mesh, passed to first argument of MarkingStrategy constructor.
funcFunction defined on the space to use for the refinement strategy
argsExtra arguments to pass to the MarkingStrategy constructor
Returns
Structure denoting changes that occurred to the mesh (but NOT the space polynomial degrees)
See also
MeshSmoother::Conforming

◆ AdaptWithStrategy() [1/3]

template<std::size_t DIM, typename X = double, std::size_t N = 1>
template<typename MarkingStrategy , typename Estimators , typename DiscreteFuncs , typename... Args, typename = typename DiscreteFuncs::value_type>
FEMesh<DIM>::Modifications ptems::HPRefinementStrategy< DIM, X, N >::AdaptWithStrategy ( const Estimators &  estimators,
const DiscreteFuncs &  funcs,
MeshSmoother  smoother,
Args...  args 
)
inline

Perform \(hp\)-adaptive refinement on the contained space and mesh using a marking strategy functor object which takes error indicators as the first argument to the constructor with the specified functions defined on the space and with the specified mesh smoothing options.

Convenience method for call to

Adapt(MarkingStrategy{estimators, args...}, funcs, estimators, smoother)
Exceptions
std::out_of_rangeMay be thrown if length of the esitmators is not number of elements in mesh
Template Parameters
MarkingStrategyThe type of the marking strategy to use. The constructor of this type must take the error indicators as the first argument Must be explicitly specified
EstimatorsType of the list of error indicators, must be random access container of the same length as the number of elements on the mesh
DiscreteFuncsType of the list of functions, must be random access container.
ArgsType of extra arguments to pass to the MarkingStrategy constructor
Parameters
estimatorsError indicators for each element in mesh, passed to first argument of MarkingStrategy constructor.
funcsList of functions defined on the space to use for the refinement strategy
smootherSpecifies options for smoothing the mesh during refinemnt.
argsExtra arguments to pass to the MarkingStrategy constructor
Returns
Structure denoting changes that occurred to the mesh (but NOT the space polynomial degrees)

◆ AdaptWithStrategy() [2/3]

template<std::size_t DIM, typename X = double, std::size_t N = 1>
template<typename MarkingStrategy , typename Estimators , typename... Args>
FEMesh<DIM>::Modifications ptems::HPRefinementStrategy< DIM, X, N >::AdaptWithStrategy ( const Estimators &  estimators,
const DiscreteFunction< DIM, X, N, N > &  func,
MeshSmoother  smoother,
Args...  args 
)
inline

Perform \(hp\)-adaptive refinement on the contained space and mesh using a marking strategy functor object which takes error indicators as the first argument to the constructor with the specified function defined on the space and with the specified mesh smoothing options.

Convenience method for call to

Adapt(MarkingStrategy{estimators, args...}, func, estimators, smoother)
Exceptions
std::out_of_rangeMay be thrown if length of the esitmators is not number of elements in mesh
Template Parameters
MarkingStrategyThe type of the marking strategy to use. The constructor of this type must take the error indicators as the first argument Must be explicitly specified
EstimatorsType of the list of error indicators, must be random access container of the same length as the number of elements on the mesh
ArgsType of extra arguments to pass to the MarkingStrategy constructor
Parameters
estimatorsError indicators for each element in mesh, passed to first argument of MarkingStrategy constructor.
funcFunction defined on the space to use for the refinement strategy
smootherSpecifies options for smoothing the mesh during refinemnt.
argsExtra arguments to pass to the MarkingStrategy constructor
Returns
Structure denoting changes that occurred to the mesh (but NOT the space polynomial degrees)

◆ AdaptWithStrategy() [3/3]

template<std::size_t DIM, typename X = double, std::size_t N = 1>
template<typename MarkingStrategy , typename Estimators , typename... Args>
FEMesh<DIM>::Modifications ptems::HPRefinementStrategy< DIM, X, N >::AdaptWithStrategy ( const Estimators &  estimators,
MeshSmoother  smoother,
Args...  args 
)
inline

Perform \(hp\)-adaptive refinement on the contained space and mesh using a marking strategy functor object which takes error indicators as the first argument to the constructor and with the specified mesh smoothing options.

Convenience method for call to

Adapt(MarkingStrategy{estimators, args...}, estimators, smoother)
Exceptions
std::out_of_rangeMay be thrown if length of the esitmators is not number of elements in mesh
Template Parameters
MarkingStrategyThe type of the marking strategy to use. The constructor of this type must take the error indicators as the first argument Must be explicitly specified
EstimatorsType of the list of error indicators, must be random access container of the same length as the number of elements on the mesh
ArgsType of extra arguments to pass to the MarkingStrategy constructor
Parameters
estimatorsError indicators for each element in mesh, passed to first argument of MarkingStrategy constructor.
smootherSpecifies options for smoothing the mesh during refinemnt.
argsExtra arguments to pass to the MarkingStrategy constructor
Returns
Structure denoting changes that occurred to the mesh (but NOT the space polynomial degrees)

◆ AdaptWithStrategyAndDefaultSmoothing() [1/3]

template<std::size_t DIM, typename X = double, std::size_t N = 1>
template<typename MarkingStrategy , typename Estimators , typename... Args>
FEMesh<DIM>::Modifications ptems::HPRefinementStrategy< DIM, X, N >::AdaptWithStrategyAndDefaultSmoothing ( const Estimators &  estimators,
Args...  args 
)
inline

Perform \(hp\)-adaptive refinement on the contained space and mesh using a marking strategy functor object which takes error indicators as the first argument to the constructor, and with default mesh smoothing options (default constructed MeshSmoother).

Convenience method for call to

Adapt(MarkingStrategy{estimators, args...}, estimators, MeshSmoother{})
Exceptions
std::out_of_rangeMay be thrown if length of the estimators is not number of elements in mesh
Template Parameters
MarkingStrategyThe type of the marking strategy to use. The constructor of this type must take the error indicators as the first argument Must be explicitly specified
EstimatorsType of the list of error indicators, must be random access container of the same length as the number of elements on the mesh
ArgsType of extra arguments to pass to the MarkingStrategy constructor
Parameters
estimatorsError indicators for each element in mesh, passed to first argument of MarkingStrategy constructor.
argsExtra arguments to pass to the MarkingStrategy constructor
Returns
Structure denoting changes that occurred to the mesh (but NOT the space polynomial degrees)
See also
MeshSmoother::MeshSmoother

◆ AdaptWithStrategyAndDefaultSmoothing() [2/3]

template<std::size_t DIM, typename X = double, std::size_t N = 1>
template<typename MarkingStrategy , typename Estimators , typename DiscreteFuncs , typename... Args, typename = typename DiscreteFuncs::value_type>
FEMesh<DIM>::Modifications ptems::HPRefinementStrategy< DIM, X, N >::AdaptWithStrategyAndDefaultSmoothing ( const Estimators &  estimators,
const DiscreteFuncs &  funcs,
Args...  args 
)
inline

Perform \(hp\)-adaptive refinement on the contained space and mesh using a marking strategy functor object which takes error indicators as the first argument to the constructor with the specified functions defined on the space, and with default mesh smoothing options (default constructed MeshSmoother).

Convenience method for call to

Adapt(MarkingStrategy{estimators, args...}, estimators, funcs, MeshSmoother{})
Exceptions
std::out_of_rangeMay be thrown if length of the estimators is not number of elements in mesh
Template Parameters
MarkingStrategyThe type of the marking strategy to use. The constructor of this type must take the error indicators as the first argument Must be explicitly specified
EstimatorsType of the list of error indicators, must be random access container of the same length as the number of elements on the mesh
DiscreteFuncsType of the list of functions, must be random access container.
ArgsType of extra arguments to pass to the MarkingStrategy constructor
Parameters
estimatorsError indicators for each element in mesh, passed to first argument of MarkingStrategy constructor.
funcsList of functions defined on the space to use for the refinement strategy
argsExtra arguments to pass to the MarkingStrategy constructor
Returns
Structure denoting changes that occurred to the mesh (but NOT the space polynomial degrees)
See also
MeshSmoother::MeshSmoother

◆ AdaptWithStrategyAndDefaultSmoothing() [3/3]

template<std::size_t DIM, typename X = double, std::size_t N = 1>
template<typename MarkingStrategy , typename Estimators , typename... Args>
FEMesh<DIM>::Modifications ptems::HPRefinementStrategy< DIM, X, N >::AdaptWithStrategyAndDefaultSmoothing ( const Estimators &  estimators,
const DiscreteFunction< DIM, X, N, N > &  func,
Args...  args 
)
inline

Perform \(hp\)-adaptive refinement on the contained space and mesh using a marking strategy functor object which takes error indicators as the first argument to the constructor with the specified function defined on the space, and with default mesh smoothing options (default constructed MeshSmoother).

Convenience method for call to

Adapt(MarkingStrategy{estimators, args...}, estimators, func, MeshSmoother{})
Exceptions
std::out_of_rangeMay be thrown if length of the estimators is not number of elements in mesh
Template Parameters
MarkingStrategyThe type of the marking strategy to use. The constructor of this type must take the error indicators as the first argument Must be explicitly specified
EstimatorsType of the list of error indicators, must be random access container of the same length as the number of elements on the mesh
ArgsType of extra arguments to pass to the MarkingStrategy constructor
Parameters
estimatorsError indicators for each element in mesh, passed to first argument of MarkingStrategy constructor.
funcFunction defined on the space to use for the refinement strategy
argsExtra arguments to pass to the MarkingStrategy constructor
Returns
Structure denoting changes that occurred to the mesh (but NOT the space polynomial degrees)
See also
MeshSmoother::MeshSmoother

◆ PostProcessMeshRefine()

template<std::size_t DIM, typename X = double, std::size_t N = 1>
virtual void ptems::HPRefinementStrategy< DIM, X, N >::PostProcessMeshRefine ( [[maybe_unused] ] const HPRefinementData< DIM, X, N > &  data,
[[maybe_unused] ] const typename FEMesh< DIM >::Modifications &  changes,
[[maybe_unused] ] const std::vector< AdaptationType > &  pRefinements 
)
inlineprotectedvirtual

Method called by the adaptation routines after both \(h\)-refinement and \(p\)-refinement.

Can be used to for any post-processing.

Parameters
dataError indicators and functions defined on the mesh
changesModifications performed to the mesh ( \(h\)-refinements)
pRefinementsVector, with one entry per element, denoting the type of \(p\)-adaptation performed (refinement, coarsening, or none)

◆ PostProcessSpaceRefine()

template<std::size_t DIM, typename X = double, std::size_t N = 1>
virtual void ptems::HPRefinementStrategy< DIM, X, N >::PostProcessSpaceRefine ( [[maybe_unused] ] const HPRefinementData< DIM, X, N > &  data,
[[maybe_unused] ] const std::vector< AdaptationType > &  pRefinements 
)
inlineprotectedvirtual

Method called by the adaptation routines after \(p\)-refinement, but before \(h\)-refinement.

Can be used to for any post-processing.

Parameters
dataError indicators and functions defined on the mesh
pRefinementsVector, with one entry per element, denoting the type of \(p\)-adaptation performed (refinement, coarsening, or none)

◆ ShouldPolydegAdapt()

template<std::size_t DIM, typename X = double, std::size_t N = 1>
virtual bool ptems::HPRefinementStrategy< DIM, X, N >::ShouldPolydegAdapt ( const HPRefinementData< DIM, X, N > &  data,
std::size_t  element,
bool  refine 
)
protectedpure virtual

Method called by the adaptation routines to decide if \(p\)-refinement should be performed for an element.

Parameters
dataError indicators and functions defiend on the mesh
elementIndex of the element
refinetrue if performing refinement of element, false if performing coarsening
Returns
true to perform \(p\)-refinement (or derefinement); false to perform \(h\)-refinement

◆ Space()

template<std::size_t DIM, typename X = double, std::size_t N = 1>
const PDiscreteFunctionSpace<DIM, X, N>& ptems::HPRefinementStrategy< DIM, X, N >::Space ( )
inline

Gets the finite element space the refinement strategy is on.


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