21 #include "SheafSystem/chart_point_1d.h" 22 #include "SheafSystem/assert_contract.h" 63 ensure(*
this == xother);
93 _chart_id = xchart_id;
94 _local_coords[0] = xu;
99 ensure(chart_id() == xchart_id);
114 _chart_id = xchart_id.
hub_pod();
115 _local_coords[0] = xu;
120 ensure(chart_id() == xchart_id.
hub_pod());
135 require(xlocal_coords != 0);
136 require(xlocal_coords_ub >= db());
140 _chart_id = xchart_id;
141 put_local_coords(xlocal_coords, xlocal_coords_ub);
146 ensure(chart_id() == xchart_id);
161 require(xlocal_coords != 0);
162 require(xlocal_coords_ub >= db());
166 _chart_id = xchart_id.
hub_pod();
167 put_local_coords(xlocal_coords, xlocal_coords_ub);
172 ensure(chart_id() == xchart_id.
hub_pod());
210 require((0 <= xi) && (xi < db()));
214 result = _local_coords[xi];
232 require((0 <= xi) && (xi < db()));
236 _local_coords[xi] = xvalue;
261 result = _local_coords;
283 result = _local_coords;
346 _chart_id = xchart_id;
347 _local_coords[0] = xu;
352 ensure(chart_id() == xchart_id);
373 ensure(chart_id() == xchart_id.
hub_pod());
434 if(invariant_check())
438 disable_invariant_check();
441 invariance(db() == 1);
445 enable_invariant_check();
490 ensure(unexecutable(*
this == xother));
chart_point_1d & operator=(const chart_point &xother)
Assignment operator.
chart_point_coord_type coord_type
The type of local coordinate; the scalar type for the local coordinate vector space.
void put(pod_index_type xchart_id, coord_type xu)
Sets chart_id() == xchart_id, u() == xu.
coord_type & u()
The 0-th (and only) local coordinate of this; mutable version.
virtual chart_point_1d * clone() const
Virtual constructor, makes a new instance of the same type as this.
pod_index_type _chart_id
The id of the chart this point is in.
virtual int db() const
The dimension of this chart.
virtual coord_type local_coord(int xi) const
The xi-th local coordinate of this point.
virtual bool invariant() const
Class invariant.
Abstract base class with useful features for all objects.
coord_type * local_coords()
The array of local coordinates.
virtual void put_local_coord(int xi, coord_type xvalue)
Sets the xi-th local coordinate of this point to xvalue.
virtual bool invariant() const
Class invariant.
An index within the external ("client") scope of a given id space.
virtual ~chart_point_1d()
Destructor.
unsigned long size_type
An unsigned integral type used to represent sizes and capacities.
coord_type _local_coords[1]
The local coordinates of this point.
int_type pod_index_type
The plain old data index type.
virtual bool is_ancestor_of(const any *other) const
Conformance test; true if other conforms to this.
chart_point_1d()
Default constructor.
A point in a 1D chart space.
SHEAF_DLL_SPEC bool is_valid(pod_index_type xpod_index)
True if an only if xpod_index is valid.
Namespace for the fiber_bundles component of the sheaf system.
SHEAF_DLL_SPEC pod_index_type invalid_pod_index()
The invalid pod index value.
bool is_same_type(const any *other) const
True if other is the same type as this.
pod_type hub_pod() const
The pod value of this mapped to the unglued hub id space.
SHEAF_DLL_SPEC bool isunordered_or_equals(float x1, float x2)
True if isunordered(x1, x2) or x1 == x2.