The Open FUSION Toolkit 1.0.0-8905cc5
Modeling tools for plasma and fusion research and engineering
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
oft_nksolver Type Reference

Detailed Description

Native Newton solver.

Non-linear system solver based on Newton iteration for the system, \( M_j(x_i) = y_j \), where the Jacobian is defined as \( J_{ij} = \frac{\partial M_j}{\partial x_i} \). The non-linear update then takes the form \( x^{n+1} = x^n - J^{-1}(x^n) \cdot M(x^n) \).

Public Member Functions

procedure apply (self, u, g)
 Solve non-linear system.
 
procedure delete (self)
 Clean-up internal storage.
 

Public Attributes

class(oft_matrix), pointer a => NULL()
 Metric matrix.
 
real(r8atol = 1.d-14
 Absolute convergence tolerance \( |res| < atol \).
 
logical backtrack = .TRUE.
 Perform backtracking?
 
class(oft_solver_bc), pointer bc => NULL()
 Boundary condition.
 
integer(i4cits = 0
 Number of iteractions to convergence.
 
class(oft_vector), pointer du => NULL()
 Storage for non-linear corrections.
 
integer(i4its = -1
 Maximum iteration count.
 
class(oft_solver), pointer j_inv => NULL()
 Jacobian inverse solver.
 
integer(i4lits = 0
 Number of linear solver iteractions.
 
integer(i4nlits = 0
 Number of non-linear steps to convergence.
 
real(r8rtol = 1.d-14
 Relative convergence tolerance \( |res|/|res_0| < rtol \).
 
integer(i4up_freq = 1
 Frequency of jacobian updates.
 

Static Public Attributes

procedure(oft_update_jacobian), pointer, nopass j_update => NULL()
 Jacobian update subroutine.
 

Member Function/Subroutine Documentation

◆ apply()

procedure apply ( class(oft_nksolver), intent(inout)  self,
class(oft_vector), intent(inout)  u,
class(oft_vector), intent(inout)  g 
)

Solve non-linear system.

Parameters
[in,out]selfSolver object
[in,out]uGuess (input), Solution (output)
[in,out]gRHS (input), Residual (output)

◆ delete()

procedure delete ( class(oft_nksolver), intent(inout)  self)

Clean-up internal storage.

Parameters
[in,out]selfSolver object

Member Data Documentation

◆ a

class(oft_matrix), pointer a => NULL()

Metric matrix.

◆ atol

real(r8) atol = 1.d-14

Absolute convergence tolerance \( |res| < atol \).

◆ backtrack

logical backtrack = .TRUE.

Perform backtracking?

◆ bc

class(oft_solver_bc), pointer bc => NULL()

Boundary condition.

◆ cits

integer(i4) cits = 0

Number of iteractions to convergence.

◆ du

class(oft_vector), pointer du => NULL()

Storage for non-linear corrections.

◆ its

integer(i4) its = -1

Maximum iteration count.

◆ j_inv

class(oft_solver), pointer j_inv => NULL()

Jacobian inverse solver.

◆ j_update

procedure(oft_update_jacobian), pointer, nopass j_update => NULL()
static

Jacobian update subroutine.

◆ lits

integer(i4) lits = 0

Number of linear solver iteractions.

◆ nlits

integer(i4) nlits = 0

Number of non-linear steps to convergence.

◆ rtol

real(r8) rtol = 1.d-14

Relative convergence tolerance \( |res|/|res_0| < rtol \).

◆ up_freq

integer(i4) up_freq = 1

Frequency of jacobian updates.


The documentation for this type was generated from the following file: