SheafSystem  0.0.0.0
fields::variance_bound_refinement_policy Class Reference

A policy that determines a zone should be refined if the variance using the L1 norm of any discretization member exceeds a given upper bound. More...

#include <variance_bound_refinement_policy.h>

Inheritance diagram for fields::variance_bound_refinement_policy:
fields::field_refinement_policy sheaf::any

VARIANCE_BOUND_REFINEMENT_POLICY FACET

sec_vd_value_type _variance_ub
 The upper bound on the variance. More...
 
 variance_bound_refinement_policy (size_type xrefinement_level_ub=2, sec_vd_value_type xvariance_ub=1.0e-10)
 Creates an instance with refinement bound xrefinement_ub and variance bound xvariance_ub. More...
 
 variance_bound_refinement_policy (const variance_bound_refinement_policy &xother)
 Copy constructor. More...
 
virtual ~variance_bound_refinement_policy ()
 Destructor. More...
 
sec_vd_value_type variance_ub () const
 The upper bound on the variance of the dofs of a cell. More...
 
void put_variance_ub (sec_vd_value_type xub)
 Sets variance_ub to xub. More...
 

FIELD_REFINEMENT_POLICY FACET

virtual bool should_refine (field_refinement_buffer &xbuffer, size_type xrefinement_depth) const
 True if the zone specified by xzone_id should be refined. More...
 
virtual const std::string & class_name () const
 The class name of this. More...
 
static const std::string & static_class_name ()
 The class name of this class. More...
 

ANY FACET

virtual bool is_ancestor_of (const any *other) const
 Conformance test; true if other conforms to this. More...
 
virtual variance_bound_refinement_policyclone () const
 Virtual constructor, makes a new instance of the same type as this. More...
 
virtual variance_bound_refinement_policyoperator= (const field_refinement_policy &xother)
 Assignment operator. More...
 
variance_bound_refinement_policyoperator= (const variance_bound_refinement_policy &xother)
 Assignment operator. More...
 
virtual bool invariant () const
 Class invariant. More...
 

Additional Inherited Members

- Public Member Functions inherited from fields::field_refinement_policy
virtual ~field_refinement_policy ()
 Destructor. More...
 
size_type refinement_depth_ub () const
 The upper bound on the refinement depth of a cell. A cell will not be refined if its refinement depth is equal to or greater than the upper bound. More...
 
void put_refinement_depth_ub (size_type xub)
 Set the refinement depth upper bound to xub. More...
 
- Public Member Functions inherited from sheaf::any
bool is_same_type (const any *other) const
 True if other is the same type as this. More...
 
virtual ~any ()
 Destructor. More...
 
bool invariant_check () const
 True if invariant checking is enabled. More...
 
void enable_invariant_check () const
 Enable invariant checking. More...
 
void disable_invariant_check () const
 Disable invariant check. Intended for preventing recursive calls to invariant and for suppressing invariant checking during multi-phase initialization. More...
 
int disable_invariance_check_request_depth () const
 Number of times disable_invariant_check has been called without matching call to enable_invariant_check. More...
 
- Static Public Member Functions inherited from fields::field_refinement_policy
static const std::string & static_class_name ()
 The class name of this class. More...
 
static field_refinement_policynew_policy (const std::string &xname)
 Creates an instance of the policy with class name xname. More...
 
static factory< field_refinement_policy > & policy_factory ()
 A factory for making policy objects. More...
 
- Protected Member Functions inherited from fields::field_refinement_policy
 field_refinement_policy (size_type xrefinement_depth_ub)
 Creates an instance with reinement upper bound xrefinement_ub. More...
 
 field_refinement_policy (const field_refinement_policy &xother)
 Copy constructor. More...
 
- Protected Member Functions inherited from sheaf::any
 any ()
 default constructor More...
 
- Protected Attributes inherited from fields::field_refinement_policy
size_type _refinement_depth_ub
 The upper bound and the refinement level of a cell. More...
 

Detailed Description

A policy that determines a zone should be refined if the variance using the L1 norm of any discretization member exceeds a given upper bound.

Definition at line 42 of file variance_bound_refinement_policy.h.

Constructor & Destructor Documentation

◆ variance_bound_refinement_policy() [1/2]

fields::variance_bound_refinement_policy::variance_bound_refinement_policy ( size_type  xrefinement_level_ub = 2,
sec_vd_value_type  xvariance_ub = 1.0e-10 
)

Creates an instance with refinement bound xrefinement_ub and variance bound xvariance_ub.

Postcondition

Definition at line 39 of file variance_bound_refinement_policy.cc.

References invariant(), and fields::field_refinement_policy::refinement_depth_ub().

Referenced by clone(), and put_variance_ub().

◆ variance_bound_refinement_policy() [2/2]

fields::variance_bound_refinement_policy::variance_bound_refinement_policy ( const variance_bound_refinement_policy xother)

Copy constructor.

Postcondition

Definition at line 64 of file variance_bound_refinement_policy.cc.

References invariant(), and ~variance_bound_refinement_policy().

◆ ~variance_bound_refinement_policy()

fields::variance_bound_refinement_policy::~variance_bound_refinement_policy ( )
virtual

Destructor.

Definition at line 84 of file variance_bound_refinement_policy.cc.

References variance_ub().

Referenced by variance_bound_refinement_policy().

Member Function Documentation

◆ class_name()

const std::string & fields::variance_bound_refinement_policy::class_name ( ) const
virtual

The class name of this.

Reimplemented from fields::field_refinement_policy.

Definition at line 263 of file variance_bound_refinement_policy.cc.

References static_class_name().

Referenced by should_refine().

◆ clone()

fields::variance_bound_refinement_policy * fields::variance_bound_refinement_policy::clone ( ) const
virtual

Virtual constructor, makes a new instance of the same type as this.

Postcondition
  • result != 0
  • is_same_type(result)

Implements fields::field_refinement_policy.

Definition at line 330 of file variance_bound_refinement_policy.cc.

References sheaf::any::is_same_type(), operator=(), and variance_bound_refinement_policy().

Referenced by is_ancestor_of().

◆ invariant()

bool fields::variance_bound_refinement_policy::invariant ( ) const
virtual

◆ is_ancestor_of()

bool fields::variance_bound_refinement_policy::is_ancestor_of ( const any other) const
virtual

Conformance test; true if other conforms to this.

Precondition
  • other != 0

Reimplemented from fields::field_refinement_policy.

Definition at line 310 of file variance_bound_refinement_policy.cc.

References clone().

Referenced by operator=(), and static_class_name().

◆ operator=() [1/2]

fields::variance_bound_refinement_policy & fields::variance_bound_refinement_policy::operator= ( const field_refinement_policy xother)
virtual

Assignment operator.

Precondition
  • is_ancestor_of(&xother)
Not Implemented.
Postcondition

Reimplemented from fields::field_refinement_policy.

Definition at line 353 of file variance_bound_refinement_policy.cc.

References invariant(), and is_ancestor_of().

Referenced by clone().

◆ operator=() [2/2]

fields::variance_bound_refinement_policy & fields::variance_bound_refinement_policy::operator= ( const variance_bound_refinement_policy xother)

Assignment operator.

Postcondition

Definition at line 375 of file variance_bound_refinement_policy.cc.

References fields::field_refinement_policy::_refinement_depth_ub, _variance_ub, and invariant().

◆ put_variance_ub()

void fields::variance_bound_refinement_policy::put_variance_ub ( sec_vd_value_type  xub)

Sets variance_ub to xub.

Precondition
  • xub > 0.0
Postcondition

Definition at line 109 of file variance_bound_refinement_policy.cc.

References _variance_ub, fields::field_refinement_policy::policy_factory(), should_refine(), static_class_name(), variance_bound_refinement_policy(), and variance_ub().

Referenced by variance_ub().

◆ should_refine()

◆ static_class_name()

const std::string & fields::variance_bound_refinement_policy::static_class_name ( )
static

The class name of this class.

Definition at line 283 of file variance_bound_refinement_policy.cc.

References is_ancestor_of().

Referenced by class_name(), and put_variance_ub().

◆ variance_ub()

fiber_bundle::sec_vd_value_type fields::variance_bound_refinement_policy::variance_ub ( ) const

The upper bound on the variance of the dofs of a cell.

Definition at line 102 of file variance_bound_refinement_policy.cc.

References _variance_ub, and put_variance_ub().

Referenced by put_variance_ub(), and ~variance_bound_refinement_policy().

Member Data Documentation

◆ _variance_ub

sec_vd_value_type fields::variance_bound_refinement_policy::_variance_ub
protected

The upper bound on the variance.

Definition at line 85 of file variance_bound_refinement_policy.h.

Referenced by operator=(), put_variance_ub(), should_refine(), and variance_ub().


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