SheafSystem  0.0.0.0
fiber_bundle::chart_point Class Referenceabstract

A point in chart space. More...

#include <chart_point.h>

Inheritance diagram for fiber_bundle::chart_point:
sheaf::any fiber_bundle::chart_point_1d fiber_bundle::chart_point_2d fiber_bundle::chart_point_3d

CHART_POINT FACET

typedef chart_point_coord_type coord_type
 The type of local coordinate; the scalar type for the local coordinate vector space. More...
 
pod_index_type _chart_id
 The id of the chart this point is in. More...
 
static chart_pointnew_chart_point (int xdb)
 Factory method; creates a chart point with db() == xdb. More...
 
virtual ~chart_point ()
 Destructor. More...
 
pod_index_type chart_id () const
 The id of the chart this point is in. More...
 
void put_chart_id (pod_index_type xchart)
 Sets chart_id() to xchart_id. More...
 
void put_chart_id (const scoped_index &xchart)
 Sets chart_id() to xchart_id.hub_pod(). More...
 
virtual int db () const =0
 The dimension of this chart. More...
 
virtual coord_type local_coord (int xi) const =0
 The xi-th local coordinate of this point. More...
 
virtual void put_local_coord (int xi, coord_type xvalue)=0
 Sets the xi-th local coordinate of this point to xvalue. More...
 
virtual coord_typelocal_coords ()=0
 The array of local coordinates. More...
 
virtual const coord_typelocal_coords () const =0
 The array of local coordinates. More...
 
void put_local_coords (const coord_type *xvalues, size_type xvalues_ub)
 Sets the local coordinates to the values in xvalues. More...
 
void put_local_coords_zero ()
 Sets the local coordinates to the zero vector. More...
 
bool is_valid () const
 True if this ia a valid point in a chart. More...
 
void invalidate ()
 Makes this invalid. More...
 
 chart_point ()
 Default constructor. More...
 

ANY FACET

virtual chart_pointclone () const =0
 Virtual constructor, makes a new instance of the same type as this. More...
 
virtual bool invariant () const
 Class invariant. More...
 
virtual bool is_ancestor_of (const any *other) const
 Conformance test; true if other conforms to this. More...
 
chart_pointoperator= (const chart_point &xother)
 Assignment operator. More...
 
bool operator== (const chart_point &xother) const
 Equality operator. More...
 

DEBUGGING FACET

void to_stream (std::ostream &xos=std::cout) const
 Write instance information to an ostream (default = stdout). More...
 
std::string to_string () const
 Get instance information as a string. More...
 

Additional Inherited Members

- 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 sheaf::any
 any ()
 default constructor More...
 

Detailed Description

A point in chart space.

Definition at line 52 of file chart_point.h.

Member Typedef Documentation

◆ coord_type

The type of local coordinate; the scalar type for the local coordinate vector space.

Definition at line 65 of file chart_point.h.

Constructor & Destructor Documentation

◆ ~chart_point()

fiber_bundle::chart_point::~chart_point ( )
virtual

Destructor.

Definition at line 79 of file chart_point.cc.

References chart_id().

Referenced by new_chart_point().

◆ chart_point()

fiber_bundle::chart_point::chart_point ( )
protected

Default constructor.

Definition at line 347 of file chart_point.cc.

References _chart_id, chart_id(), sheaf::invalid_pod_index(), and invariant().

Referenced by invalidate().

Member Function Documentation

◆ chart_id()

◆ clone()

virtual chart_point* fiber_bundle::chart_point::clone ( ) const
pure virtual

Virtual constructor, makes a new instance of the same type as this.

Reimplemented from sheaf::any.

Implemented in fiber_bundle::chart_point_3d, fiber_bundle::chart_point_2d, and fiber_bundle::chart_point_1d.

Referenced by fiber_bundle::local_base_space_member::refine_point(), and fiber_bundle::local_base_space_member::unrefine_point().

◆ db()

◆ invalidate()

◆ invariant()

◆ is_ancestor_of()

bool fiber_bundle::chart_point::is_ancestor_of ( const any other) const
virtual

Conformance test; true if other conforms to this.

Precondition
  • other != 0

Reimplemented from sheaf::any.

Reimplemented in fiber_bundle::chart_point_3d, fiber_bundle::chart_point_2d, and fiber_bundle::chart_point_1d.

