ICFERST  22-06
Reservoir simulator based on DCVFEM, Dynamic Mesh optimisation and Surface-based modelling
multi_matrix_operations.F90 File Reference
#include "fdebug.h"
#include "petsc_legacy.h"
Include dependency graph for multi_matrix_operations.F90:

Modules

module  matrix_operations
 This module contain subroutines to deal with the ICFERST matrices format. This includes MATVECS and MATMAT operations All of this should be replaced by PETSc.
 

Functions/Subroutines

subroutine matrix_operations::matdmatinv (DMAT, DMATINV, NLOC)
 calculate DMATINV More...
 
subroutine matrix_operations::matinv (A, N, NMAX)
 : This sub finds the inverse of the matrix A and puts it back in A. MAT, MAT2, X and B are working vectors. More...
 
subroutine matrix_operations::matinvold (A, N, MAT, B)
 : This sub finds the inverse of the matrix A and puts it back in A. MAT, MAT2, X and B are working vectors. More...
 
subroutine matrix_operations::smlinngot (A, X, B, NMX, IPIV, GOTDEC)
 Calculate the inverse using the LU decomposition L can be provided, speeding up the method to O(n) More...
 
subroutine matrix_operations::color_get_cmc_pha (Mdims, Mspars, ndgln, Mmat, DIAG_SCALE_PRES, DIAG_SCALE_PRES_COUP, INV_B, CMC_petsc, CMC_PRECON, IGOT_CMC_PRECON, MASS_MN_PRES, pipes_aux, got_free_surf, MASS_SUF, FEM_continuity_equation)
 :Initialize the momentum equation (CMC) and introduces the corresponding values in it. COLOR_GET_CMC_PHA_FAST is very memory hungry, so we let the user decide or if we are using a compacted lumped mass matrix then the memory reduction compensates this extra memory usage More...
 
subroutine color_get_cmc_pha_slow (Mdims, Mspars, ndgln, Mmat, DIAG_SCALE_PRES, DIAG_SCALE_PRES_COUP, INV_B, CMC_petsc, CMC_PRECON, IGOT_CMC_PRECON, MASS_MN_PRES, MASS_PIPE, MASS_CVFEM2PIPE, MASS_CVFEM2PIPE_TRUE, got_free_surf, MASS_SUF, ndpset, FEM_continuity_equation)
 : form pressure matrix CMC using a colouring approach More...
 
subroutine color_get_cmc_pha_fast (Mdims, Mspars, ndgln, Mmat, DIAG_SCALE_PRES, DIAG_SCALE_PRES_COUP, INV_B, CMC_petsc, CMC_PRECON, IGOT_CMC_PRECON, MASS_MN_PRES, MASS_PIPE, MASS_CVFEM2PIPE, MASS_CVFEM2PIPE_TRUE, got_free_surf, MASS_SUF, ndpset, FEM_continuity_equation)
 : form pressure matrix CMC using a colouring approach, requires more memory More...
 
subroutine matrix_operations::mass_matrix_inversion (PIVIT_MAT, Mdims, eles_with_pipe)
 : Inversion of the mass matrix. If compacted this is much more efficient More...
 
subroutine matrix_operations::mass_matrix_matvec (U, BLOCK_MAT, CDP, NDIM, NPHASE, TOTELE, U_NLOC, U_NDGLN)
 : U = Mass_matrix * Vector (tipically vector is Grad * P + RHS and this is used to obtain the velocity) More...
 
subroutine matrix_operations::pha_block_mat_vec (U, BLOCK_MAT, CDP, U_NONODS, NDIM, NPHASE, TOTELE, U_NLOC, U_NDGLN)
 : performs U = BLOCK_MAT * CDP, where block_mat More...
 
subroutine matrix_operations::pha_block_mat_vec2 (U, BLOCK_MAT, CDP, NDIM, NPHASE, TOTELE, U_NLOC, U_NDGLN)
 :U = BLOCK_MAT * CDP More...
 
subroutine matrix_operations::pha_block_mat_vec_many2 (U, BLOCK_MAT, CDP, U_NONODS, NDIM, NPHASE, NBLOCK, TOTELE, U_NLOC, U_NDGLN)
 : U = BLOCK_MAT * CDP More...
 
subroutine matrix_operations::pha_block_mat_vec_many (U, BLOCK_MAT, CDP, NDIM, NPHASE, NBLOCK, TOTELE, U_NLOC, U_NDGLN)
 : U = BLOCK_MAT * CDP More...
 
subroutine matrix_operations::pha_block_mat_vec_many_reusing (BLOCK_MAT, CDP, NDIM, NPHASE, NBLOCK, TOTELE, U_NLOC, U_NDGLN)
 : U = BLOCK_MAT * CDP The difference with PHA_BLOCK_MAT_VEC_MANY is that the input CDP is overwritten with the output More...
 
subroutine matrix_operations::ct_mult (CV_RHS, U, V, W, CV_NONODS, U_NONODS, NDIM, NPHASE, CT, NCOLCT, FINDCT, COLCT)
 : CV_RHS=CT*U More...
 
subroutine matrix_operations::ct_mult2 (CV_RHS, U, CV_NONODS, U_NONODS, NDIM, NPHASE, CT, NCOLCT, FINDCT, COLCT)
 :CV_RHS=CT*U More...
 
