proteus.UnstructuredFMMandFSWsolvers module

Fast marching and fast sweeping solvers

Inheritance diagram of proteus.UnstructuredFMMandFSWsolvers

class proteus.UnstructuredFMMandFSWsolvers.FMMEikonalSolver(mesh, dofMap, nSpace, localSolverType='QianEtalV2', frontInitType='magnitudeOnly', debugLevel=3)[source]

Encapsulate naive implementation of Fast Marching Methods on unstructured grids for

\[\|\grad T\| = 1/F\]

\(T = 0\) on \(\Gamma\)

1d local solver is standard upwind approximation

2d local solver variations: acute triangulations version 1 or version 2 from Qian Zhang etal 07 obtuse triangulation not implemented

3d local solver varitions: not fully checked

For now, the input should be non-negative!

solve(phi0, T, nodalSpeeds=None, zeroTol=0.0001, trialTol=0.1, verbose=0)[source]

Test first order fast marching method algorithm for eikonal equation

|grad T | = 1, phi(

ec x) = 0, x in Gamma

assuming phi_0 describes initial location of interface Gamma and has reasonable values (absolute values) for T close to Gamma. Here T can be interpreted as the travel time from Gamma.

Right now assumes global node numbers <–> global dofs but this can be fixed easily Input

phi0: dof array from P1 C0 FiniteElementFunction holding initial condition

T : dof array from P1 C0 FiniteElementFunction for solution

Output T(

ec x_n) : travel time from initial front to node ( ec x_n)

Internal data structures

Status
: status of nodal point (dictionary)
-1 –> Far
0 –> Trial 1 –> Known

Trial : nodal points adjacent to front tuples (index,val) stored in heap

TODO
have return flag
cfmmfsw = <module 'proteus.cfmmfsw' from '/home/cekees/proteus/proteus/cfmmfsw.so'>[source]
class proteus.UnstructuredFMMandFSWsolvers.FSWEikonalSolver(mesh, dofMap, nSpace, iterAtol=1e-08, iterRtol=0.0, maxIts=100, localSolverType='QianEtalV2', frontInitType='magnitudeOnly', refPoints=None, orderApprox=1, LARGE=1.234e+28, debugLevel=3)[source]
Encapsulate naive implementation of Fast Marching Methods on unstructured grids
for
\[\|\grad T\| = 1/F\]

\(T = 0\) on \(\Gamma\)

1d local solver is standard upwind approximation

2d local solver variations: acute triangulations version 1 or version 2 from Qian Zhang etal 07 obtuse triangulation not implemented

3d local solver variations: not fully checked

For now, the input should be non-negative!

solve(phi0, T, nodalSpeeds=None, zeroTol=0.0001, trialTol=0.1, verbose=0)[source]

Test first order fast sweeping method algorithm for eikonal equation

|grad T | = 1, phi(

ec x) = 0, x in Gamma

assuming phi_0 describes initial location of interface Gamma and has reasonable values (absolute values) for T close to Gamma. Here T can be interpreted as the travel time from Gamma.

Right now assumes global node numbers <–> global dofs but this can be fixed easily Input

phi0: dof array holding P1 C0 FiniteElementFunction holding initial condition

T : dof array holding P1 C0 FiniteElementFunction for solution

Output T(

ec x_n) : travel time from initial front to node ( ec x_n)

Internal data structures

Status
: status of nodal point (dictionary)
0 –> Not Known (Trial) 1 –> Known

Order : ordering of points in domain using l_p metric from fixed reference points

cfmmfsw = <module 'proteus.cfmmfsw' from '/home/cekees/proteus/proteus/cfmmfsw.so'>[source]
proteus.UnstructuredFMMandFSWsolvers.unstructuredEx1d(initFunc, Lx, nx, method='FMM', verbose=0)[source]

run a couple of redistancing examples in 1d: circle and two circles

proteus.UnstructuredFMMandFSWsolvers.unstructuredEx2d(initFunc, Lx, Ly, nx, ny, method='FMM', verbose=0)[source]

run a couple of redistancing examples in 2d:

proteus.UnstructuredFMMandFSWsolvers.unstructuredEx3d(initFunc, Lx, Ly, Lz, nx, ny, nz, method='FMM', verbose=0)[source]

run a redistancing example in 3d:

proteus.UnstructuredFMMandFSWsolvers.test3dLocalSolver(verbose=0)[source]
proteus.UnstructuredFMMandFSWsolvers.unstructuredEx1dInCpp(initFunc, Lx, nx, method='FMM', verbose=0)[source]

run a couple of redistancing examples in 1d: circle and two circles use c++ interface

proteus.UnstructuredFMMandFSWsolvers.unstructuredEx2dInCpp(initFunc, Lx, Ly, nx, ny, method='FMM', verbose=0)[source]

run a couple of redistancing examples in 2d:

proteus.UnstructuredFMMandFSWsolvers.unstructuredEx3dinCpp(initFunc, Lx, Ly, Lz, nx, ny, nz, method='FMM', verbose=0)[source]

run a redistancing example in 3d: