Class xlifepp::Geodesic#

class Geodesic#

Inheritence diagram for xlifepp::Geodesic:

digraph { graph [bgcolor="#00000000"] node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2] edge [color="#1414CE"] "2" [label="xlifepp::AnalyticGeodesic" tooltip="xlifepp::AnalyticGeodesic"] "3" [label="xlifepp::CompositeGeodesic" tooltip="xlifepp::CompositeGeodesic"] "1" [label="xlifepp::Geodesic" tooltip="xlifepp::Geodesic" fillcolor="#BFBFBF"] "4" [label="xlifepp::GeometricGeodesic" tooltip="xlifepp::GeometricGeodesic"] "5" [label="xlifepp::MeshedGeodesic" tooltip="xlifepp::MeshedGeodesic"] "6" [label="xlifepp::ParametrizedGeodesic" tooltip="xlifepp::ParametrizedGeodesic"] "2" -> "1" [dir=forward tooltip="public-inheritance"] "3" -> "1" [dir=forward tooltip="public-inheritance"] "4" -> "1" [dir=forward tooltip="public-inheritance"] "5" -> "1" [dir=forward tooltip="public-inheritance"] "6" -> "1" [dir=forward tooltip="public-inheritance"] }

Collaboration diagram for xlifepp::Geodesic:

digraph { graph [bgcolor="#00000000"] node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2] edge [color="#1414CE"] "24" [label="xlifepp::Collection< string_t >" tooltip="xlifepp::Collection< string_t >"] "17" [label="xlifepp::Matrix< real_t >" tooltip="xlifepp::Matrix< real_t >"] "46" [label="xlifepp::Vector< complex_t >" tooltip="xlifepp::Vector< complex_t >"] "21" [label="xlifepp::Vector< real_t >" tooltip="xlifepp::Vector< real_t >"] "32" [label="xlifepp::Vector< xlifepp::Vector< real_t > >" tooltip="xlifepp::Vector< xlifepp::Vector< real_t > >"] "37" [label="std::list< std::pair< number_t, real_t > >" tooltip="std::list< std::pair< number_t, real_t > >"] "13" [label="std::map< number_t, std::vector< number_t > >" tooltip="std::map< number_t, std::vector< number_t > >"] "11" [label="std::map< number_t, xlifepp::Geometry * >" tooltip="std::map< number_t, xlifepp::Geometry * >"] "36" [label="std::map< string_t, number_t >" tooltip="std::map< string_t, number_t >"] "38" [label="std::list< T >" tooltip="std::list< T >"] "12" [label="std::map< K, T >" tooltip="std::map< K, T >"] "8" [label="std::vector< T >" tooltip="std::vector< T >"] "27" [label="std::vector< T >" tooltip="std::vector< T >"] "48" [label="std::vector< FieldType >" tooltip="std::vector< FieldType >"] "45" [label="std::vector< GeoNumPair >" tooltip="std::vector< GeoNumPair >"] "20" [label="std::vector< K >" tooltip="std::vector< K >"] "7" [label="std::vector< RealPair >" tooltip="std::vector< RealPair >"] "47" [label="std::vector< complex_t >" tooltip="std::vector< complex_t >"] "43" [label="std::vector< const xlifepp::GeomDomain * >" tooltip="std::vector< const xlifepp::GeomDomain * >"] "23" [label="std::vector< const xlifepp::Transformation * >" tooltip="std::vector< const xlifepp::Transformation * >"] "28" [label="std::vector< number_t >" tooltip="std::vector< number_t >"] "18" [label="std::vector< real_t >" tooltip="std::vector< real_t >"] "42" [label="std::vector< std::vector< GeoNumPair > >" tooltip="std::vector< std::vector< GeoNumPair > >"] "14" [label="std::vector< std::vector< int_t > >" tooltip="std::vector< std::vector< int_t > >"] "25" [label="std::vector< string_t >" tooltip="std::vector< string_t >"] "41" [label="std::vector< xlifepp::GeomDomain * >" tooltip="std::vector< xlifepp::GeomDomain * >"] "40" [label="std::vector< xlifepp::GeomElement * >" tooltip="std::vector< xlifepp::GeomElement * >"] "35" [label="std::vector< xlifepp::Parameter * >" tooltip="std::vector< xlifepp::Parameter * >"] "10" [label="std::vector< xlifepp::Point >" tooltip="std::vector< xlifepp::Point >"] "29" [label="std::vector< xlifepp::Transformation * >" tooltip="std::vector< xlifepp::Transformation * >"] "33" [label="std::vector< xlifepp::Vector< real_t > >" tooltip="std::vector< xlifepp::Vector< real_t > >"] "6" [label="xlifepp::BoundingBox" tooltip="xlifepp::BoundingBox"] "26" [label="xlifepp::Collection< T >" tooltip="xlifepp::Collection< T >"] "3" [label="xlifepp::DomainInfo" tooltip="xlifepp::DomainInfo"] "15" [label="xlifepp::ExtrusionData" tooltip="xlifepp::ExtrusionData"] "39" [label="xlifepp::GeoNode" tooltip="xlifepp::GeoNode"] "1" [label="xlifepp::Geodesic" tooltip="xlifepp::Geodesic" fillcolor="#BFBFBF"] "2" [label="xlifepp::GeomDomain" tooltip="xlifepp::GeomDomain"] "5" [label="xlifepp::Geometry" tooltip="xlifepp::Geometry"] "19" [label="xlifepp::Matrix< K >" tooltip="xlifepp::Matrix< K >"] "4" [label="xlifepp::Mesh" tooltip="xlifepp::Mesh"] "44" [label="xlifepp::MeshedGeodesic" tooltip="xlifepp::MeshedGeodesic"] "9" [label="xlifepp::MinimalBox" tooltip="xlifepp::MinimalBox"] "34" [label="xlifepp::Parameters" tooltip="xlifepp::Parameters"] "31" [label="xlifepp::Parametrization" tooltip="xlifepp::Parametrization"] "30" [label="xlifepp::Point" tooltip="xlifepp::Point"] "16" [label="xlifepp::Transformation" tooltip="xlifepp::Transformation"] "22" [label="xlifepp::Vector< K >" tooltip="xlifepp::Vector< K >"] "24" -> "25" [dir=forward tooltip="public-inheritance"] "24" -> "26" [dir=forward tooltip="template-instance"] "17" -> "18" [dir=forward tooltip="public-inheritance"] "17" -> "19" [dir=forward tooltip="template-instance"] "46" -> "47" [dir=forward tooltip="public-inheritance"] "46" -> "22" [dir=forward tooltip="template-instance"] "21" -> "18" [dir=forward tooltip="public-inheritance"] "21" -> "22" [dir=forward tooltip="template-instance"] "32" -> "33" [dir=forward tooltip="public-inheritance"] "32" -> "22" [dir=forward tooltip="template-instance"] "37" -> "38" [dir=forward tooltip="template-instance"] "13" -> "12" [dir=forward tooltip="template-instance"] "11" -> "12" [dir=forward tooltip="template-instance"] "36" -> "12" [dir=forward tooltip="template-instance"] "48" -> "8" [dir=forward tooltip="template-instance"] "45" -> "8" [dir=forward tooltip="template-instance"] "20" -> "8" [dir=forward tooltip="template-instance"] "7" -> "8" [dir=forward tooltip="template-instance"] "47" -> "8" [dir=forward tooltip="template-instance"] "43" -> "8" [dir=forward tooltip="template-instance"] "23" -> "8" [dir=forward tooltip="template-instance"] "28" -> "8" [dir=forward tooltip="template-instance"] "18" -> "8" [dir=forward tooltip="template-instance"] "42" -> "8" [dir=forward tooltip="template-instance"] "14" -> "8" [dir=forward tooltip="template-instance"] "25" -> "8" [dir=forward tooltip="template-instance"] "41" -> "8" [dir=forward tooltip="template-instance"] "40" -> "8" [dir=forward tooltip="template-instance"] "35" -> "8" [dir=forward tooltip="template-instance"] "10" -> "8" [dir=forward tooltip="template-instance"] "29" -> "8" [dir=forward tooltip="template-instance"] "33" -> "8" [dir=forward tooltip="template-instance"] "6" -> "7" [dir=forward tooltip="usage"] "26" -> "27" [dir=forward tooltip="public-inheritance"] "3" -> "4" [dir=forward tooltip="usage"] "15" -> "16" [dir=forward tooltip="usage"] "15" -> "24" [dir=forward tooltip="usage"] "15" -> "28" [dir=forward tooltip="usage"] "15" -> "18" [dir=forward tooltip="usage"] "15" -> "21" [dir=forward tooltip="usage"] "15" -> "29" [dir=forward tooltip="usage"] "15" -> "30" [dir=forward tooltip="usage"] "39" -> "39" [dir=forward tooltip="usage"] "39" -> "5" [dir=forward tooltip="usage"] "1" -> "2" [dir=forward tooltip="usage"] "1" -> "5" [dir=forward tooltip="usage"] "1" -> "31" [dir=forward tooltip="usage"] "1" -> "10" [dir=forward tooltip="usage"] "1" -> "18" [dir=forward tooltip="usage"] "1" -> "33" [dir=forward tooltip="usage"] "1" -> "30" [dir=forward tooltip="usage"] "1" -> "44" [dir=forward tooltip="usage"] "1" -> "46" [dir=forward tooltip="usage"] "1" -> "48" [dir=forward tooltip="usage"] "1" -> "21" [dir=forward tooltip="usage"] "1" -> "34" [dir=forward tooltip="usage"] "2" -> "3" [dir=forward tooltip="usage"] "2" -> "2" [dir=forward tooltip="usage"] "2" -> "5" [dir=forward tooltip="usage"] "2" -> "43" [dir=forward tooltip="usage"] "5" -> "6" [dir=forward tooltip="usage"] "5" -> "9" [dir=forward tooltip="usage"] "5" -> "11" [dir=forward tooltip="usage"] "5" -> "13" [dir=forward tooltip="usage"] "5" -> "14" [dir=forward tooltip="usage"] "5" -> "15" [dir=forward tooltip="usage"] "5" -> "31" [dir=forward tooltip="usage"] "5" -> "5" [dir=forward tooltip="usage"] "5" -> "39" [dir=forward tooltip="usage"] "19" -> "20" [dir=forward tooltip="public-inheritance"] "4" -> "5" [dir=forward tooltip="usage"] "4" -> "10" [dir=forward tooltip="usage"] "4" -> "40" [dir=forward tooltip="usage"] "4" -> "41" [dir=forward tooltip="usage"] "4" -> "28" [dir=forward tooltip="usage"] "4" -> "42" [dir=forward tooltip="usage"] "4" -> "4" [dir=forward tooltip="usage"] "44" -> "1" [dir=forward tooltip="public-inheritance"] "44" -> "45" [dir=forward tooltip="usage"] "9" -> "10" [dir=forward tooltip="usage"] "34" -> "35" [dir=forward tooltip="usage"] "34" -> "36" [dir=forward tooltip="usage"] "31" -> "5" [dir=forward tooltip="usage"] "31" -> "21" [dir=forward tooltip="usage"] "31" -> "32" [dir=forward tooltip="usage"] "31" -> "4" [dir=forward tooltip="usage"] "31" -> "34" [dir=forward tooltip="usage"] "31" -> "37" [dir=forward tooltip="usage"] "30" -> "18" [dir=forward tooltip="public-inheritance"] "16" -> "17" [dir=forward tooltip="usage"] "16" -> "21" [dir=forward tooltip="usage"] "16" -> "23" [dir=forward tooltip="usage"] "22" -> "20" [dir=forward tooltip="public-inheritance"] }

