OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
matrix_mod Module Reference

Data Types

type  t_cfs_matrix

Functions/Subroutines

subroutine prod_vec (this, xvec, bvec)
integer function get_dim (this)
subroutine matrix_create (this, nn)
subroutine matrix_destroy (this)
subroutine matrix_associate (this, ptr_irow, ptr_jcol, ptr_val)

Function/Subroutine Documentation

◆ get_dim()

integer function matrix_mod::get_dim ( class(t_cfs_matrix), intent(in) this)

Definition at line 100 of file matrix_mod.F.

101C-----------------------------------------------
102C I m p l i c i t T y p e s
103C-----------------------------------------------
104#include "implicit_f.inc"
105 class(t_cfs_matrix), intent(in) :: this
106 integer :: get_dim
107 get_dim = this%dim

◆ matrix_associate()

subroutine matrix_mod::matrix_associate ( class(t_cfs_matrix), intent(inout), target this,
integer, dimension(:), pointer ptr_irow,
integer, dimension(:), pointer ptr_jcol,
double precision, dimension(:), pointer ptr_val )

Definition at line 153 of file matrix_mod.F.

154C-----------------------------------------------
155C I m p l i c i t T y p e s
156C-----------------------------------------------
157#include "implicit_f.inc"
158 class(t_cfs_matrix), intent(inout), target :: this
159 integer, dimension(:), pointer :: ptr_irow, ptr_jcol
160 double precision, dimension(:), pointer :: ptr_val
161 ptr_irow => this%irow
162 ptr_jcol => this%jcol
163 ptr_val => this%val

◆ matrix_create()

subroutine matrix_mod::matrix_create ( class(t_cfs_matrix), intent(inout) this,
integer, intent(in) nn )

Definition at line 117 of file matrix_mod.F.

118C-----------------------------------------------
119C I m p l i c i t T y p e s
120C-----------------------------------------------
121#include "implicit_f.inc"
122 class(t_cfs_matrix), intent(inout) :: this
123 integer, intent(in) :: nn
124 this%dim = nn
125 allocate(this%irow(nn), this%jcol(nn), this%val(nn))

◆ matrix_destroy()

subroutine matrix_mod::matrix_destroy ( class(t_cfs_matrix), intent(inout) this)

Definition at line 135 of file matrix_mod.F.

136C-----------------------------------------------
137C I m p l i c i t T y p e s
138C-----------------------------------------------
139#include "implicit_f.inc"
140 class(t_cfs_matrix), intent(inout) :: this
141 if (allocated(this%irow)) deallocate(this%irow)
142 if (allocated(this%jcol)) deallocate(this%jcol)
143 if (allocated(this%val)) deallocate(this%val)

◆ prod_vec()

subroutine matrix_mod::prod_vec ( class(t_cfs_matrix), intent(in) this,
type(t_vector), intent(in) xvec,
type(t_vector), intent(inout) bvec )

Definition at line 68 of file matrix_mod.F.

69 USE vector_mod
70C-----------------------------------------------
71C I m p l i c i t T y p e s
72C-----------------------------------------------
73#include "implicit_f.inc"
74 class(t_cfs_matrix), intent(in) :: this
75 type(t_vector), intent(in) :: xvec
76 type(t_vector), intent(inout) :: bvec
77 integer :: i, j
78
79 integer :: ii
80 bvec%val(1:bvec%get_dim()) = zero
81 do ii = 1, this%dim
82 i = this%irow(ii)
83 j = this%jcol(ii)
84 bvec%val(i) = bvec%val(i) + this%val(ii) * xvec%val(j)
85 enddo
86