20 #include "SheafSystem/eval_family.h" 22 #include "SheafSystem/assert_contract.h" 23 #include "SheafSystem/constant_eval_family.h" 24 #include "SheafSystem/dlinear_eval_family.h" 25 #include "SheafSystem/factory.impl.h" 26 #include "SheafSystem/section_evaluator.h" 27 #include "SheafSystem/uniform_eval_family.h" 55 _members[i] = lsec->
clone();
85 ensure(is_same_type(result));
102 for(
int i=0; i<_members.ct(); i++)
132 result = result && any::invariant();
134 if(invariant_check())
138 disable_invariant_check();
142 enable_invariant_check();
160 require(xother != 0);
166 bool result =
dynamic_cast<const eval_family*
>(xother) != 0;
187 require(family_factory().contains_prototype(xname));
191 result = family_factory().new_instance(xname);
213 require(family_factory().contains_prototype(xname));
218 result = family_factory().new_instance(xname, const_cast<namespace_poset&>(xname_space));
223 ensure(result->class_name() == xname);
224 ensure(result->is_initialized());
237 require(xprototype != 0);
241 family_factory().insert_prototype(xprototype);
245 ensure(family_factory().contains_prototype(xprototype->
class_name()));
286 static const string result;
290 ensure(!result.empty());
307 require((0 <= xtype_id) && (xtype_id < size()));
313 result = _members[xtype_id];
333 require(xhost.
is_jim(xhub_id));
339 void* ldof_tuple =
const_cast<poset_state_handle&
>(xhost).member_dof_map(xhub_id).dof_tuple();
343 result = member(ltype_id);
363 require(xhost.
is_jim(xid));
367 return member(xhost, xid.
hub_pod());
381 result = _members.ct();
398 require(!is_initialized());
403 _is_initialized =
true;
408 ensure(is_initialized());
420 return _is_initialized;
430 : _is_initialized(false)
473 fiber_bundle::eval_family::
474 initialize_family_factory()
index_type ub() const
The upper bound on the storage array. The number of items current allocated in the storage array...
size_type ct() const
The number of items currently in use.
static void insert_family_prototype(eval_family *xprototype)
Inserts xprototype in family_factory().
bool conforms_to(const schema_poset_member &xother) const
True if the dofs defined by this agree in type and in order with the dofs defined by xother...
The default name space; a poset which contains other posets as members.
bool state_is_read_accessible() const
True if this is attached and if the state is accessible for read or access control is disabled...
members_type _members
The members of the family.
A client handle for a general, abstract partially order set.
void reserve(index_type xub)
Makes ub() at least xub; if new storage is allocated, it is uninitialized.
A family of section evaluators containing uni-, bi-, and tri-linear evaluators.
eval_family()
Default constructor.
bool _is_initialized
True if this has been populated with members.
bool is_initialized() const
True if this has been populated with members.
virtual const std::string & class_name() const =0
The name of this family.
Abstract base class with useful features for all objects.
size_type size() const
The number of members of this family.
static eval_family * new_family(const std::string &xname)
Creates an instance of the evaluator family associated with name xname.
virtual schema_poset_member & schema()
The schema for this poset (mutable version).
A factory for instanting descendants of an abstract type T, given the class name of the descendant...
void set_ct(size_type xct)
Sets ct() == xct.
An index within the external ("client") scope of a given id space.
A family of compatible section evaluators, one for each member of some family of cell types; a map fr...
unsigned long size_type
An unsigned integral type used to represent sizes and capacities.
static factory< eval_family > & family_factory()
A factory for making eval_family objects.
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. ...
An abstract local section evaluator; a map from {local coordinates x dofs} to section value...
virtual bool is_ancestor_of(const any *xother) const
Conformance test; true if other conforms to this.
virtual section_evaluator * clone() const =0
Virtual constructor, makes a new instance of the same type as this.
void initialize_members(size_type xmembers_ub)
Initialize storage for the members.
A family of section evaluators containing members for constant functions on primitive cells...
int_type pod_index_type
The plain old data index type.
virtual bool is_jim(pod_index_type xmbr_hub_id, bool xin_current_version=true) const
True if the member with hub id xmbr_hub_id is a jim in the current version (xin_current_version == tr...
void insert_prototype(T *xprototype)
Sets xprototype as the prototype for its client class.
section_evaluator * member(pod_index_type xtype_id) const
The evaluator associated with cell type xtype_id. Note that the result may be void.
The type of row dof tuple for base_space_member.
Namespace for the fiber_bundles component of the sheaf system.
virtual bool invariant() const
Class invariant.
virtual eval_family * clone() const
Virtual constructor; makes a new instance of the same type as this.
virtual void initialize(const namespace_poset &xname_space)=0
Initializes this to contain members for name space xname_space.
virtual ~eval_family()
Destructor.
pod_type hub_pod() const
The pod value of this mapped to the unglued hub id space.