SheafSystem  0.0.0.0
fields::edge_centered_polygon_refiner Class Referenceabstract

An abstract field refiner that subdivides a polygon by introducing new vertices into the centers of the edges. More...

#include <edge_centered_polygon_refiner.h>

Inheritance diagram for fields::edge_centered_polygon_refiner:
fields::local_field_refiner sheaf::any fields::barycentric_quad_refiner fields::barycentric_triangle_refiner fields::edge_centered_triangle_refiner

EDGE_CENTERED_POLYGON_REFINER FACET

typedef std::list< scoped_indexvertex_list_type
 The type of buffer used for processing vertices. More...
 
block< scoped_index_vertex_ids
 The ids of the vertices in boundary <= new refinement depth. More...
 
block< bool > _is_new_vertex
 True if i-th member is a new vertex. More...
 
block< vertex_list_type::iterator > _vertex_pos
 The position in _vertex_list of ids of the vertices in the currnet refinement. More...
 
vertex_list_type _vertex_list
 List for processing vertices. More...
 
scoped_index _zone_ctr_id
 The id of the new vertex in the center of the zone. More...
 
 edge_centered_polygon_refiner (const field_refinement_policy &xpolicy)
 Creates an instance for refining base space xbase_space using policy xpolicy. More...
 
 edge_centered_polygon_refiner (const edge_centered_polygon_refiner &xother)
 Copy constructor. More...
 
virtual size_type unrefined_vertex_ct () const =0
 The number of vertices with refinement depth <= unrefined zone depth. More...
 
size_type refined_vertex_ct () const
 The number of boundary vertices with refinement depth <= refined zone depth; does not include center vertex, if one exists. More...
 
size_type edge_ct () const
 The number of edges in the zone. More...
 
virtual bool is_zone_centered_refiner () const =0
 True if this adds a vertex at the center of the zone. More...
 
 edge_centered_polygon_refiner ()
 Default constructor; disabled. More...
 
void reserve_vertex_buffers ()
 Reserves space in vertex buffers. More...
 
virtual void refine_base_space (field_refinement_buffer &xbuffer)
 Refines the base space or the target. More...
 
virtual void modify_crg (field_refinement_buffer &xbuffer)
 Modifies the cover relation graph of the base space. More...
 
void modify_subposets (field_refinement_buffer &xbuffer)
 Modifies subposets in the base space. More...
 
virtual void refine_coordinates (field_refinement_buffer &xbuffer)
 Refines the coordinates of the target. More...
 
pod_index_type create_edge_center (base_space_poset &xbase, const scoped_index &xzone_id, int xdepth, const scoped_index &xprev_mbr_id, const scoped_index &xmbr_id)
 Creates a new edge center vextex and puts it in _new_point_ids[xid]. More...
 
void make_new_vertices (field_refinement_buffer &xbuffer)
 Makes new vertices in edge centers as needed and builds the list of vertices in the boundary of the zone. More...
 
virtual const block< size_type > & first_vertex_index () const =0
 The index in _vertex_pos of the first vertex of each new zone; contains number of zones + 1 because first entry is duplicated at the end. More...
 
void make_new_zones (field_refinement_buffer &xbuffer)
 Make the new zones in the refinement. More...
 

LOCAL_FIELD_REFINER FACET

virtual int db () const
 The base dimension; the dimension of the local coordinates (independent variable). More...
 

ANY FACET

virtual edge_centered_polygon_refinerclone () const =0
 Virtual constructor, creates a new instance of the same type as this. More...
 
virtual edge_centered_polygon_refineroperator= (const local_field_refiner &xother)
 Assignment operator. More...
 
edge_centered_polygon_refineroperator= (const edge_centered_polygon_refiner &xother)
 Assignment operator. More...
 
virtual ~edge_centered_polygon_refiner ()
 Destructor. More...
 
virtual bool invariant () const
 Class invariant. More...
 
virtual bool is_ancestor_of (const any *xother) const
 Conformance test; true if other conforms to this. More...
 

Additional Inherited Members

- Public Member Functions inherited from fields::local_field_refiner
virtual ~local_field_refiner ()
 Destructor. More...
 
virtual const std::string & zone_type_name () const =0
 The name of the type of zone this creates during refinement. More...
 
virtual const std::string & vertex_type_name () const
 The name of the type of vertex this creates during refinement. More...
 
const field_refinement_policypolicy () const
 The refinement policy for this refiner. More...
 
void refine (field_refinement_buffer &xbuffer)
 Refines the zone specified by xbuffer.zone_id one level and evaluates the coordinates section on the refined zone. More...
 
virtual size_type refined_zone_ct () const =0
 The number of refined zones created by this. More...
 
const block< scoped_index > & refined_zone_ids () const
 The member ids of the zones created by the most recent execution of refine(). More...
 
virtual const chart_point_coord_typelocal_coordinates_map (size_type xi) const =0
 The affine map from the local coordinates of refined zone xi the the local coordinates of the parent zone. Specifically, u_parent[i] = result[i*(db()+1) + j]*u[j] + result[i*(db()+1) + db()]; sum convention on 0 <= j < db(). 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...
 
- Protected Member Functions inherited from fields::local_field_refiner
 local_field_refiner ()
 Default constructor; disabled. More...
 
 local_field_refiner (const local_field_refiner &xother)
 Copy constructor. More...
 
 local_field_refiner (const field_refinement_policy &xpolicy)
 Creates an instance for refining xtarget using xsource as the reference field. More...
 
void initialize_buffers ()
 Initializes the dof tuple and refined zone buffers. More...
 
pod_index_type create_vertex (base_space_poset &xbase, int xdepth)
 Creates a new vertex at depth xdepth. More...
 
pod_index_type create_zone (base_space_poset &xbase, int xdepth)
 Creates a new quadrangle in base space xbase, with refinement depth xdepth. More...
 
- Protected Member Functions inherited from sheaf::any
 any ()
 default constructor More...
 
- Protected Attributes inherited from fields::local_field_refiner
const field_refinement_policy_policy
 The refinement policy. More...
 
block< scoped_index_point_dof_tuple_ids
 The dof tuple index for point cells at various depths. More...
 
block< scoped_index_zone_dof_tuple_ids
 The dof tuple index for quadrangle cells at various depths. More...
 
block< scoped_index_refined_zone_ids
 The member ids of the zones created by the most recent execution of refine(). More...
 

Detailed Description

An abstract field refiner that subdivides a polygon by introducing new vertices into the centers of the edges.

Definition at line 43 of file edge_centered_polygon_refiner.h.

Member Typedef Documentation

◆ vertex_list_type

The type of buffer used for processing vertices.

Definition at line 104 of file edge_centered_polygon_refiner.h.

Constructor & Destructor Documentation

◆ edge_centered_polygon_refiner() [1/3]

fields::edge_centered_polygon_refiner::edge_centered_polygon_refiner ( const field_refinement_policy xpolicy)
protected

Creates an instance for refining base space xbase_space using policy xpolicy.

Postcondition

Definition at line 49 of file edge_centered_polygon_refiner.cc.

References _zone_ctr_id, edge_centered_polygon_refiner(), sheaf::scoped_index::invalidate(), invariant(), fields::local_field_refiner::policy(), and reserve_vertex_buffers().

◆ edge_centered_polygon_refiner() [2/3]

fields::edge_centered_polygon_refiner::edge_centered_polygon_refiner ( const edge_centered_polygon_refiner xother)
protected

Copy constructor.

Not Implemented.

Postcondition

Definition at line 70 of file edge_centered_polygon_refiner.cc.

References invariant(), and unrefined_vertex_ct().

◆ edge_centered_polygon_refiner() [3/3]

fields::edge_centered_polygon_refiner::edge_centered_polygon_refiner ( )
protected

Default constructor; disabled.

