FastMarching3DG Class Reference

class for the fast marching algorithm on 3-D uniform grids More...

#include <FastMarching3DG.h>

Inheritance diagram for FastMarching3DG:
Equa

Public Member Functions

 FastMarching3DG ()
 Default Constructor.
 
 FastMarching3DG (const Grid &g, Vect< real_t > &T)
 Constructor using grid data.
 
 FastMarching3DG (const Grid &g, Vect< real_t > &T, Vect< real_t > &F)
 Constructor.
 
 ~FastMarching3DG ()
 Destructor.
 
void set (const Grid &g, Vect< real_t > &T)
 Define grid and solution vector.
 
void set (const Grid &g, Vect< real_t > &T, Vect< real_t > &F)
 Define grid, solution vector and prppagation speed.
 
int run ()
 Execute Fast Marching Procedure.
 
real_t getResidual ()
 Check consistency by computing the discrete residual.
 
- 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.
 
LinearSolvergetLinearSolver ()
 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.
 
void setMatrixType (int t)
 Choose type of matrix.
 
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.
 
int solveLinearSystem (Vect< real_t > &b, Vect< real_t > &x)
 Solve the linear system with given right-hand side.
 
void LinearSystemInfo ()
 Print info on linear system solver.
 

Detailed Description

class for the fast marching algorithm on 3-D uniform grids

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

Constructor & Destructor Documentation

◆ FastMarching3DG() [1/3]

Default Constructor.

Initializes to default value grid data

◆ FastMarching3DG() [2/3]

FastMarching3DG ( 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

◆ FastMarching3DG() [3/3]

FastMarching3DG ( 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|2-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