SheafSystem
0.0.0.0
|
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>
EDGE_CENTERED_POLYGON_REFINER FACET | |
typedef std::list< scoped_index > | vertex_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_refiner * | clone () const =0 |
Virtual constructor, creates a new instance of the same type as this. More... | |
virtual edge_centered_polygon_refiner & | operator= (const local_field_refiner &xother) |
Assignment operator. More... | |
edge_centered_polygon_refiner & | operator= (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_policy & | policy () 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_type * | local_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... | |
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.
|
protected |
The type of buffer used for processing vertices.
Definition at line 104 of file edge_centered_polygon_refiner.h.
|
protected |
Creates an instance for refining base space xbase_space using policy xpolicy.
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().
|
protected |
Copy constructor.
Not Implemented.
Definition at line 70 of file edge_centered_polygon_refiner.cc.
References invariant(), and unrefined_vertex_ct().
|
protected |
Default constructor; disabled.
Not Implemented.
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().
|
virtual |
Destructor.
Definition at line 1001 of file edge_centered_polygon_refiner.cc.
References invariant().
Referenced by operator=().
|
pure virtual |
Virtual constructor, creates a new instance of the same type as this.
Is Abstract.
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().
|
protected |
Creates a new edge center vextex and puts it in _new_point_ids[xid].
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().
|
virtual |
The base dimension; the dimension of the local coordinates (independent variable).
Implements fields::local_field_refiner.
Definition at line 909 of file edge_centered_polygon_refiner.cc.
References clone().
Referenced by make_new_zones().
|
protected |
The number of edges in the zone.
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().
|
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.
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().
|
virtual |
Class invariant.
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 1017 of file edge_centered_polygon_refiner.cc.
References sheaf::any::disable_invariant_check(), sheaf::any::enable_invariant_check(), fields::local_field_refiner::invariant(), sheaf::any::invariant_check(), and is_ancestor_of().
Referenced by clone(), edge_centered_polygon_refiner(), fields::barycentric_quad_refiner::invariant(), fields::barycentric_triangle_refiner::invariant(), operator=(), and ~edge_centered_polygon_refiner().
|
virtual |
Conformance test; true if other conforms to this.
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=().
|
protectedpure virtual |
True if this adds a vertex at the center of the zone.
Is Abstract.
Implemented in fields::edge_centered_triangle_refiner, fields::barycentric_triangle_refiner, and fields::barycentric_quad_refiner.
Definition at line 163 of file edge_centered_polygon_refiner.cc.
References edge_centered_polygon_refiner().
Referenced by edge_ct(), make_new_vertices(), make_new_zones(), modify_subposets(), and refine_coordinates().
|
protected |
Makes new vertices in edge centers as needed and builds the list of vertices in the boundary of the zone.
Definition at line 601 of file edge_centered_polygon_refiner.cc.
References _is_new_vertex, _vertex_ids, _vertex_list, _vertex_pos, _zone_ctr_id, fields::field_refinement_buffer::base_space, create_edge_center(), fields::local_field_refiner::create_vertex(), sheaf::auto_block< T, S >::ct(), first_vertex_index(), sheaf::index_space_iterator::hub_pod(), sheaf::poset_state_handle::in_jim_edit_mode(), sheaf::index_space_iterator::is_done(), is_zone_centered_refiner(), sheaf::LOWER, sheaf::index_space_iterator::next(), sheaf::scoped_index::pod(), sheaf::auto_block< T, S >::pop_back(), sheaf::auto_block< T, S >::push_back(), refined_vertex_ct(), sheaf::index_space_iterator::reset(), sheaf::auto_block< T, S >::set_ct(), sheaf::UPPER, and fields::field_refinement_buffer::zone_id.
Referenced by create_edge_center(), fields::edge_centered_triangle_refiner::modify_crg(), and modify_crg().
|
protected |
Make the new zones in the refinement.
Definition at line 795 of file edge_centered_polygon_refiner.cc.
References fields::local_field_refiner::_refined_zone_ids, _vertex_list, _vertex_pos, _zone_ctr_id, fields::field_refinement_buffer::base_space, fields::local_field_refiner::create_zone(), sheaf::auto_block< T, S >::ct(), db(), first_vertex_index(), sheaf::poset_state_handle::in_jim_edit_mode(), is_zone_centered_refiner(), sheaf::auto_block< T, S >::push_back(), sheaf::auto_block< T, S >::set_ct(), and fields::field_refinement_buffer::zone_id.
Referenced by first_vertex_index(), fields::edge_centered_triangle_refiner::modify_crg(), and modify_crg().
|
protectedvirtual |
Modifies the cover relation graph of the base space.
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().
|
protected |
Modifies subposets in the base space.
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().
|
virtual |
Assignment operator.
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().
fields::edge_centered_polygon_refiner & fields::edge_centered_polygon_refiner::operator= | ( | const edge_centered_polygon_refiner & | xother | ) |
Assignment operator.
Definition at line 980 of file edge_centered_polygon_refiner.cc.
References invariant(), is_ancestor_of(), and ~edge_centered_polygon_refiner().
|
protectedvirtual |
Refines the base space or the target.
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().
|
protectedvirtual |
Refines the coordinates of the target.
Implements fields::local_field_refiner.
Definition at line 362 of file edge_centered_polygon_refiner.cc.
References _is_new_vertex, _vertex_ids, _zone_ctr_id, sheaf::auto_block< T, S >::base(), fields::field_refinement_buffer::base_space, fiber_bundle::section_evaluator::center(), fields::field_refinement_buffer::coord_dofs, fields::field_refinement_buffer::coord_evaluator, fields::field_refinement_buffer::coord_value, fields::field_vd::coordinates(), create_edge_center(), sheaf::auto_block< T, S >::ct(), fiber_bundle::linear_2d::edge_center(), fiber_bundle::bilinear_2d::edge_center(), edge_ct(), is_zone_centered_refiner(), fields::field_refinement_buffer::local_coords, fiber_bundle::sec_vd::put_fiber(), fields::field_refinement_buffer::reserve_coord_fiber(), fields::field_refinement_buffer::target, fiber_bundle::section_evaluator::value_at_coord(), and fields::field_refinement_buffer::zone_id.
Referenced by modify_subposets().
|
protected |
The number of boundary vertices with refinement depth <= refined zone depth; does not include center vertex, if one exists.
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().
|
protected |
Reserves space in vertex buffers.
Definition at line 202 of file edge_centered_polygon_refiner.cc.
References _is_new_vertex, _vertex_ids, _vertex_pos, refine_base_space(), and sheaf::auto_block< T, S >::reserve().
Referenced by fields::barycentric_quad_refiner::barycentric_quad_refiner(), and edge_centered_polygon_refiner().
|
protectedpure virtual |
The number of vertices with refinement depth <= unrefined zone depth.
Is Abstract.
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().
|
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().
|
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().
|
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().
|
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().
|
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().