OpenCMISS-Iron Internal API Documentation
|
This module handles all solver matrix and rhs routines. More...
Functions/Subroutines | |
subroutine, public | solver_matrices_create_finish (SOLVER_MATRICES, ERR, ERROR,) |
Finishes the process of creating the solver matrices. More... | |
subroutine, public | solver_matrices_create_start (SOLVER_EQUATIONS, SOLVER_MATRICES, ERR, ERROR,) |
Starts the process of creating the solver matrices. More... | |
subroutine, public | solver_matrices_destroy (SOLVER_MATRICES, ERR, ERROR,) |
Destroy the solver matrices. More... | |
subroutine | solver_matrices_finalise (SOLVER_MATRICES, ERR, ERROR,) |
Finalises the solver matrices and deallocates all memory. More... | |
subroutine | solver_matrices_initialise (SOLVER_EQUATIONS, ERR, ERROR,) |
Initialises the solver matrices for solver equations. More... | |
subroutine | solver_matrices_library_type_get (SOLVER_MATRICES, LIBRARY_TYPE, ERR, ERROR,) |
Gets the library type for the solver matrices (and vectors) More... | |
subroutine, public | solver_matrices_library_type_set (SOLVER_MATRICES, LIBRARY_TYPE, ERR, ERROR,) |
Sets the library type for the solver matrices (and vectors) More... | |
subroutine, public | solver_matrices_output (ID, SELECTION_TYPE, SOLVER_MATRICES, ERR, ERROR,) |
Outputs the solver matrices. More... | |
subroutine | solver_matrices_storage_type_get (SOLVER_MATRICES, STORAGE_TYPE, ERR, ERROR,) |
Gets the storage type (sparsity) of the solver matrices. More... | |
subroutine, public | solver_matrices_storage_type_set (SOLVER_MATRICES, STORAGE_TYPE, ERR, ERROR,) |
Sets the storage type (sparsity) of the solver matrices. More... | |
subroutine, public | solver_matrix_equations_matrix_add (SOLVER_MATRIX, equations_set_idx, ALPHA, EQUATIONS_MATRIX, ERR, ERROR,) |
Adds alpha times the equations matrix into the solver matrix. More... | |
subroutine, public | solver_matrix_interface_matrix_add (SOLVER_MATRIX, interface_condition_idx, ALPHA, INTERFACE_MATRIX, ERR, ERROR,) |
Adds alpha times the interface matrix into the solver matrix. More... | |
subroutine, public | solver_matrix_jacobian_matrix_add (SOLVER_MATRIX, equations_set_idx, ALPHA, JACOBIAN_MATRIX, ERR, ERROR,) |
Adds alpha times the Jacobian matrix into the solver matrix. More... | |
subroutine | solver_matrix_structure_calculate (SOLVER_MATRIX, NUMBER_OF_NON_ZEROS, ROW_INDICES, COLUMN_INDICES, ERR, ERROR,) |
Calculates the structure (sparsity) of the solver matrix from the soluton mapping. More... | |
subroutine | solver_matrix_finalise (SOLVER_MATRIX, ERR, ERROR,) |
Finalises a solver matrix and deallocates all memory. More... | |
subroutine | solver_matrix_form (SOLVER_MATRIX, ERR, ERROR,) |
Forms a solver matrix by initialising the structure of the matrix to zero. More... | |
subroutine | solver_matrix_initialise (SOLVER_MATRICES, MATRIX_NUMBER, ERR, ERROR,) |
Initialises a solver matrix. More... | |
Variables | |
integer(intg), parameter, public | solver_matrices_all =1 |
Select all the solver matrices and vectors. More... | |
integer(intg), parameter, public | solver_matrices_linear_only =3 |
Select only the linear solver matrices and vectors. More... | |
integer(intg), parameter, public | solver_matrices_nonlinear_only =4 |
Select only the nonlinear solver matrices and vectors. More... | |
integer(intg), parameter, public | solver_matrices_jacobian_only =5 |
Select only the Jacobian solver matrix. More... | |
integer(intg), parameter, public | solver_matrices_residual_only =6 |
Select only the residual solver vector. More... | |
integer(intg), parameter, public | solver_matrices_rhs_only =7 |
Select only the RHS solver vector. More... | |
integer(intg), parameter, public | solver_matrices_rhs_residual_only =8 |
Select only the residual and RHS solver vectors. More... | |
This module handles all solver matrix and rhs routines.
subroutine, public solver_matrices_routines::solver_matrices_create_finish | ( | type(solver_matrices_type), pointer | SOLVER_MATRICES, |
integer(intg), intent(out) | ERR, | ||
type(varying_string), intent(out) | ERROR | ||
) |
Finishes the process of creating the solver matrices.
solver_matrices | A pointer to the solver matrices | |
[out] | err | The error code |
[out] | error | The error string |
Definition at line 104 of file solver_matrices_routines.f90.
References distributed_matrix_vector::distributed_matrix_block_storage_type, distributed_matrix_vector::distributed_matrix_create_finish(), distributed_matrix_vector::distributed_matrix_create_start(), distributed_matrix_vector::distributed_matrix_data_type_set(), distributed_matrix_vector::distributed_matrix_diagonal_storage_type, distributed_matrix_vector::distributed_matrix_library_type_set(), distributed_matrix_vector::distributed_matrix_number_non_zeros_set(), distributed_matrix_vector::distributed_matrix_storage_locations_set(), distributed_matrix_vector::distributed_matrix_storage_type_set(), distributed_matrix_vector::distributed_vector_create_finish(), distributed_matrix_vector::distributed_vector_create_start(), distributed_matrix_vector::distributed_vector_data_type_set(), distributed_matrix_vector::distributed_vector_library_type_set(), base_routines::enters(), base_routines::exits(), matrix_vector::matrix_vector_dp_type, problem_constants::problem_solver_nonlinear, kinds::ptr, solver_matrices_finalise(), and solver_matrix_structure_calculate().
Referenced by solver_routines::solver_dynamic_create_finish().
subroutine, public solver_matrices_routines::solver_matrices_create_start | ( | type(solver_equations_type), pointer | SOLVER_EQUATIONS, |
type(solver_matrices_type), pointer | SOLVER_MATRICES, | ||
integer(intg), intent(out) | ERR, | ||
type(varying_string), intent(out) | ERROR | ||
) |
Starts the process of creating the solver matrices.
solver_equations | A pointer to the solver equations to create the solver matrices for | |
solver_matrices | On return, a pointer to the solver matrices. Must not be associated on entry. | |
[out] | err | The error code |
[out] | error | The error string |
Definition at line 218 of file solver_matrices_routines.f90.
References base_routines::enters(), base_routines::exits(), solver_matrices_finalise(), and solver_matrices_initialise().
Referenced by solver_routines::solver_dynamic_create_finish().
subroutine, public solver_matrices_routines::solver_matrices_destroy | ( | type(solver_matrices_type), pointer | SOLVER_MATRICES, |
integer(intg), intent(out) | ERR, | ||
type(varying_string), intent(out) | ERROR | ||
) |
Destroy the solver matrices.
solver_matrices | A pointer the solver matrices to destroy | |
[out] | err | The error code |
[out] | error | The error string |
Definition at line 260 of file solver_matrices_routines.f90.
References base_routines::enters(), base_routines::exits(), and solver_matrices_finalise().
|
private |
Finalises the solver matrices and deallocates all memory.
solver_matrices | A pointer to the solver matrices to finalise | |
[out] | err | The error code |
[out] | error | The error string |
Definition at line 288 of file solver_matrices_routines.f90.
References distributed_matrix_vector::distributed_vector_destroy(), base_routines::enters(), base_routines::exits(), and solver_matrix_finalise().
Referenced by solver_matrices_create_finish(), solver_matrices_create_start(), solver_matrices_destroy(), and solver_matrices_initialise().
|
private |
Initialises the solver matrices for solver equations.
solver_equations | A pointer to the solver equations to initialise the solver matrices for | |
[out] | err | The error code |
[out] | error | The error string |
Definition at line 323 of file solver_matrices_routines.f90.
References distributed_matrix_vector::distributed_matrix_vector_petsc_type, base_routines::enters(), base_routines::exits(), problem_constants::problem_solver_nonlinear, solver_matrices_finalise(), and solver_matrix_initialise().
Referenced by solver_matrices_create_start().
|
private |
Gets the library type for the solver matrices (and vectors)
solver_matrices | A pointer to the solver matrices. | |
[out] | library_type | On return, the library type of the specified solver matrices |
[out] | err | The error code |
[out] | error | The error string |
Definition at line 416 of file solver_matrices_routines.f90.
References base_routines::enters(), and base_routines::exits().
Referenced by solver_routines::solver_dynamic_create_finish().
subroutine, public solver_matrices_routines::solver_matrices_library_type_set | ( | type(solver_matrices_type), pointer | SOLVER_MATRICES, |
integer(intg), intent(in) | LIBRARY_TYPE, | ||
integer(intg), intent(out) | ERR, | ||
type(varying_string), intent(out) | ERROR | ||
) |
Sets the library type for the solver matrices (and vectors)
solver_matrices | A pointer to the solver matrices. | |
[in] | library_type | The library type to set |
[out] | err | The error code |
[out] | error | The error string |
Definition at line 449 of file solver_matrices_routines.f90.
References distributed_matrix_vector::distributed_matrix_vector_cmiss_type, distributed_matrix_vector::distributed_matrix_vector_petsc_type, base_routines::enters(), and base_routines::exits().
Referenced by solver_routines::solver_dynamic_create_finish().
subroutine, public solver_matrices_routines::solver_matrices_output | ( | integer(intg), intent(in) | ID, |
integer(intg), intent(in) | SELECTION_TYPE, | ||
type(solver_matrices_type), pointer | SOLVER_MATRICES, | ||
integer(intg), intent(out) | ERR, | ||
type(varying_string), intent(out) | ERROR | ||
) |
Outputs the solver matrices.
[in] | id | The ID of the ouptut stream |
[in] | selection_type | The type of matrix selection |
solver_matrices | A pointer to the solver matrices | |
[out] | err | The error code |
[out] | error | The error string |
Definition at line 490 of file solver_matrices_routines.f90.
References distributed_matrix_vector::distributed_matrix_output(), distributed_matrix_vector::distributed_vector_output(), base_routines::enters(), base_routines::exits(), solver_matrices_all, solver_matrices_jacobian_only, solver_matrices_linear_only, solver_matrices_nonlinear_only, solver_matrices_residual_only, solver_matrices_rhs_only, and solver_matrices_rhs_residual_only.
|
private |
Gets the storage type (sparsity) of the solver matrices.
solver_matrices | A pointer to the solver matrices | |
[out] | storage_type | STORAGE_TYPE(matrix_idx). On return, the storage type for the matrix_idx'th solver matrix |
[out] | err | The error code |
[out] | error | The error string |
Definition at line 562 of file solver_matrices_routines.f90.
References base_routines::enters(), and base_routines::exits().
subroutine, public solver_matrices_routines::solver_matrices_storage_type_set | ( | type(solver_matrices_type), pointer | SOLVER_MATRICES, |
integer(intg), dimension(:), intent(in) | STORAGE_TYPE, | ||
integer(intg), intent(out) | ERR, | ||
type(varying_string), intent(out) | ERROR | ||
) |
Sets the storage type (sparsity) of the solver matrices.
solver_matrices | A pointer to the solver matrices | |
[in] | storage_type | STORAGE_TYPE(matrix_idx). The storage type for the matrix_idx'th solver matrix |
[out] | err | The error code |
[out] | error | The error string |
Definition at line 611 of file solver_matrices_routines.f90.
References base_routines::enters(), base_routines::exits(), matrix_vector::matrix_block_storage_type, matrix_vector::matrix_column_major_storage_type, matrix_vector::matrix_compressed_column_storage_type, matrix_vector::matrix_compressed_row_storage_type, matrix_vector::matrix_diagonal_storage_type, matrix_vector::matrix_row_column_storage_type, and matrix_vector::matrix_row_major_storage_type.
Referenced by solver_routines::solver_dynamic_create_finish().
subroutine, public solver_matrices_routines::solver_matrix_equations_matrix_add | ( | type(solver_matrix_type), pointer | SOLVER_MATRIX, |
integer(intg), intent(in) | equations_set_idx, | ||
real(dp), intent(in) | ALPHA, | ||
type(equations_matrix_type), pointer | EQUATIONS_MATRIX, | ||
integer(intg), intent(out) | ERR, | ||
type(varying_string), intent(out) | ERROR | ||
) |
Adds alpha times the equations matrix into the solver matrix.
solver_matrix | A pointer to the solver matrix | |
[in] | equations_set_idx | The equations set index in the solver mapping that contains the equations matrix to add |
[in] | alpha | The multiplicative factor for the equations matrix |
equations_matrix | A pointer to the equations matrix to add | |
[out] | err | The error code |
[out] | error | The error string |
Definition at line 679 of file solver_matrices_routines.f90.
References distributed_matrix_vector::distributed_matrix_block_storage_type, distributed_matrix_vector::distributed_matrix_column_major_storage_type, distributed_matrix_vector::distributed_matrix_compressed_column_storage_type, distributed_matrix_vector::distributed_matrix_compressed_row_storage_type, distributed_matrix_vector::distributed_matrix_diagonal_storage_type, distributed_matrix_vector::distributed_matrix_row_column_storage_type, distributed_matrix_vector::distributed_matrix_row_major_storage_type, distributed_matrix_vector::distributed_matrix_storage_locations_get(), distributed_matrix_vector::distributed_matrix_storage_type_get(), base_routines::enters(), and base_routines::exits().
|
private |
Finalises a solver matrix and deallocates all memory.
solver_matrix | A pointer to the solver matrix to finalise | |
[out] | err | The error code |
[out] | error | The error string |
Definition at line 2311 of file solver_matrices_routines.f90.
References distributed_matrix_vector::distributed_matrix_destroy(), distributed_matrix_vector::distributed_vector_destroy(), base_routines::enters(), and base_routines::exits().
Referenced by solver_matrices_finalise(), and solver_matrix_initialise().
|
private |
Forms a solver matrix by initialising the structure of the matrix to zero.
solver_matrix | A pointer to the solver matrix to finalise | |
[out] | err | The error code |
[out] | error | The error string |
Definition at line 2339 of file solver_matrices_routines.f90.
References distributed_matrix_vector::distributed_matrix_form(), base_routines::enters(), and base_routines::exits().
|
private |
Initialises a solver matrix.
solver_matrices | A pointer to the solver matrices to initialise | |
[in] | matrix_number | The matrix number in the solver matrices to initialise |
[out] | err | The error code |
[out] | error | The error string |
Definition at line 2367 of file solver_matrices_routines.f90.
References base_routines::enters(), base_routines::exits(), matrix_vector::matrix_block_storage_type, and solver_matrix_finalise().
Referenced by solver_matrices_initialise().
subroutine, public solver_matrices_routines::solver_matrix_interface_matrix_add | ( | type(solver_matrix_type), pointer | SOLVER_MATRIX, |
integer(intg), intent(in) | interface_condition_idx, | ||
real(dp), dimension(2), intent(in) | ALPHA, | ||
type(interface_matrix_type), pointer | INTERFACE_MATRIX, | ||
integer(intg), intent(out) | ERR, | ||
type(varying_string), intent(out) | ERROR | ||
) |
Adds alpha times the interface matrix into the solver matrix.
solver_matrix | A pointer to the solver matrix | |
[in] | interface_condition_idx | The interface_condition_idx index in the solver mapping that contains the interface matrix to add |
[in] | alpha | The multiplicative factor for the interface matrix |
interface_matrix | A pointer to the interface matrix to add | |
[out] | err | The error code |
[out] | error | The error string |
Definition at line 903 of file solver_matrices_routines.f90.
References distributed_matrix_vector::distributed_matrix_block_storage_type, distributed_matrix_vector::distributed_matrix_column_major_storage_type, distributed_matrix_vector::distributed_matrix_compressed_column_storage_type, distributed_matrix_vector::distributed_matrix_compressed_row_storage_type, distributed_matrix_vector::distributed_matrix_diagonal_storage_type, distributed_matrix_vector::distributed_matrix_row_column_storage_type, distributed_matrix_vector::distributed_matrix_row_major_storage_type, distributed_matrix_vector::distributed_matrix_storage_locations_get(), distributed_matrix_vector::distributed_matrix_storage_type_get(), base_routines::enters(), and base_routines::exits().
subroutine, public solver_matrices_routines::solver_matrix_jacobian_matrix_add | ( | type(solver_matrix_type), pointer | SOLVER_MATRIX, |
integer(intg), intent(in) | equations_set_idx, | ||
real(dp), intent(in) | ALPHA, | ||
type(equations_jacobian_type), pointer | JACOBIAN_MATRIX, | ||
integer(intg), intent(out) | ERR, | ||
type(varying_string), intent(out) | ERROR | ||
) |
Adds alpha times the Jacobian matrix into the solver matrix.
solver_matrix | A pointer to the solver matrix | |
[in] | equations_set_idx | The equations set index in the solver mapping that contains the Jacobian matrix to add |
[in] | alpha | The multiplicative factor for the Jacobian matrix |
jacobian_matrix | A pointer to the Jacobian matrix to add | |
[out] | err | The error code |
[out] | error | The error string |
Definition at line 1259 of file solver_matrices_routines.f90.
References distributed_matrix_vector::distributed_matrix_block_storage_type, distributed_matrix_vector::distributed_matrix_column_major_storage_type, distributed_matrix_vector::distributed_matrix_compressed_column_storage_type, distributed_matrix_vector::distributed_matrix_compressed_row_storage_type, distributed_matrix_vector::distributed_matrix_diagonal_storage_type, distributed_matrix_vector::distributed_matrix_row_column_storage_type, distributed_matrix_vector::distributed_matrix_row_major_storage_type, distributed_matrix_vector::distributed_matrix_storage_locations_get(), distributed_matrix_vector::distributed_matrix_storage_type_get(), base_routines::enters(), and base_routines::exits().
|
private |
Calculates the structure (sparsity) of the solver matrix from the soluton mapping.
solver_matrix | A pointer to the solver matrix to calculate the structure for | |
[out] | number_of_non_zeros | On return the number of non-zeros in the solver matrix |
row_indices | On return a pointer to row location indices in compressed row format. The pointers must be NULL on entry and the calling routine is responsible for deallocation. | |
column_indices | On return a pointer to the column location indices in compressed row format. The pointers must be NULL on entry and the calling routine is responsible for deallocation. | |
[out] | err | The error code |
[out] | error | The error string |
Definition at line 1485 of file solver_matrices_routines.f90.
References base_routines::diagnostic_output_type, base_routines::diagnostics1, base_routines::diagnostics2, distributed_matrix_vector::distributed_matrix_block_storage_type, distributed_matrix_vector::distributed_matrix_column_major_storage_type, distributed_matrix_vector::distributed_matrix_compressed_column_storage_type, distributed_matrix_vector::distributed_matrix_compressed_row_storage_type, distributed_matrix_vector::distributed_matrix_diagonal_storage_type, distributed_matrix_vector::distributed_matrix_max_columns_per_row_get(), distributed_matrix_vector::distributed_matrix_row_column_storage_type, distributed_matrix_vector::distributed_matrix_row_major_storage_type, distributed_matrix_vector::distributed_matrix_storage_locations_get(), distributed_matrix_vector::distributed_matrix_storage_type_get(), base_routines::enters(), base_routines::exits(), interface_conditions_constants::interface_condition_augmented_lagrange_method, interface_conditions_constants::interface_condition_lagrange_multipliers_method, interface_conditions_constants::interface_condition_penalty_method, and interface_conditions_constants::interface_condition_point_to_point_method.
Referenced by solver_matrices_create_finish().