OFELI's Logo

An Object Oriented Finite Element Library

FastMarching Class Reference

class for the fast marching algorithm on uniform grids More...

#include <FastMarching.h>

+ Inheritance diagram for FastMarching:

Public Member Functions

 FastMarching ()
 Default Constructor. More...
 
 FastMarching (const Grid &g, Vect< real_t > &T)
 Constructor using grid data. More...
 
 FastMarching (const Grid &g, Vect< real_t > &T, Vect< real_t > &F)
 Constructor. More...
 
 ~FastMarching ()
 Destructor.
 
void set (const Grid &g, Vect< real_t > &T)
 Define grid and solution vector. More...
 
void set (const Grid &g, Vect< real_t > &T, Vect< real_t > &F)
 Define grid, solution vector and prppagation speed. More...
 
int run ()
 Execute Fast Marching Procedure. More...
 
real_t getResidual ()
 Check consistency by computing the discrete residual. More...
 
- Public Member Functions inherited from Equa
 Equa ()
 Default constructor.
 
virtual ~Equa ()
 Destructor.
 
void setMesh (Mesh &m)
 Define mesh and renumber DOFs after removing imposed ones.
 
MeshgetMesh () const
 Return reference to Mesh instance. More...
 
LinearSolver< real_t > & getLinearSolver ()
 Return reference to linear solver instance.
 
Matrix< real_t > * getMatrix () const
 Return pointer to matrix.
 
void setSolver (Iteration ls, Preconditioner pc=IDENT_PREC)
 Choose solver for the linear system. More...
 
void setLinearSolver (Iteration ls, Preconditioner pc=IDENT_PREC)
 Choose solver for the linear system. More...
 
void setMatrixType (int t)
 Choose type of matrix. More...
 
int solveLinearSystem (Matrix< real_t > *A, Vect< real_t > &b, Vect< real_t > &x)
 Solve the linear system with given matrix and right-hand side. More...
 
int solveLinearSystem (Vect< real_t > &b, Vect< real_t > &x)
 Solve the linear system with given right-hand side. More...
 

Detailed Description

class for the fast marching algorithm on uniform grids

This class implements the Fast Marching method to solve the eikonal equation in a uniform grid (1-D, 2-D or 3-D). In other words, the class solves the partial differential equation |∇u|F = 1 with u = 0 on the interface, where F is the velocity

Constructor & Destructor Documentation

◆ FastMarching() [1/3]

Default Constructor.

Initializes to default value grid data

◆ FastMarching() [2/3]

FastMarching ( const Grid g,
Vect< real_t > &  T 
)

Constructor using grid data.

Constructor using Grid instance

Parameters
[in]gInstance of class Grid
[in]TVector containing the on input an initialization of the distance function and once the function run is invoked the distance at grid nodes. The initialization vector must use the following rules:
  • The solution must be supplied at all grid points in the vicinity of the interface(s).
  • All other grid nodes must have the value INFINITY wth positive value if the node is in an outer domain and negative if it is in an inner domain

◆ FastMarching() [3/3]

FastMarching ( const Grid g,
Vect< real_t > &  T,
Vect< real_t > &  F 
)

Constructor.

Constructor using Grid instance and propagation speed

Parameters
[in]gInstance of class Grid
[in]TVector containing the on input an initialization of the distance function and once the function run is invoked the distance at grid nodes. The initialization vector must use the following rules:
  • The solution must be supplied at all grid points in the vicinity of the interface(s).
  • All other grid nodes must have the value INFINITY wth positive value if the node is in an outer domain and negative if it is in an inner domain
[in]FVector containing propagation speed at grid nodes

Member Function Documentation

◆ getResidual()

real_t getResidual ( )

Check consistency by computing the discrete residual.

This function returns residual error (||∇ u|^2|F|-1|)

◆ run()

int run ( )

Execute Fast Marching Procedure.

Once this function is invoked, the vector T in the constructor or in the member function set contains the solution.

Returns
Return value:
  • = 0 if solution has been normally computed
  • != 0 An error has occurred

◆ set() [1/2]

void set ( const Grid g,
Vect< real_t > &  T 
)

Define grid and solution vector.

This function is to be used if the default constructor has been used

Parameters
[in]gInstance of class Grid
[in]TVector containing the on input an initialization of the distance function and once the function run is invoked the distance at grid nodes. The initialization vector must use the following rules:
  • The solution must be supplied at all grid points in the vicinity of the interface(s).
  • All other grid nodes must have the value INFINITY wth positive value if the node is in an outer domain and negative if it is in an inner domain

◆ set() [2/2]

void set ( const Grid g,
Vect< real_t > &  T,
Vect< real_t > &  F 
)

Define grid, solution vector and prppagation speed.

This function is to be used if the default constructor has been used

Parameters
[in]gInstance of class Grid
[in]TVector containing the on input an initialization of the distance function and once the function run is invoked the distance at grid nodes. The initialization vector must use the following rules:
  • The solution must be supplied at all grid points in the vicinity of the interface(s).
  • All other grid nodes must have the value INFINITY wth positive value if the node is in an outer domain and negative if it is in an inner domain
[in]FVector containing propagation speed at grid nodes





Copyright © 1998-2022 Rachid Touzani