SheafSystem  0.0.0.0
fiber_bundle::chart_point_3d Class Reference

A point in a 3D chart space. More...

#include <chart_point_3d.h>

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

CHART_POINT_3D FACET

coord_type _local_coords [3]
 The local coordinates of this point. More...
 
 chart_point_3d ()
 Default constructor. More...
 
 chart_point_3d (const chart_point_3d &xother)
 Copy constructor. More...
 
virtual ~chart_point_3d ()
 Destructor. More...
 
 chart_point_3d (pod_index_type xchart_id, coord_type xu, coord_type xv, coord_type xw)
 Creates an instance with chart_id() == xchart_id, u() == xu, v() == xv, and w() == xw. More...
 
 chart_point_3d (const scoped_index &xchart_id, coord_type xu, coord_type xv, coord_type xw)
 Creates an instance with chart_id() == xchart_id.hub_pod(), u() == xu, v() == xv, and w() == xw. More...
 
 chart_point_3d (pod_index_type xchart_id, const coord_type *xlocal_coords, size_type xlocal_coords_ub)
 Creates an instance with chart_id() == xchart_id and local_coord(i) == xlocal_coords[i]. More...
 
 chart_point_3d (const scoped_index &xchart_id, const coord_type *xlocal_coords, size_type xlocal_coords_ub)
 Creates an instance with chart_id() == xchart_id.hub_pod() and local_coord(i) == xlocal_coords[i]. More...
 
virtual int db () const
 The dimension of this chart. More...
 
virtual coord_type local_coord (int xi) const
 The xi-th local coordinate of this point. More...
 
virtual void put_local_coord (int xi, coord_type xvalue)
 Sets the xi-th local coordinate of this point to xvalue. More...
 
coord_typelocal_coords ()
 The array of local coordinates. More...
 
const coord_typelocal_coords () const
 The array of local coordinates, const version. More...
 
const coord_typeu () const
 The 0-th local coordinate of this. More...
 
const coord_typev () const
 The 1-th local coordinate of this. More...
 
const coord_typew () const
 The 2-th local coordinate of this. More...
 
void put (pod_index_type xchart_id, coord_type xu, coord_type xv, coord_type xw)
 Sets chart_id() == xchart_id, u() == xu, v() == xv, w() == xw. More...
 
void put (const scoped_index &xchart_id, coord_type xu, coord_type xv, coord_type xw)
 Sets chart_id() == xchart_id.hub_pod(), u() == xu, v() == xv, w() == xw. More...
 

ANY FACET

virtual chart_point_3dclone () const
 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_point_3doperator= (const chart_point &xother)
 Assignment operator. More...
 
chart_point_3doperator= (const chart_point_3d &xother)
 Assignment operator. More...
 

Additional Inherited Members

- Public Types inherited from fiber_bundle::chart_point
typedef chart_point_coord_type coord_type
 The type of local coordinate; the scalar type for the local coordinate vector space. More...
 
- Public Member Functions inherited from fiber_bundle::chart_point
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...
 
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_pointoperator= (const chart_point &xother)
 Assignment operator. More...
 
bool operator== (const chart_point &xother) const
 Equality operator. More...
 
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...
 
- 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...
 
- Static Public Member Functions inherited from fiber_bundle::chart_point
static chart_pointnew_chart_point (int xdb)
 Factory method; creates a chart point with db() == xdb. More...
 
- Protected Member Functions inherited from fiber_bundle::chart_point
 chart_point ()
 Default constructor. More...
 
- Protected Member Functions inherited from sheaf::any
 any ()
 default constructor More...
 
- Protected Attributes inherited from fiber_bundle::chart_point
pod_index_type _chart_id
 The id of the chart this point is in. More...
 

Detailed Description

A point in a 3D chart space.

Definition at line 40 of file chart_point_3d.h.

Constructor & Destructor Documentation

◆ chart_point_3d() [1/6]

fiber_bundle::chart_point_3d::chart_point_3d ( )

Default constructor.

Postcondition
  • !is_valid()

Definition at line 33 of file chart_point_3d.cc.

References sheaf::invalid_pod_index(), and sheaf::is_valid().

Referenced by chart_point_3d(), and ~chart_point_3d().

◆ chart_point_3d() [2/6]

fiber_bundle::chart_point_3d::chart_point_3d ( const chart_point_3d xother)

Copy constructor.

Postcondition
  • *this == xother

Definition at line 52 of file chart_point_3d.cc.

References ~chart_point_3d().

◆ ~chart_point_3d()

fiber_bundle::chart_point_3d::~chart_point_3d ( )
virtual

Destructor.

Definition at line 71 of file chart_point_3d.cc.

References chart_point_3d().

Referenced by chart_point_3d().

◆ chart_point_3d() [3/6]

fiber_bundle::chart_point_3d::chart_point_3d ( pod_index_type  xchart_id,
coord_type  xu,
coord_type  xv,
coord_type  xw 
)

Creates an instance with chart_id() == xchart_id, u() == xu, v() == xv, and w() == xw.

Postcondition
  • isunordered_or_equals(u(), xu)
  • isunordered_or_equals(v(), xv)
  • isunordered_or_equals(w(), xw)

Definition at line 87 of file chart_point_3d.cc.

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

◆ chart_point_3d() [4/6]

fiber_bundle::chart_point_3d::chart_point_3d ( const scoped_index xchart_id,
coord_type  xu,
coord_type  xv,
coord_type  xw 
)

Creates an instance with chart_id() == xchart_id.hub_pod(), u() == xu, v() == xv, and w() == xw.

Postcondition
  • isunordered_or_equals(u(), xu)
  • isunordered_or_equals(v(), xv)
  • isunordered_or_equals(w(), xw)

Definition at line 115 of file chart_point_3d.cc.

References chart_point_3d(), sheaf::scoped_index::hub_pod(), and sheaf::isunordered_or_equals().

◆ chart_point_3d() [5/6]

fiber_bundle::chart_point_3d::chart_point_3d ( pod_index_type  xchart_id,
const coord_type xlocal_coords,
size_type  xlocal_coords_ub 
)

Creates an instance with chart_id() == xchart_id and local_coord(i) == xlocal_coords[i].

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

Definition at line 143 of file chart_point_3d.cc.

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

◆ chart_point_3d() [6/6]

fiber_bundle::chart_point_3d::chart_point_3d ( const scoped_index xchart_id,
const coord_type xlocal_coords,
size_type  xlocal_coords_ub 
)

Creates an instance with chart_id() == xchart_id.hub_pod() and local_coord(i) == xlocal_coords[i].

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

Definition at line 170 of file chart_point_3d.cc.

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

Member Function Documentation

◆ clone()

fiber_bundle::chart_point_3d * fiber_bundle::chart_point_3d::clone ( ) const
virtual

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

Postcondition
  • result->is_same_type(this)

Implements fiber_bundle::chart_point.

Definition at line 448 of file chart_point_3d.cc.

References invariant(), and sheaf::any::is_same_type().

Referenced by put().

◆ db()

int fiber_bundle::chart_point_3d::db ( ) const
virtual

The dimension of this chart.

Postcondition
  • result == 3

Implements fiber_bundle::chart_point.

Definition at line 198 of file chart_point_3d.cc.

References local_coord().

Referenced by geometry::d_bin_point_locator< DC, DB >::branch_points_at_value(), geometry::cylindrical_point_locator::branch_points_at_value(), and chart_point_3d().

◆ invariant()

bool fiber_bundle::chart_point_3d::invariant ( ) const
virtual

Class invariant.

Invariant

Reimplemented from fiber_bundle::chart_point.

Definition at line 469 of file chart_point_3d.cc.

References fiber_bundle::chart_point::invariant(), and is_ancestor_of().

Referenced by clone().

◆ is_ancestor_of()

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

Conformance test; true if other conforms to this.

Precondition
  • other != 0

Reimplemented from fiber_bundle::chart_point.

Definition at line 500 of file chart_point_3d.cc.

References operator=().

Referenced by invariant().

◆ local_coord()

fiber_bundle::chart_point_3d::coord_type fiber_bundle::chart_point_3d::local_coord ( int  xi) const
virtual

The xi-th local coordinate of this point.

Precondition
  • (0 <= xi) && (xi < db())
Todo:
uncomment when invariant changed to invariant() const; ensure(invariant());

Implements fiber_bundle::chart_point.

Definition at line 219 of file chart_point_3d.cc.

References put_local_coord().

Referenced by db().

◆ local_coords() [1/2]

◆ local_coords() [2/2]

const fiber_bundle::chart_point_3d::coord_type * fiber_bundle::chart_point_3d::local_coords ( ) const
virtual

The array of local coordinates, const version.

Postcondition
  • result != 0

Implements fiber_bundle::chart_point.

Definition at line 288 of file chart_point_3d.cc.

References u().

◆ operator=() [1/2]

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

Assignment operator.

Definition at line 206 of file chart_point_3d.h.

References fiber_bundle::chart_point::operator=().

Referenced by is_ancestor_of().

◆ operator=() [2/2]

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

Assignment operator.

Postcondition
  • -unexecutable( *this == xother )

Definition at line 521 of file chart_point_3d.cc.

References fiber_bundle::chart_point::_chart_id, and _local_coords.

◆ put() [1/2]

void fiber_bundle::chart_point_3d::put ( pod_index_type  xchart_id,
coord_type  xu,
coord_type  xv,
coord_type  xw 
)

Sets chart_id() == xchart_id, u() == xu, v() == xv, w() == xw.

Postcondition
  • isunordered_or_equals(u(), xu)
  • isunordered_or_equals(v(), xv)
  • isunordered_or_equals(w(), xw)

Definition at line 377 of file chart_point_3d.cc.

References sheaf::isunordered_or_equals().

Referenced by fiber_bundle::structured_block_1d::refine_point_pa(), fiber_bundle::structured_block_2d::refine_point_pa(), fields::section_pusher_pullback_action::section_pusher_pullback_action(), and w().

◆ put() [2/2]

void fiber_bundle::chart_point_3d::put ( const scoped_index xchart_id,
coord_type  xu,
coord_type  xv,
coord_type  xw 
)

Sets chart_id() == xchart_id.hub_pod(), u() == xu, v() == xv, w() == xw.

Postcondition
  • isunordered_or_equals(u(), xu)
  • isunordered_or_equals(v(), xv)
  • isunordered_or_equals(w(), xw)

Definition at line 403 of file chart_point_3d.cc.

References clone(), sheaf::scoped_index::hub_pod(), and sheaf::isunordered_or_equals().

◆ put_local_coord()

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

Sets the xi-th local coordinate of this point to xvalue.

Precondition
  • (0 <= xi) && (xi < db())
Todo:
uncomment when invariant changed to invariant() const; ensure(invariant());
Postcondition
  • isunordered_or_equals(local_coord(xi), xvalue)

Implements fiber_bundle::chart_point.

Definition at line 243 of file chart_point_3d.cc.

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

Referenced by local_coord().

◆ u()

const fiber_bundle::chart_point_3d::coord_type & fiber_bundle::chart_point_3d::u ( ) const

The 0-th local coordinate of this.

Todo:
uncomment when invariant changed to invariant() const; ensure(invariant());
Postcondition
  • isunordered_or_equals(result, local_coord(0))

Definition at line 310 of file chart_point_3d.cc.

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

Referenced by local_coords().

◆ v()

const fiber_bundle::chart_point_3d::coord_type & fiber_bundle::chart_point_3d::v ( ) const

The 1-th local coordinate of this.

Todo:
uncomment when invariant changed to invariant() const; ensure(invariant());
Postcondition
  • isunordered_or_equals(result, local_coord(1))

Definition at line 333 of file chart_point_3d.cc.

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

Referenced by u().

◆ w()

const fiber_bundle::chart_point_3d::coord_type & fiber_bundle::chart_point_3d::w ( ) const

The 2-th local coordinate of this.

Todo:
uncomment when invariant changed to invariant() const; ensure(invariant());
Postcondition
  • isunordered_or_equals(result, local_coord(2))

Definition at line 355 of file chart_point_3d.cc.

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

Referenced by v().

Member Data Documentation

◆ _local_coords

coord_type fiber_bundle::chart_point_3d::_local_coords[3]
protected

The local coordinates of this point.

Definition at line 160 of file chart_point_3d.h.

Referenced by operator=().


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