TTK
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
ttk::IntegralLines Class Reference

TTK processing package for the computation of edge-based integral lines of the gradient of an input scalar field defined on a PL manifold. More...

#include <IntegralLines.h>

Inheritance diagram for ttk::IntegralLines:
ttk::Debug ttk::BaseClass ttkIntegralLines

Public Member Functions

 IntegralLines ()
 
 ~IntegralLines () override
 
template<class triangulationType = ttk::AbstractTriangulation>
int execute (triangulationType *triangulation)
 
template<class triangulationType = ttk::AbstractTriangulation>
void computeIntegralLine (const triangulationType *triangulation, ttk::intgl::IntegralLine *integralLine, const ttk::SimplexId *offsets) const
 Computes the integral line starting at the vertex of global id seedIdentifier.
 
template<class triangulationType >
void createTask (const triangulationType *triangulation, std::vector< ttk::intgl::IntegralLine * > &chunkIntegralLine, const ttk::SimplexId *offsets, int nbElement) const
 Create an OpenMP task that contains the computation of nbElement integral lines.
 
template<class triangulationType >
void prepareForTask (const triangulationType *triangulation, std::vector< ttk::intgl::IntegralLine * > &chunkIntegralLine, int startingIndex, int nbElement, std::vector< SimplexId > *seeds) const
 Initializes the three attributes of an integral line: the global id of its seed, its trajectory, and the distances of its points with regards to its seed. Then stores the pointers to those objects in chunkIntegralLine to use it for task creation.
 
void setVertexNumber (const SimplexId &vertexNumber)
 
void setSeedNumber (const SimplexId &seedNumber)
 
void setDirection (int direction)
 
void findNextVertex (ttk::SimplexId &vnext, ttk::SimplexId &fnext, std::vector< ttk::SimplexId > &component, const SimplexId *offsets) const
 Finds the vertex of highest or lowest offsets (depending on the direction of the integral line) in the component vector.
 
int preconditionTriangulation (ttk::AbstractTriangulation *triangulation)
 
void setInputScalarField (void *data)
 
void setInputOffsets (const SimplexId *const data)
 
void setVertexIdentifierScalarField (std::vector< SimplexId > *const data)
 
void setOutputIntegralLines (std::vector< ttk::ArrayLinkedList< ttk::intgl::IntegralLine, INTEGRAL_LINE_TABULAR_SIZE > > *integralLines)
 
void setChunkSize (int size)
 
void buildScalarFieldCriticalPoints ()
 
template<class triangulationType >
void prepareForTask (const triangulationType *ttkNotUsed(triangulation), std::vector< ttk::intgl::IntegralLine * > &chunkIntegralLine, int startingIndex, int nbElement, std::vector< SimplexId > *seeds) const
 
- Public Member Functions inherited from ttk::Debug
 Debug ()
 
 ~Debug () override
 
virtual int setDebugLevel (const int &debugLevel)
 
int setWrapper (const Wrapper *wrapper) override
 
int printMsg (const std::string &msg, const debug::Priority &priority=debug::Priority::INFO, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cout) const
 
int printMsg (const std::vector< std::string > &msgs, const debug::Priority &priority=debug::Priority::INFO, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cout) const
 
int printErr (const std::string &msg, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cerr) const
 
int printWrn (const std::string &msg, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cerr) const
 
int printMsg (const std::string &msg, const double &progress, const double &time, const int &threads, const double &memory, const debug::LineMode &lineMode=debug::LineMode::NEW, const debug::Priority &priority=debug::Priority::PERFORMANCE, std::ostream &stream=std::cout) const
 
int printMsg (const std::string &msg, const double &progress, const double &time, const debug::LineMode &lineMode=debug::LineMode::NEW, const debug::Priority &priority=debug::Priority::PERFORMANCE, std::ostream &stream=std::cout) const
 
int printMsg (const std::string &msg, const double &progress, const double &time, const int &threads, const debug::LineMode &lineMode=debug::LineMode::NEW, const debug::Priority &priority=debug::Priority::PERFORMANCE, std::ostream &stream=std::cout) const
 
int printMsg (const std::string &msg, const double &progress, const debug::LineMode &lineMode=debug::LineMode::NEW, const debug::Priority &priority=debug::Priority::PERFORMANCE, std::ostream &stream=std::cout) const
 
int printMsg (const std::string &msg, const double &progress, const debug::Priority &priority, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cout) const
 
int printMsg (const std::vector< std::vector< std::string > > &rows, const debug::Priority &priority=debug::Priority::INFO, const bool hasHeader=true, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cout) const
 
int printMsg (const debug::Separator &separator, const debug::LineMode &lineMode=debug::LineMode::NEW, const debug::Priority &priority=debug::Priority::INFO, std::ostream &stream=std::cout) const
 
int printMsg (const debug::Separator &separator, const debug::Priority &priority, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cout) const
 
