21 #include "SheafSystem/zone_centered_segment_refiner.h" 23 #include "SheafSystem/assert_contract.h" 24 #include "SheafSystem/base_space_poset.h" 25 #include "SheafSystem/error_message.h" 26 #include "SheafSystem/block.impl.h" 27 #include "SheafSystem/field_refinement_buffer.h" 28 #include "SheafSystem/section_evaluator.h" 29 #include "SheafSystem/sec_ed_invertible.h" 30 #include "SheafSystem/field_vd.h" 52 ensure(&
policy() == &xpolicy);
138 int lzone_depth = lbase->refinement_depth(lzone_id);
139 int lnew_depth = lzone_depth + 1;
141 assertion(lzone_id.
same_scope(lbase->member_hub_id_space(
false)));
149 lbase->delete_link(lzone_id.
pod(), lpoint0_id);
151 lbase->delete_link(lzone_id.
pod(), lpoint1_id);
237 lelements_id_space->
remove(lzone_id,
true);
345 static const string result(
"segment_complex");
349 ensure(!result.empty());
367 result = REFINED_ZONE_CT;
542 require(xother != 0);
double chart_point_coord_type
The type of local coordinate in the base space; the scalar type for the local coordinate vector space...
virtual zone_centered_segment_refiner * clone() const
Virtual constructor, creates a new instance of the same type as this.
virtual bool invariant() const
Class invariant.
A client handle for a subposet.
section_evaluator * coord_evaluator
The section evaluator for the coordinates section of the target.
zone_centered_segment_refiner()
Default constructor; disabled.
size_type ct() const
The number of items currently in use.
const pod_type & pod() const
The "plain old data" storage of this; the value in the external id space.
A field refiner that introduces a new vertex in the center of a segment.
virtual size_type refined_zone_ct() const
The number of refined zones created by this.
scattered_insertion_index_space_handle * coord_disc_seq_id_space
The discretization sequence id space of the target coordinates.
virtual const std::string & zone_type_name() const
The name of the type of zone this creates during refinement.
A buffer for data which is used by both a local_field_refiner object and its associated field_refinem...
Namespace for fields component of sheaf system.
size_type remove(const scoped_index &xid, bool update_extrema)
Removes the equivalence associated with xid.hub_pod(). synonym for remove_hub(xid.hub_pod(), xupdate_extrema). Returns the number of entries actually removed, either 0 or 1.
pod_index_type create_vertex(base_space_poset &xbase, int xdepth)
Creates a new vertex at depth xdepth.
virtual void refine_coordinates(field_refinement_buffer &xbuffer)
Refines the coordinates of the target.
block< sec_vd_value_type > coord_value
A buffer for computing coordinates at a point.
virtual dof_type value_at_coord(const dof_type xdofs[], size_type xdofs_ub, const dof_type xlocal_coords[], size_type xlocal_coords_ub) const
Value at a specified local_coordinate. Single component version.
virtual pod_type pod(pod_type xid) const
The pod index in this space equivalent to xid in the hub id space.
block< sec_vd_dof_type > coord_dofs
A buffer for gathering coordinate dofs.
bool same_scope(const scoped_index &xother) const
True if and only if this is in the same id space as xother.
virtual bool invariant() const
Class invariant.
const field_refinement_policy & policy() const
The refinement policy for this refiner.
Abstract base class with useful features for all objects.
The lattice of closed cells of a cellular space; a lattice representation of a computational mesh...
void reserve_coord_fiber(const scoped_index &xdisc_id)
Ensures the coordinate dofs have enough capacity for discretization id xdisc.
void push_back(const_reference_type item)
Insert item at the end of the items in the auto_block.
const chart_point_coord_type * local_coordinates_map(size_type xi) const
The map from the local coordinates of refined zone xi the the local coordinates of the parent zone...
scoped_index zone_id
The id of the current zone.
scoped_index _new_point_id
The index of the point added by the current base space refinement.
scattered_insertion_index_space_handle * elements_id_space
The sequence id space used by the elements subposet.
subposet & vertices()
The subposet containing all the vertices, that is, the cells of dimension 0 (mutable version)...
pointer_type base() const
The underlying storage array.
void set_ct(size_type xct)
Sets ct() == xct.
An index within the external ("client") scope of a given id space.
virtual int db() const
The base dimension; the dimension of the local coordinates (independent variable).
unsigned long size_type
An unsigned integral type used to represent sizes and capacities.
An abstract policy that determines the conditions under which a zone should be refined.
scoped_index _new_seg_0_id
The index of the first segment added by the current base space refinement.
virtual void insert_member(pod_index_type xmbr_hub_id)
Inserts the member of host() with hub id xmbr_hub_id.
void insert(pod_type xid, const scoped_index &xhub_id)
Make id xid in this id space equivalent to xhub_id in the hub id space. synonym for insert(xid...
virtual void center(coord_type xresult[], size_type xresult_ub) const
The local coordinates at the center of the evaluator.
virtual bool is_ancestor_of(const any *xother) const
Conformance test; true if other conforms to this.
void disable_invariant_check() const
Disable invariant check. Intended for preventing recursive calls to invariant and for suppressing inv...
field_vd & target
The field being refined.
virtual zone_centered_segment_refiner & operator=(const local_field_refiner &xother)
Assignment operator.
scattered_insertion_index_space_handle * vertices_id_space
The sequence id space used by the vertices subposet.
const bool LOWER
Selector for lower cover.
virtual void refine_base_space(field_refinement_buffer &xbuffer)
Refines the base space or the target.
An abstract refiner for a field over a local region (primitive cell) in the base space.
bool invariant_check() const
True if invariant checking is enabled.
void put_fiber(pod_index_type xdisc_id, const vd_lite &xfiber)
Sets the fiber referred to by discretization id xdisc_id to xfiber.
virtual void remove_member(pod_index_type xmbr_hub_id)
Removes the member of host() with hub id xmbr_hub_id.
int_type pod_index_type
The plain old data index type.
A handle for a scattered_insertion_index_space_state.
sec_ed_invertible & coordinates() const
The independent variable of this field.
void push_back(const scoped_index &xhub_id)
Make the next id in this space equivalent to xhub_id in the hub id space. synonym for push_back(xhub_...
subposet & elements()
The subposet containing the elements or zones, that is, the cells of maximal dimension.
block< chart_point_coord_type > local_coords
A buffer for the local coordinates of a point.
pod_index_type create_zone(base_space_poset &xbase, int xdepth)
Creates a new quadrangle in base space xbase, with refinement depth xdepth.
void modify_crg(field_refinement_buffer &xbuffer)
Modifies the cover relation graph of the base space.
base_space_poset * base_space
The current base space.
double sec_vd_dof_type
The type of degree of freedom in the section space.
bool in_jim_edit_mode() const
True if editing jims and jim order relation is allowed.
bool is_same_type(const any *other) const
True if other is the same type as this.
void enable_invariant_check() const
Enable invariant checking.
void modify_subposets(field_refinement_buffer &xbuffer)
Modifies subposets in the base space.
scoped_index _new_seg_1_id
The index of the second segment added by the current base space refinement.
virtual ~zone_centered_segment_refiner()
Destructor.
block< scoped_index > _refined_zone_ids
The member ids of the zones created by the most recent execution of refine().