21 #include "SheafSystem/local_field_refiner.h" 23 #include "SheafSystem/assert_contract.h" 24 #include "SheafSystem/base_space_poset.h" 25 #include "SheafSystem/block.impl.h" 26 #include "SheafSystem/depth_bound_refinement_policy.h" 27 #include "SheafSystem/field_refinement_buffer.h" 28 #include "SheafSystem/field_refinement_policy.h" 29 #include "SheafSystem/section_evaluator.h" 30 #include "SheafSystem/sec_vd.h" 31 #include "SheafSystem/field_vd.h" 89 static const string result(
"NOT_A_TYPE_NAME");
93 ensure(!result.empty());
110 static const string result(
"point");
114 ensure(!result.empty());
136 require(unexecutable(
"coordinate dofs have been gathered"));
137 require(unexecutable(
"property dofs have been gathered"));
141 refine_base_space(xbuffer);
142 refine_coordinates(xbuffer);
177 return _refined_zone_ids;
186 require(xi < refined_zone_ids().ct());
256 ensure(&
policy() == &xpolicy);
303 require(xdepth >= 0);
326 xbase.
new_link(result, BOTTOM_INDEX);
331 ensure(xbase.
type_name(result) ==
"point");
337 ensure(unexecutable(xbase.contains_cover_link(result, BOTTOM_INDEX)));
363 if(!ltuple_id.is_valid())
469 require(xother != 0);
virtual bool invariant() const
Class invariant, intended to be redefined in each descendant. See below for template for invariant in...
double chart_point_coord_type
The type of local coordinate in the base space; the scalar type for the local coordinate vector space...
virtual ~local_field_refiner()
Destructor.
virtual bool invariant() const
Class invariant.
virtual int db() const =0
The base dimension; the dimension of the local coordinates (independent variable).
bool is_valid() const
True if this is a valid id.
virtual void new_link(pod_index_type xgreater, pod_index_type xlesser)
Insert a cover link from greater to lesser (that is, hub id xgreater covers hub id xlesser)...
index_type ub() const
The upper bound on the storage array. The number of items current allocated in the storage array...
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 ...
A buffer for data which is used by both a local_field_refiner object and its associated field_refinem...
std::string type_name(pod_index_type xmbr_hub_id) const
The type id of the member with hub id xmbr_hub_id.
Namespace for fields component of sheaf system.
int refinement_depth(pod_index_type xmbr_hub_id) const
The refinement depth of the member with hub id xmbr_hub_id.
virtual size_type refined_zone_ct() const =0
The number of refined zones created by this.
pod_index_type create_vertex(base_space_poset &xbase, int xdepth)
Creates a new vertex at depth xdepth.
void force_item(index_type xindex, const_reference_type xitem)
Puts the item xitem at index xindex, resizing if necessary; any other new storage allocated is uninit...
void reserve(index_type xub)
Makes ub() at least xub; if new storage is allocated, it is uninitialized.
scoped_index prototype_dof_tuple_id(const std::string &xname, int xdepth, bool xcreate, bool xauto_access) const
The dof tuple id in this of the base space member prototype with name xname and refinememnt_depth xde...
void refine(field_refinement_buffer &xbuffer)
Refines the zone specified by xbuffer.zone_id one level and evaluates the coordinates section on the ...
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...
local_field_refiner()
Default constructor; disabled.
A policy that determines a zone should be refined if the refinement depth is less than a given upper ...
void assign(const_reference_type xitem)
Sets the values of all items to xitem.
void set_ct(size_type xct)
Sets ct() == xct.
An index within the external ("client") scope of a given id space.
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.
void initialize_buffers()
Initializes the dof tuple and refined zone buffers.
virtual bool contains_member(pod_index_type xmbr_hub_id, bool xauto_access=true) const
True if some version of this poset contains poset member with hub id xmbr_hub_id. ...
virtual const std::string & zone_type_name() const =0
The name of the type of zone this creates during refinement.
static const scoped_index & INVALID()
The invalid id.
virtual bool is_ancestor_of(const any *other) 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...
pod_index_type new_member(const std::string &xprototype_name, bool xcopy_dof_map)
Creates a disconnected jim using the prototype with name xprototype_name. If xcopy_dof_map or if xhos...
virtual local_field_refiner & operator=(const local_field_refiner &xother)
Assignment operator.
const field_refinement_policy & _policy
The refinement policy.
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.
virtual const std::string & vertex_type_name() const
The name of the type of vertex this creates during refinement.
block< scoped_index > _zone_dof_tuple_ids
The dof tuple index for quadrangle cells at various depths.
int_type pod_index_type
The plain old data index type.
pod_index_type create_zone(base_space_poset &xbase, int xdepth)
Creates a new quadrangle in base space xbase, with refinement depth xdepth.
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.
virtual local_field_refiner * clone() const =0
Virtual constructor, makes a new instance of the same type as this.
const block< scoped_index > & refined_zone_ids() const
The member ids of the zones created by the most recent execution of refine().
block< scoped_index > _refined_zone_ids
The member ids of the zones created by the most recent execution of refine().
block< scoped_index > _point_dof_tuple_ids
The dof tuple index for point cells at various depths.
pod_type hub_pod() const
The pod value of this mapped to the unglued hub id space.