Not Implemented.

Postcondition

Definition at line 183 of file edge_centered_polygon_refiner.cc.

References invariant(), and reserve_vertex_buffers().

Referenced by edge_centered_polygon_refiner(), and is_zone_centered_refiner().

◆ ~edge_centered_polygon_refiner()

fields::edge_centered_polygon_refiner::~edge_centered_polygon_refiner ( )
virtual

Destructor.

Postcondition

Definition at line 1001 of file edge_centered_polygon_refiner.cc.

References invariant().

Referenced by operator=().

Member Function Documentation

◆ clone()

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

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

Is Abstract.

Postcondition
  • result != 0
  • is_same_type(result)

Implements fields::local_field_refiner.

Implemented in fields::edge_centered_triangle_refiner, fields::barycentric_triangle_refiner, and fields::barycentric_quad_refiner.

Definition at line 938 of file edge_centered_polygon_refiner.cc.

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

Referenced by db().

◆ create_edge_center()

sheaf::pod_index_type fields::edge_centered_polygon_refiner::create_edge_center ( base_space_poset xbase,
const scoped_index xzone_id,
int  xdepth,
const scoped_index xprev_mbr_id,
const scoped_index xmbr_id 
)
protected

Creates a new edge center vextex and puts it in _new_point_ids[xid].

Precondition
  • xbase.in_jim_edit_mode()
  • xbase.contains_member(xzone_id)
  • xzone_id.same_scope(xbase.member_hub_id_space(false))
  • xprev_mbr_id.same_scope(xbase.member_hub_id_space(false))
  • xmbr_id.same_scope(xbase.member_hub_id_space(false))
Postcondition
  • xbase.contains_member(result)
  • xbase.refinement_depth(result) == xdepth
  • -unexecutable( xbase.contains_cover_link(result, BOTTOM_INDEX) )

Definition at line 474 of file edge_centered_polygon_refiner.cc.

References sheaf::poset_state_handle::contains_member(), fields::local_field_refiner::create_vertex(), sheaf::poset_state_handle::first_cover_member(), sheaf::poset_state_handle::get_cover_id_space_iterator(), sheaf::index_space_iterator::hub_pod(), sheaf::poset_state_handle::in_jim_edit_mode(), sheaf::poset_state_handle::insert_cover_member(), sheaf::index_space_iterator::is_done(), sheaf::LOWER, make_new_vertices(), sheaf::poset_state_handle::member_hub_id_space(), sheaf::index_space_iterator::next(), sheaf::scoped_index::pod(), fiber_bundle::base_space_poset::refinement_depth(), sheaf::poset_state_handle::release_cover_id_space_iterator(), sheaf::scoped_index::same_scope(), and sheaf::UPPER.

Referenced by make_new_vertices(), and refine_coordinates().

◆ db()

int fields::edge_centered_polygon_refiner::db ( ) const
virtual

The base dimension; the dimension of the local coordinates (independent variable).

Postcondition
  • result == 2

Implements fields::local_field_refiner.

Definition at line 909 of file edge_centered_polygon_refiner.cc.

References clone().

Referenced by make_new_zones().

◆ edge_ct()

sheaf::size_type fields::edge_centered_polygon_refiner::edge_ct ( ) const
protected

The number of edges in the zone.

Postcondition

Definition at line 138 of file edge_centered_polygon_refiner.cc.

References is_zone_centered_refiner(), and unrefined_vertex_ct().

Referenced by refine_coordinates(), and refined_vertex_ct().

◆ first_vertex_index()

const sheaf::block< sheaf::size_type > & fields::edge_centered_polygon_refiner::first_vertex_index ( ) const
protectedpure virtual

The index in _vertex_pos of the first vertex of each new zone; contains number of zones + 1 because first entry is duplicated at the end.

Is Abstract.

Postcondition
  • result.ct() > 1

Implemented in fields::edge_centered_triangle_refiner, fields::barycentric_triangle_refiner, and fields::barycentric_quad_refiner.