subroutine matrix_operations::ct_mult_many (CV_RHS, U, CV_NONODS, U_NONODS, NDIM, NPHASE, NBLOCK, CT, NCOLCT, FINDCT, COLCT)
 : CV_RHS = CT * U More...
 
subroutine matrix_operations::c_mult_many (CDP, DP, CV_NONODS, U_NONODS, NDIM, NPHASE, NBLOCK, C, NCOLC, FINDC, COLC)
 : CDP=C*DP More...
 
subroutine matrix_operations::c_mult2 (CDP, DP, CV_NONODS, U_NONODS, NDIM, NPHASE, C, NCOLC, FINDC, COLC)
 : CDP=C*DP More...
 
subroutine matrix_operations::c_mult2_multi_pres (Mdims, Mspars, Mmat, deltap, CDP_tensor)
 : Performs the multiplication CDP_tensor = MmatC * deltap More...
 
subroutine matrix_operations::ct_mult_with_c (DP, U_LONG, U_NONODS, NDIM, NPHASE, C, NCOLC, FINDC, COLC)
 : DP = (C)^T U_LONG More...
 
subroutine matrix_operations::ct_mult_with_c3 (DP, U_ALL, U_NONODS, NDIM, NPHASE, C, NCOLC, FINDC, COLC)
 : DP = (C)^T U_ALL More...
 
subroutine matrix_operations::ct_mult_with_c_many (DP, U_LONG, U_NONODS, NDIM, NPHASE, C, FINDC, COLC)
 : DP = (C)^T U_LONG More...
 
subroutine matrix_operations::ulong_2_uvw (U, V, W, UP, U_NONODS, NDIM, NPHASE)
 
subroutine matrix_operations::posinmat (posmat, globi, globj, findrm, colm)
 : Find position in matrix POSMAT which has column GLOBJ More...
 
subroutine matrix_operations::assemble_global_multiphase_csr (global_csr, block_csr, dense_block_matrix, block_to_global, global_dense_block)
 
subroutine matrix_operations::allocate_global_multiphase_petsc_csr (global_petsc, sparsity, tracer, nphase)
 
type(petsc_csr_matrix) function matrix_operations::allocate_momentum_matrix (sparsity, velocity)
 

Function/Subroutine Documentation

◆ color_get_cmc_pha_fast()

subroutine color_get_cmc_pha::color_get_cmc_pha_fast ( type(multi_dimensions), intent(in)  Mdims,
type (multi_sparsities), intent(in)  Mspars,
type(multi_ndgln), intent(in)  ndgln,
type (multi_matrices), intent(inout)  Mmat,
real, dimension( :, : ), intent(in)  DIAG_SCALE_PRES,
real, dimension( :, :, : ), intent(in)  DIAG_SCALE_PRES_COUP,
real, dimension( :, :, : ), intent(in)  INV_B,
type(petsc_csr_matrix), intent(inout)  CMC_petsc,
real, dimension( :, :, : ), intent(inout)  CMC_PRECON,
integer, intent(in)  IGOT_CMC_PRECON,
real, dimension( : ), intent(in)  MASS_MN_PRES,
real, dimension( : ), intent(in)  MASS_PIPE,
real, dimension( : ), intent(in)  MASS_CVFEM2PIPE,
real, dimension( : ), intent(in)  MASS_CVFEM2PIPE_TRUE,
logical, intent(in)  got_free_surf,
real, dimension( : ), intent(in)  MASS_SUF,
integer, dimension( : ), intent(in)  ndpset,
logical, intent(in)  FEM_continuity_equation 
)

: form pressure matrix CMC using a colouring approach, requires more memory

Here is the call graph for this function:
Here is the caller graph for this function:

◆ color_get_cmc_pha_slow()

subroutine color_get_cmc_pha::color_get_cmc_pha_slow ( type(multi_dimensions), intent(in)  Mdims,
type (multi_sparsities), intent(in)  Mspars,
type(multi_ndgln), intent(in)  ndgln,
type (multi_matrices), intent(inout)  Mmat,
real, dimension( :, : ), intent(in)  DIAG_SCALE_PRES,
real, dimension( :, :, : ), intent(in)  DIAG_SCALE_PRES_COUP,
real, dimension( :, :, : ), intent(in)  INV_B,
type(petsc_csr_matrix), intent(inout)  CMC_petsc,
real, dimension( :, :, : ), intent(inout)  CMC_PRECON,
integer, intent(in)  IGOT_CMC_PRECON,
real, dimension( : ), intent(in)  MASS_MN_PRES,
real, dimension( : ), intent(in)  MASS_PIPE,
real, dimension( : ), intent(in)  MASS_CVFEM2PIPE,
real, dimension( : ), intent(in)  MASS_CVFEM2PIPE_TRUE,
logical, intent(in)  got_free_surf,
real, dimension( : ), intent(in)  MASS_SUF,
integer, dimension( : ), intent(in)  ndpset,
logical, intent(in)  FEM_continuity_equation 
)

: form pressure matrix CMC using a colouring approach

Here is the call graph for this function:
Here is the caller graph for this function: