SheafSystem  0.0.0.0
fields::field_refinement_policy Class Referenceabstract

An abstract policy that determines the conditions under which a zone should be refined. More...

#include <field_refinement_policy.h>

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

FIELD_REFINEMENT_POLICY FACET

size_type _refinement_depth_ub
 The upper bound and the refinement level of a cell. More...
 
virtual ~field_refinement_policy ()
 Destructor. More...
 
virtual bool should_refine (field_refinement_buffer &xbuffer, size_type xrefinement_depth) const =0
 True if the zone specified by xzone_id should be refined. 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...
 
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...
 
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...
 
 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...
 

ANY FACET

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

Additional Inherited Members

- 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...
 
- Protected Member Functions inherited from sheaf::any
 any ()
 default constructor More...
 

Detailed Description

An abstract policy that determines the conditions under which a zone should be refined.

Definition at line 53 of file field_refinement_policy.h.

Constructor & Destructor Documentation

◆ ~field_refinement_policy()

fields::field_refinement_policy::~field_refinement_policy ( )
virtual

Destructor.

Definition at line 76 of file field_refinement_policy.cc.

References should_refine().

Referenced by field_refinement_policy().

◆ field_refinement_policy() [1/2]

fields::field_refinement_policy::field_refinement_policy ( size_type  xrefinement_depth_ub)
protected

Creates an instance with reinement upper bound xrefinement_ub.

Postcondition

Definition at line 38 of file field_refinement_policy.cc.

References invariant(), and refinement_depth_ub().

◆ field_refinement_policy() [2/2]

fields::field_refinement_policy::field_refinement_policy ( const field_refinement_policy xother)
protected

Copy constructor.

Postcondition

Definition at line 56 of file field_refinement_policy.cc.

References invariant(), and ~field_refinement_policy().

Member Function Documentation

◆ class_name()

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

◆ clone()

virtual field_refinement_policy* fields::field_refinement_policy::clone ( ) const
pure virtual

◆ invariant()

◆ is_ancestor_of()

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

Conformance test; true if other conforms to this.

Precondition
  • other != 0

Reimplemented from sheaf::any.

Reimplemented in fields::variance_bound_refinement_policy, fields::zone_centered_error_bound_refinement_policy, and fields::depth_bound_refinement_policy.

Definition at line 232 of file field_refinement_policy.cc.

References operator=().

Referenced by policy_factory().

◆ new_policy()

fields::field_refinement_policy * fields::field_refinement_policy::new_policy ( const std::string &  xname)
static

Creates an instance of the policy with class name xname.

Precondition
Postcondition
  • result != 0
  • -unexecutable( "result is default constructed" )

Definition at line 181 of file field_refinement_policy.cc.

References policy_factory().

Referenced by fields::field_refiner::field_refiner(), and static_class_name().

◆ operator=()

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

◆ policy_factory()

◆ put_refinement_depth_ub()

void fields::field_refinement_policy::put_refinement_depth_ub ( size_type  xub)

Set the refinement depth upper bound to xub.

Postcondition

Definition at line 124 of file field_refinement_policy.cc.

References _refinement_depth_ub, class_name(), and refinement_depth_ub().

Referenced by refinement_depth_ub().

◆ refinement_depth_ub()

◆ should_refine()

bool fields::field_refinement_policy::should_refine ( field_refinement_buffer xbuffer,
size_type  xrefinement_depth 
) const
pure virtual

True if the zone specified by xzone_id should be refined.

Precondition
  • xbuffer.target.state_is_read_accessible()
  • xbuffer.source.state_is_read_accessible()
Is Abstract.
Postcondition

Implemented in fields::variance_bound_refinement_policy, fields::zone_centered_error_bound_refinement_policy, and fields::depth_bound_refinement_policy.

Definition at line 93 of file field_refinement_policy.cc.

References refinement_depth_ub(), fields::field_refinement_buffer::source, fields::field_vd::state_is_read_accessible(), and fields::field_refinement_buffer::target.

Referenced by fields::refining_section_pusher::push(), fields::field_refiner::refine(), and ~field_refinement_policy().

◆ static_class_name()

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

The class name of this class.

Definition at line 161 of file field_refinement_policy.cc.

References new_policy().

Referenced by class_name().

Member Data Documentation

◆ _refinement_depth_ub


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