OpenCMISS-Iron Internal API Documentation
solver_matrices_routines Module Reference

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...
 

Detailed Description

This module handles all solver matrix and rhs routines.

Function/Subroutine Documentation

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 
)
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.

Parameters
solver_equationsA pointer to the solver equations to create the solver matrices for
solver_matricesOn return, a pointer to the solver matrices. Must not be associated on entry.
[out]errThe error code
[out]errorThe 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.

Parameters
solver_matricesA pointer the solver matrices to destroy
[out]errThe error code
[out]errorThe error string

Definition at line 260 of file solver_matrices_routines.f90.

References base_routines::enters(), base_routines::exits(), and solver_matrices_finalise().

subroutine solver_matrices_routines::solver_matrices_finalise ( type(solver_matrices_type), pointer  SOLVER_MATRICES,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)
private

Finalises the solver matrices and deallocates all memory.

Parameters
solver_matricesA pointer to the solver matrices to finalise
[out]errThe error code
[out]errorThe 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().

subroutine solver_matrices_routines::solver_matrices_initialise ( type(solver_equations_type), pointer  SOLVER_EQUATIONS,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)
private

Initialises the solver matrices for solver equations.

Parameters
solver_equationsA pointer to the solver equations to initialise the solver matrices for
[out]errThe error code
[out]errorThe 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().

subroutine solver_matrices_routines::solver_matrices_library_type_get ( type(solver_matrices_type), pointer  SOLVER_MATRICES,
integer(intg), intent(out)  LIBRARY_TYPE,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)
private

Gets the library type for the solver matrices (and vectors)

Parameters
solver_matricesA pointer to the solver matrices.
[out]library_typeOn return, the library type of the specified solver matrices
See also
DISTRIBUTED_MATRIX_VECTOR::LibraryTypes
Parameters
[out]errThe error code
[out]errorThe 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)

Parameters
solver_matricesA pointer to the solver matrices.
[in]library_typeThe library type to set
See also
DISTRIBUTED_MATRIX_VECTOR::LibraryTypes
Parameters
[out]errThe error code
[out]errorThe 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.

Parameters
[in]idThe ID of the ouptut stream
[in]selection_typeThe type of matrix selection
See also
SOLVER_MATRICES_ROUTINES::SelectMatricesTypes,SOLVER_MATRICES_ROUTINES
Parameters
solver_matricesA pointer to the solver matrices
[out]errThe error code
[out]errorThe 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.

subroutine solver_matrices_routines::solver_matrices_storage_type_get ( type(solver_matrices_type), pointer  SOLVER_MATRICES,
integer(intg), dimension(:), intent(out)  STORAGE_TYPE,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)
private

Gets the storage type (sparsity) of the solver matrices.

Parameters
solver_matricesA pointer to the solver matrices
[out]storage_typeSTORAGE_TYPE(matrix_idx). On return, the storage type for the matrix_idx'th solver matrix
[out]errThe error code
[out]errorThe 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.

Parameters
solver_matricesA pointer to the solver matrices
[in]storage_typeSTORAGE_TYPE(matrix_idx). The storage type for the matrix_idx'th solver matrix
[out]errThe error code
[out]errorThe 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 
)
subroutine solver_matrices_routines::solver_matrix_finalise ( type(solver_matrix_type), pointer  SOLVER_MATRIX,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)
private

Finalises a solver matrix and deallocates all memory.

Parameters
solver_matrixA pointer to the solver matrix to finalise
[out]errThe error code
[out]errorThe 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().

subroutine solver_matrices_routines::solver_matrix_form ( type(solver_matrix_type), pointer  SOLVER_MATRIX,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)
private

Forms a solver matrix by initialising the structure of the matrix to zero.

Parameters
solver_matrixA pointer to the solver matrix to finalise
[out]errThe error code
[out]errorThe 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().

subroutine solver_matrices_routines::solver_matrix_initialise ( type(solver_matrices_type), pointer  SOLVER_MATRICES,
integer(intg), intent(in)  MATRIX_NUMBER,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)
private

Initialises a solver matrix.

Parameters
solver_matricesA pointer to the solver matrices to initialise
[in]matrix_numberThe matrix number in the solver matrices to initialise
[out]errThe error code
[out]errorThe 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.

Parameters
solver_matrixA pointer to the solver matrix
[in]interface_condition_idxThe interface_condition_idx index in the solver mapping that contains the interface matrix to add
[in]alphaThe multiplicative factor for the interface matrix
interface_matrixA pointer to the interface matrix to add
[out]errThe error code
[out]errorThe 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 
)
subroutine solver_matrices_routines::solver_matrix_structure_calculate ( type(solver_matrix_type), pointer  SOLVER_MATRIX,
integer(intg), intent(out)  NUMBER_OF_NON_ZEROS,
integer(intg), dimension(:), pointer  ROW_INDICES,
integer(intg), dimension(:), pointer  COLUMN_INDICES,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)
private

Calculates the structure (sparsity) of the solver matrix from the soluton mapping.

Parameters
solver_matrixA pointer to the solver matrix to calculate the structure for
[out]number_of_non_zerosOn return the number of non-zeros in the solver matrix
row_indicesOn 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_indicesOn 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]errThe error code
[out]errorThe 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().