int printMsg (const std::string &msg, const debug::Separator &separator, const debug::LineMode &lineMode=debug::LineMode::NEW, const debug::Priority &priority=debug::Priority::INFO, std::ostream &stream=std::cout) const
 
void setDebugMsgPrefix (const std::string &prefix)
 
- Public Member Functions inherited from ttk::BaseClass
 BaseClass ()
 
virtual ~BaseClass ()=default
 
int getThreadNumber () const
 
virtual int setThreadNumber (const int threadNumber)
 

Protected Attributes

ttk::SimplexId vertexNumber_
 
ttk::SimplexId seedNumber_
 
ttk::SimplexId chunkSize_
 
ttk::SimplexId direction_
 
void * inputScalarField_
 
const ttk::SimplexIdinputOffsets_
 
std::vector< ttk::SimplexId > * vertexIdentifierScalarField_
 
std::vector< ttk::ArrayLinkedList< ttk::intgl::IntegralLine, INTEGRAL_LINE_TABULAR_SIZE > > * outputIntegralLines_
 
ttk::ScalarFieldCriticalPoints scalarFieldCriticalPoints_
 
bool EnableForking {false}
 
- Protected Attributes inherited from ttk::Debug
int debugLevel_
 
std::string debugMsgPrefix_
 
std::string debugMsgNamePrefix_
 
- Protected Attributes inherited from ttk::BaseClass
bool lastObject_
 
int threadNumber_
 
Wrapperwrapper_
 

Additional Inherited Members

- Protected Member Functions inherited from ttk::Debug
int printMsgInternal (const std::string &msg, const std::string &right, const std::string &filler, const debug::Priority &priority=debug::Priority::INFO, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cout) const
 
int printMsgInternal (const std::string &msg, const debug::Priority &priority, const debug::LineMode &lineMode, std::ostream &stream=std::cout) const
 
int welcomeMsg (std::ostream &stream)
 
- Static Protected Attributes inherited from ttk::Debug
static COMMON_EXPORTS debug::LineMode lastLineMode = ttk::debug::LineMode::NEW
 

Detailed Description

TTK processing package for the computation of edge-based integral lines of the gradient of an input scalar field defined on a PL manifold.

Author
Guillaume Favelier guill.nosp@m.aume.nosp@m..fave.nosp@m.lier.nosp@m.@lip6.nosp@m..fr
Eve Le Guillou eve.l.nosp@m.e-gu.nosp@m.illou.nosp@m.@lip.nosp@m.6.fr
Date
March 2016
MPI implementation: December 2022

Given a list of sources, the package produces forward or backward integral lines along the edges of the input triangulation.

See also
ttkIntegralLines.cpp for a usage example.

Online examples:\n

Definition at line 119 of file IntegralLines.h.

Constructor & Destructor Documentation

◆ IntegralLines()

IntegralLines::IntegralLines ( )

Definition at line 6 of file IntegralLines.cpp.

◆ ~IntegralLines()

IntegralLines::~IntegralLines ( )
overridedefault

Member Function Documentation

◆ buildScalarFieldCriticalPoints()

void ttk::IntegralLines::buildScalarFieldCriticalPoints ( )
inline

Definition at line 367 of file IntegralLines.h.

◆ computeIntegralLine()

template<class triangulationType >
void ttk::IntegralLines::computeIntegralLine ( const triangulationType *  triangulation,
ttk::intgl::IntegralLine integralLine,
const ttk::SimplexId offsets 
) const

Computes the integral line starting at the vertex of global id seedIdentifier.

Template Parameters
triangulationType
Parameters
triangulation
integralLineintegral line to compute
offsetsOrder array of the scalar array

Definition at line 509 of file IntegralLines.h.

◆ createTask()

template<class triangulationType >
void ttk::IntegralLines::createTask ( const triangulationType *  triangulation,
std::vector< ttk::intgl::IntegralLine * > &  chunkIntegralLine,
const ttk::SimplexId offsets,
int  nbElement 
) const

Create an OpenMP task that contains the computation of nbElement integral lines.

Template Parameters
triangulationType
Parameters
triangulation
chunkIntegralLineintegral lines to compute within one task
offsetsOrder array of the scalar array
nbElementnumber of integral lines in chunkIntegralLine

Definition at line 682 of file IntegralLines.h.

◆ execute()

template<class triangulationType >
int ttk::IntegralLines::execute ( triangulationType *  triangulation)

Definition at line 701 of file IntegralLines.h.

◆ findNextVertex()

void ttk::IntegralLines::findNextVertex ( ttk::SimplexId vnext,
ttk::SimplexId fnext,
std::vector< ttk::SimplexId > &  component,
const SimplexId offsets 
) const
inline

Finds the vertex of highest or lowest offsets (depending on the direction of the integral line) in the component vector.

Parameters
vnextidentifier of the vertex
fnextoffset of the vertex
componentlist of identifiers to do the search in
offsetsOrder array of the scalar array

Definition at line 488 of file IntegralLines.h.

◆ preconditionTriangulation()