Definition at line 427 of file chart_point.cc.

References operator=().

Referenced by invariant().

◆ is_valid()

◆ local_coord()

◆ local_coords() [1/2]

◆ local_coords() [2/2]

const fiber_bundle::chart_point::coord_type * fiber_bundle::chart_point::local_coords ( ) const
pure virtual

The array of local coordinates.

Is Abstract.

Postcondition
  • result != 0

Implemented in fiber_bundle::chart_point_3d, fiber_bundle::chart_point_2d, and fiber_bundle::chart_point_1d.

Definition at line 231 of file chart_point.cc.

References put_local_coords().

◆ new_chart_point()

fiber_bundle::chart_point * fiber_bundle::chart_point::new_chart_point ( int  xdb)
static

Factory method; creates a chart point with db() == xdb.

Precondition
  • (1 <= xdb) && (xdb < 4)
Postcondition
  • result != 0

Definition at line 43 of file chart_point.cc.

References ~chart_point().

Referenced by geometry::sec_ed_invertible::point_at_value().

◆ operator=()

fiber_bundle::chart_point & fiber_bundle::chart_point::operator= ( const chart_point xother)

Assignment operator.

Postcondition
  • for(int i = ( 0 ); i < ( (min(db(), xother.db())) ); ++ i ) isunordered_or_equals(local_coord(i), xother.local_coord(i))
  • for(int i = ( (min(db(), xother.db())) ); i < ( db() ); ++ i ) local_coord(i) == 0.0

Definition at line 449 of file chart_point.cc.

References _chart_id, chart_id(), db(), invariant(), sheaf::isunordered_or_equals(), local_coord(), local_coords(), fiber_bundle::vd_algebra::min(), and operator==().

Referenced by is_ancestor_of(), fiber_bundle::chart_point_1d::operator=(), fiber_bundle::chart_point_2d::operator=(), and fiber_bundle::chart_point_3d::operator=().

◆ operator==()

bool fiber_bundle::chart_point::operator== ( const chart_point xother) const

Equality operator.

Postcondition

Definition at line 490 of file chart_point.cc.

References chart_id(), db(), invariant(), local_coord(), and to_stream().

Referenced by operator=().

◆ put_chart_id() [1/2]

◆ put_chart_id() [2/2]

void fiber_bundle::chart_point::put_chart_id ( const scoped_index xchart)

Sets chart_id() to xchart_id.hub_pod().

Postcondition

Definition at line 122 of file chart_point.cc.

References db(), and sheaf::scoped_index::hub_pod().

◆ put_local_coord()

void fiber_bundle::chart_point::put_local_coord ( int  xi,
coord_type  xvalue 
)
pure virtual

◆ put_local_coords()

void fiber_bundle::chart_point::put_local_coords ( const coord_type xvalues,
size_type  xvalues_ub 
)

Sets the local coordinates to the values in xvalues.

Precondition
  • xvalues != 0
  • xvalues_ub >= db()
Postcondition
  • for(int i = ( 0 ); i < ( db() ); ++ i ) isunordered_or_equals(local_coord(i), xvalues[i])

Definition at line 253 of file chart_point.cc.

References sheaf::isunordered_or_equals(), and put_local_coords_zero().

Referenced by local_coords().

◆ put_local_coords_zero()

void fiber_bundle::chart_point::put_local_coords_zero ( )

Sets the local coordinates to the zero vector.

Postcondition
  • for(int i = ( 0 ); i < ( db() ); ++ i ) local_coord(i) == 0.0

Definition at line 279 of file chart_point.cc.

References is_valid().

Referenced by put_local_coords().

◆ to_stream()

void fiber_bundle::chart_point::to_stream ( std::ostream &  xos = std::cout) const

Write instance information to an ostream (default = stdout).

Definition at line 528 of file chart_point.cc.

References to_string().

Referenced by operator==().

◆ to_string()

std::string fiber_bundle::chart_point::to_string ( ) const

Get instance information as a string.

Definition at line 535 of file chart_point.cc.

References fiber_bundle::operator<<().

Referenced by to_stream().

Member Data Documentation

◆ _chart_id

pod_index_type fiber_bundle::chart_point::_chart_id
protected

The documentation for this class was generated from the following files: