Template Class MeshGeneric

Nested Relationships

Inheritance Relationships

Base Type

Class Documentation

template<typename SEGMENT>
class Mechatronix::MeshGeneric : public Mechatronix::MeshBase

base class for mesh definition

Public Types

typedef std::pair<integer, integer> I_pair

first = the number of the segment, second = the index of the node inside the segment

typedef SEGMENT SegmentClass

Public Functions

inline explicit MeshGeneric(string const &name)

construct an empty mesh

inline virtual integer numSegments() const override

number of segment

inline virtual integer numNodes() const override

number of nodes

inline virtual real_type ssNode(integer i) const override

i-th node coordinate

inline virtual integer nodeToSegment(integer i) const override
inline virtual real_type ssMin() const override
inline virtual real_type ssMax() const override
inline virtual real_type ssLength() const override
inline real_type ssFraction(real_type s) const
inline real_type ssTrapezoid(real_type s, real_type a, real_type b) const
inline real_type ssTrapezoidAbsolute(real_type s, real_type a, real_type b) const
inline void init(real_type s0)
inline SegmentClass const &firstSegment() const

return reference to first segment of the mesh

inline SegmentClass &firstSegment()

return reference to first segment of the mesh

inline SegmentClass const &lastSegment() const

return reference to last segment of the mesh

inline SegmentClass &lastSegment()

return reference to last segment of the mesh

inline SegmentClass const &getSegmentByIndex(integer nseg) const

return reference to nseg segment of the mesh

inline SegmentClass &getSegmentByIndex(integer nseg)

return reference to nseg segment of the mesh

inline SegmentClass const &getSegmentByNode(integer i) const

return reference to segment of the mesh which contains i-th node

inline SegmentClass &getSegmentByNode(integer i)

return reference to segment of the mesh which contains i-th node

inline SegmentClass const &getSegmentByCoord(real_type s) const

return reference to segment of the mesh which contains s coordinate

inline SegmentClass &getSegmentByCoord(real_type s)

return reference to segment of the mesh which contains s coordinate

inline void pushSegment(real_type len)

insert a segment of size len

inline void consolidate(real_type scale_length = 0)

Build nodeToSegmentList vector.

inline real_type ds_xMin() const
inline real_type ds_xMax() const
inline real_type ds_yMin(integer column) const
inline real_type ds_yMax(integer column) const
inline real_type ds_yMin(char const *column) const
inline real_type ds_yMax(char const *column) const
inline real_type ds_eval(real_type s, integer column) const

access to SplineSet

inline real_type ds_eval(real_type s, char const *column) const

access to SplineSet

inline real_type ds_eval(real_type s, integer indep, integer column) const

access to SplineSet

inline real_type ds_eval(real_type s, char const *indep, char const *column) const

access to SplineSet

inline real_type ds_eval_D(real_type s, integer column) const

access to SplineSet first derivative

inline real_type ds_eval_D(real_type s, char const *column) const

access to SplineSet first derivative

inline real_type ds_eval_D(real_type s, integer indep, integer column) const

access to SplineSet first derivative

inline real_type ds_eval_D(real_type s, char const *indep, char const *column) const

access to SplineSet first derivative

inline real_type ds_eval_DD(real_type s, integer column) const

access to SplineSet second derivative

inline real_type ds_eval_DD(real_type s, char const *column) const

access to SplineSet second derivative

inline real_type ds_eval_DD(real_type s, integer indep, integer column) const

access to SplineSet second derivative

inline real_type ds_eval_DD(real_type s, char const *indep, char const *column) const

access to SplineSet second derivative

inline real_type ds_eval_DDD(real_type s, integer column) const

access to SplineSet third derivative

inline real_type ds_eval_DDD(real_type s, char const *column) const

access to SplineSet third derivative

inline real_type ds_eval_DDD(real_type s, integer indep, integer column) const

access to SplineSet third derivative

inline real_type s_eval_DDD(real_type s, char const *indep, char const *column) const

access to SplineSet third derivative

inline string const &name() const

return the name of the mesh

inline void info(ostream_type &stream) const
inline virtual void writeToStream(ostream_type &stream) const override
inline virtual void dump(ostream_type &stream) const override
inline void dataSetup(GenericContainer const &gc)

Protected Functions

inline integer findSegmentByCoord(real_type s) const

find the segment index corresponding to the parametrer s

Protected Attributes

real_type m_ss_min
real_type m_ss_max
vector<I_pair> m_nodeToSegmentList
vector<SegmentClass> m_segmentList
Splines::SplineSet m_data_set