Definition at line 773 of file edge_centered_polygon_refiner.cc.

References sheaf::auto_block< T, S >::ct(), and make_new_zones().

Referenced by make_new_vertices(), and make_new_zones().

◆ invariant()

◆ is_ancestor_of()

bool fields::edge_centered_polygon_refiner::is_ancestor_of ( const any xother) const
virtual

Conformance test; true if other conforms to this.

Precondition
  • xother != 0

Reimplemented from fields::local_field_refiner.

Reimplemented in fields::edge_centered_triangle_refiner, fields::barycentric_triangle_refiner, and fields::barycentric_quad_refiner.

Definition at line 1047 of file edge_centered_polygon_refiner.cc.

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

◆ is_zone_centered_refiner()

bool fields::edge_centered_polygon_refiner::is_zone_centered_refiner ( ) const
protectedpure virtual

◆ make_new_vertices()

◆ make_new_zones()

◆ modify_crg()

void fields::edge_centered_polygon_refiner::modify_crg ( field_refinement_buffer xbuffer)
protectedvirtual

Modifies the cover relation graph of the base space.

Precondition
  • xbuffer.base_space != 0
  • xbuffer.base_space->in_jim_edit_mode()
Postcondition

Reimplemented in fields::edge_centered_triangle_refiner.

Definition at line 251 of file edge_centered_polygon_refiner.cc.

References fields::local_field_refiner::_refined_zone_ids, fields::field_refinement_buffer::base_space, sheaf::auto_block< T, S >::ct(), sheaf::poset_state_handle::in_jim_edit_mode(), make_new_vertices(), make_new_zones(), modify_subposets(), and fields::local_field_refiner::refined_zone_ct().

Referenced by refine_base_space().

◆ modify_subposets()

void fields::edge_centered_polygon_refiner::modify_subposets ( field_refinement_buffer xbuffer)
protected

Modifies subposets in the base space.

Precondition
  • xbuffer.base_space != 0
Issue:
There's subtle question here: what defines the membership of the elements subposet? For instance, is it all the triangle shaped cells, or just the finest ones that are also jims? We're following the latter definition. The elements subposet is frequently used as an evaluation subposet and we don't want non-jims showing up as evaluators.
Issue:
is this producing some sort of efficiency problem by scattering dofs allocated on this sequence id?

Definition at line 275 of file edge_centered_polygon_refiner.cc.

References _is_new_vertex, fields::local_field_refiner::_refined_zone_ids, _vertex_ids, _zone_ctr_id, fields::field_refinement_buffer::base_space, fields::field_refinement_buffer::coord_disc_seq_id_space, sheaf::auto_block< T, S >::ct(), fiber_bundle::base_space_poset::elements(), fields::field_refinement_buffer::elements_id_space, sheaf::scattered_insertion_index_space_handle::insert(), sheaf::subposet::insert_member(), is_zone_centered_refiner(), sheaf::explicit_index_space_handle::pod(), sheaf::gathered_insertion_index_space_handle::push_back(), refine_coordinates(), sheaf::gathered_insertion_index_space_handle::remove(), sheaf::subposet::remove_member(), fiber_bundle::base_space_poset::vertices(), fields::field_refinement_buffer::vertices_id_space, and fields::field_refinement_buffer::zone_id.

Referenced by modify_crg(), and refine_base_space().

◆ operator=() [1/2]

fields::edge_centered_polygon_refiner & fields::edge_centered_polygon_refiner::operator= ( const local_field_refiner xother)
virtual

Assignment operator.

Precondition
  • is_ancestor_of(&xother)
Not Implemented.
Postcondition

Reimplemented from fields::local_field_refiner.

Reimplemented in fields::edge_centered_triangle_refiner, fields::barycentric_triangle_refiner, and fields::barycentric_quad_refiner.

Definition at line 960 of file edge_centered_polygon_refiner.cc.

References invariant(), and is_ancestor_of().

Referenced by clone().

◆ operator=() [2/2]

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

Assignment operator.

Precondition
  • is_ancestor_of(&xother)
Not Implemented.
Postcondition

Definition at line 980 of file edge_centered_polygon_refiner.cc.

References invariant(), is_ancestor_of(), and ~edge_centered_polygon_refiner().

◆ refine_base_space()

void fields::edge_centered_polygon_refiner::refine_base_space ( field_refinement_buffer xbuffer)
protectedvirtual

Refines the base space or the target.

Precondition
  • xbuffer.base_space != 0
  • xbuffer.base_space->in_jim_edit_mode()

Implements fields::local_field_refiner.

Definition at line 225 of file edge_centered_polygon_refiner.cc.

References fields::field_refinement_buffer::base_space, sheaf::poset_state_handle::in_jim_edit_mode(), modify_crg(), and modify_subposets().

Referenced by reserve_vertex_buffers().

◆ refine_coordinates()

◆ refined_vertex_ct()

sheaf::size_type fields::edge_centered_polygon_refiner::refined_vertex_ct ( ) const
protected

The number of boundary vertices with refinement depth <= refined zone depth; does not include center vertex, if one exists.

Postcondition
  • result == 2*unrefined_vertex_ct()

Definition at line 110 of file edge_centered_polygon_refiner.cc.

References edge_ct(), and unrefined_vertex_ct().

Referenced by make_new_vertices(), and unrefined_vertex_ct().

◆ reserve_vertex_buffers()

void fields::edge_centered_polygon_refiner::reserve_vertex_buffers ( )
protected

◆ unrefined_vertex_ct()

sheaf::size_type fields::edge_centered_polygon_refiner::unrefined_vertex_ct ( ) const
protectedpure virtual

The number of vertices with refinement depth <= unrefined zone depth.

Is Abstract.

Postcondition
  • result > 0

Implemented in fields::edge_centered_triangle_refiner, fields::barycentric_triangle_refiner, and fields::barycentric_quad_refiner.

Definition at line 88 of file edge_centered_polygon_refiner.cc.

References refined_vertex_ct().

Referenced by edge_centered_polygon_refiner(), edge_ct(), and refined_vertex_ct().

Member Data Documentation

◆ _is_new_vertex

block<bool> fields::edge_centered_polygon_refiner::_is_new_vertex
protected

True if i-th member is a new vertex.

Definition at line 99 of file edge_centered_polygon_refiner.h.

Referenced by make_new_vertices(), modify_subposets(), refine_coordinates(), and reserve_vertex_buffers().

◆ _vertex_ids

block<scoped_index> fields::edge_centered_polygon_refiner::_vertex_ids
protected

The ids of the vertices in boundary <= new refinement depth.

Definition at line 94 of file edge_centered_polygon_refiner.h.

Referenced by make_new_vertices(), fields::edge_centered_triangle_refiner::modify_crg(), modify_subposets(), refine_coordinates(), and reserve_vertex_buffers().

◆ _vertex_list

vertex_list_type fields::edge_centered_polygon_refiner::_vertex_list
protected

List for processing vertices.

Definition at line 115 of file edge_centered_polygon_refiner.h.

Referenced by make_new_vertices(), and make_new_zones().

◆ _vertex_pos

block<vertex_list_type::iterator> fields::edge_centered_polygon_refiner::_vertex_pos
protected

The position in _vertex_list of ids of the vertices in the currnet refinement.

Definition at line 110 of file edge_centered_polygon_refiner.h.

Referenced by make_new_vertices(), make_new_zones(), and reserve_vertex_buffers().

◆ _zone_ctr_id

scoped_index fields::edge_centered_polygon_refiner::_zone_ctr_id
protected

The id of the new vertex in the center of the zone.

Definition at line 120 of file edge_centered_polygon_refiner.h.

Referenced by edge_centered_polygon_refiner(), make_new_vertices(), make_new_zones(), modify_subposets(), and refine_coordinates().


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