int ttk::IntegralLines::preconditionTriangulation ( ttk::AbstractTriangulation triangulation)
inline

Definition at line 326 of file IntegralLines.h.

◆ prepareForTask() [1/2]

template<class triangulationType >
void ttk::IntegralLines::prepareForTask ( const triangulationType *  triangulation,
std::vector< ttk::intgl::IntegralLine * > &  chunkIntegralLine,
int  startingIndex,
int  nbElement,
std::vector< SimplexId > *  seeds 
) const

Initializes the three attributes of an integral line: the global id of its seed, its trajectory, and the distances of its points with regards to its seed. Then stores the pointers to those objects in chunkIntegralLine to use it for task creation.

Template Parameters
triangulationType
Parameters
triangulation
chunkIntegralLineintegral lines to compute within one task
startingIndexindex of the first seed of seeds to be used to create an integral line and add it to chunkIntegralLine
nbElementnumber of integral lines in chunkIntegralLine
seedsstarting points of the integral lines to be computed

◆ prepareForTask() [2/2]

template<class triangulationType >
void ttk::IntegralLines::prepareForTask ( const triangulationType *  ttkNotUsedtriangulation,
std::vector< ttk::intgl::IntegralLine * > &  chunkIntegralLine,
int  startingIndex,
int  nbElement,
std::vector< SimplexId > *  seeds 
) const

Definition at line 651 of file IntegralLines.h.

◆ setChunkSize()

void ttk::IntegralLines::setChunkSize ( int  size)
inline

Definition at line 363 of file IntegralLines.h.

◆ setDirection()

void ttk::IntegralLines::setDirection ( int  direction)
inline

Definition at line 187 of file IntegralLines.h.

◆ setInputOffsets()

void ttk::IntegralLines::setInputOffsets ( const SimplexId *const  data)
inline
Precondition
For this function to behave correctly in the absence of the VTK wrapper, ttk::preconditionOrderArray() needs to be called to fill the data buffer prior to any computation (the VTK wrapper already includes a mechanism to automatically generate such a preconditioned buffer).
See also
examples/c++/main.cpp for an example use.

Definition at line 347 of file IntegralLines.h.

◆ setInputScalarField()

void ttk::IntegralLines::setInputScalarField ( void *  data)
inline

Definition at line 335 of file IntegralLines.h.

◆ setOutputIntegralLines()

void ttk::IntegralLines::setOutputIntegralLines ( std::vector< ttk::ArrayLinkedList< ttk::intgl::IntegralLine, INTEGRAL_LINE_TABULAR_SIZE > > *  integralLines)
inline

Definition at line 356 of file IntegralLines.h.

◆ setSeedNumber()

void ttk::IntegralLines::setSeedNumber ( const SimplexId seedNumber)
inline

Definition at line 183 of file IntegralLines.h.

◆ setVertexIdentifierScalarField()

void ttk::IntegralLines::setVertexIdentifierScalarField ( std::vector< SimplexId > *const  data)
inline

Definition at line 352 of file IntegralLines.h.

◆ setVertexNumber()

void ttk::IntegralLines::setVertexNumber ( const SimplexId vertexNumber)
inline

Definition at line 179 of file IntegralLines.h.

Member Data Documentation

◆ chunkSize_

ttk::SimplexId ttk::IntegralLines::chunkSize_
protected

Definition at line 374 of file IntegralLines.h.

◆ direction_

ttk::SimplexId ttk::IntegralLines::direction_
protected

Definition at line 375 of file IntegralLines.h.

◆ EnableForking

bool ttk::IntegralLines::EnableForking {false}
protected

Definition at line 383 of file IntegralLines.h.

◆ inputOffsets_

const ttk::SimplexId* ttk::IntegralLines::inputOffsets_
protected

Definition at line 377 of file IntegralLines.h.

◆ inputScalarField_

void* ttk::IntegralLines::inputScalarField_
protected

Definition at line 376 of file IntegralLines.h.

◆ outputIntegralLines_

std::vector<ttk::ArrayLinkedList<ttk::intgl::IntegralLine, INTEGRAL_LINE_TABULAR_SIZE> >* ttk::IntegralLines::outputIntegralLines_
protected

Definition at line 381 of file IntegralLines.h.

◆ scalarFieldCriticalPoints_

ttk::ScalarFieldCriticalPoints ttk::IntegralLines::scalarFieldCriticalPoints_
protected

Definition at line 382 of file IntegralLines.h.

◆ seedNumber_

ttk::SimplexId ttk::IntegralLines::seedNumber_
protected

Definition at line 373 of file IntegralLines.h.

◆ vertexIdentifierScalarField_

std::vector<ttk::SimplexId>* ttk::IntegralLines::vertexIdentifierScalarField_
protected

Definition at line 378 of file IntegralLines.h.

◆ vertexNumber_

ttk::SimplexId ttk::IntegralLines::vertexNumber_
protected

Definition at line 372 of file IntegralLines.h.


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