Geodesic class handling any geodesic (abstract) Base class geodesic handles.

  • dom_p: pointer to a geometric domain

  • geo_p: pointer to related geometry

  • xs_: vector of successive geodesic points (fill by compute)

  • dxs_: vector of successive geodesic derivatives (fill by compute)

  • curAbcs_: vector of successive geodesic curvilinear abcissa (fill by compute)

  • normals_: vector of successive normal surfaces at geodesics point

curvatures_: vector of curvatures (Gauss, mean and normal curvature)

  • sx_, sdx_: starting point an direction

  • ex_, edx_: ending point an direction

  • length_: geodesic length

  • meshgeod_: pointer to a MeshedGeodesic handling the projection of the geodesic on a mesh

  • field_: to store a field on geodesic (only scalar complex up to now)

  • fieldTypes_: to store field types on geodesic (specific to HF computation)

  • fcur_p, fnor_p: additional pointer to functions giving the principal curvatures and surface normals cannot be deduced from geodesic! 0 if not required automatic assignment if geo_p is assigned and has a parametrization

  • params_: usefull parameters (first Parameter is always this, set by init())

dom_p or geo_p or both may be not allocated, regarding the type of Geodesic:

  • ParametrizedGeodesic: inherited class using parametrization and a RK4 scheme to compute geodesics

  • MeshedGeodesic: inherited class using mesh to compute geodesics

  • GeometricGeodesic: inherited class using a 1D geometry to describe geodesics

  • AnalyticGeodesic: inherited class using an analytic function to describe geodesics

  • CompositeGeodesic: inherited class using a list of chained geodesics of any type all inherited class must provide the computing function Geodesic& compute(Point& x, Point& dx, real_t& l, real_t lmax, number_t nmax, real_t dt=0) where - (x,dx) is the starting point/dervative of the geodesic

    • l, lmax: the current and max length of the geodesic

    • nmax: maximum number of points to compute

    • dt: step of computation if required (may be dt or ds) GeometricGeodesic and AnalyticalGeodesic are available only for a few simple geometries

When geometry is composed with patches that not match in a C1 way (different tangent planes) the new geodesic direction d2 from the previous one d1 at transition point x is computed as follows d2 = d1-(d1|n1)(n1+n2) where n1 is the outward normal (in tangent plane in x) to the original patch and n2 the outward normal (in tangent plane in x) to the new patch This rule is effective only when using a ParametrizedGeodesic, a MeshedGeodesic or a CompositeGeodesic

Subclassed by xlifepp::AnalyticGeodesic, xlifepp::CompositeGeodesic, xlifepp::GeometricGeodesic, xlifepp::MeshedGeodesic, xlifepp::ParametrizedGeodesic

Public Functions

Geodesic(const Geodesic &geod)#

copy constructor

void buildMeshedGeodesic(const GeomDomain &dom, bool trace = false)#

build mesh projection of geodesic and attach Geodesic information to each GeomElement

build the projection of the geodesic onto the domain mesh create a MeshedGeodesic stored using pointer meshgeod_ and attach Geodesic information to each GeomElement crossed by the Geodesic use GeomElement::userData_p to store a list<pair<Geodesic*, number_t>> several Geodesic’s may be concerned Geodesic has to be computed before useless for MeshedGeodesic (already done by compute) update xs_ and may be dxs_ and curAbcs_, curvatures_

inline virtual Geodesic &compute(Point &u, Point &du, real_t &l, real_t lmax, number_t n, real_t dt = 0)#

initialize par_p pointer

compute Geodesics

void copy(const Geodesic &geod)#

copy tool

virtual Vector<real_t> curvatures(const Point &p, const Point &d, bool fromParameters = false) const#

return curvatures (Gauss, mean, normal) if available

return curvatures (Gauss, mean, normal) if available if fcur_p is allocated use it first if parametrization of supporting geometry is available, use it else no access to curvatures, stop in error p: point where to take the curvatures dx: geodesic tangent fromParameters: if true p is a point in parameters space else it is a point on manifold

void init()#

clear xs_,dxs_,curAbcs

Vector<real_t> normal(const Point &p, bool fromParameters) const#

return surface normal if available

return normal to surface normal at a point if available if fnor_p is allocated use it first if parametrization of supporting geometry is available, use it else no access to normal, stop in error p: point where to take the curvatures fromParameters: if true p is a point in parameters space else it is a point on manifold

void printData(std::ostream &os) const#

print data

virtual void saveToFileG(const string_t &file) const#

export geodesic data as raw xyz format: xi yi zi (useful for matlab) csv format: column header x,y,z and xi,yi,zi (useful for paraview)

Public Members

std::vector<real_t> curAbcs_#

list of geodesic curvilinear abcissa in 3D space

std::vector<Vector<real_t>> curvatures_#

list of curvatures (Gauss, mean and normal curvature)

std::vector<Point> dxs_#

list of geodesic tangent vectors in 3D space

Point edx_#

ending direction (allocated if computed)

Point ex_#

ending point (allocated if computed)

Vector<real_t> (*fcur_p)(const Point &p, const Point &d, bool fromParameters, Parameters &pars)#

function pointer to curvatures computation at p (parameters or physical), may be 0

mutable Vector<complex_t> field_#

to store a field on geodesic (only scalar complex up to now)

mutable std::vector<FieldType> fieldTypes_#

to store field types on geodesic (specific to HF computation)

Vector<real_t> (*fnor_p)(const Point &p, bool fromParameters, Parameters &pars)#

function pointer to surface normal computation at p (parameters or physical), may be 0

real_t length_#

length of geodesic if computed (else 0)

MeshedGeodesic *meshgeod_#

projection of geodesic on mesh if required (see buildMeshedGeodesic function)

std::vector<Point> normals_#

list of normal surfaces at geodesics point

Parameters params_#

fcur_p anf fnor_p parameters to store additionnal data requires by these functions

Point sdx_#

starting direction (allocated if computed)

Point sx_#

starting point (allocated if computed)

GeodesicType type_#

type of Geodesic (see enum)

bool withCurAbc#

true if curvilinear abcissa are computed

bool withCurvatures#

true if manifold principal curvatures and geodesic normal curvatures are computed

bool withTangent#

true if tangent and normal vectors are computed

std::vector<Point> xs_#

list of geodesic points in 3D space