39 class(
abs_norm),
intent(inout) :: this
40 integer,
intent(in) :: nvec
41 real(kind=double),
intent(in) :: vec(nvec)
42 real(kind=double),
optional,
intent(inout) :: scr(nvec)
44 real(kind=double) :: norm
63 integer,
allocatable :: noddir(:)
76 class(
euc_norm),
intent(inout) :: this
77 integer,
intent(in) :: nvec
78 real(kind=double),
intent(in) :: vec(nvec)
79 real(kind=double),
optional,
intent(inout) :: scr(nvec)
81 real(kind=double) :: resnorm
83 real(kind=double) :: dnrm2
85 resnorm = dnrm2(nvec, vec, 1)
92 class(
dir_norm),
intent(inout) :: this
93 integer,
intent(in) :: lun_err
94 integer,
intent(in) :: ndir
95 integer,
intent(in) :: noddir(ndir)
101 if (.not.
allocated(this%noddir))
then
102 allocate (this%noddir(ndir), stat=res)
103 rc = ioerr(lun_err, err_alloc,
'init_dirichlet_resnorm', &
104 'type dir_resnorm member noddir ', res)
111 use,
intrinsic :: iso_fortran_env, only: stderr => error_unit
113 class(
dir_norm),
intent(inout) :: this
114 integer,
intent(in) :: nvec
115 real(kind=double),
intent(in) :: vec(nvec)
116 real(kind=double),
optional,
intent(inout) :: scr(nvec)
119 real(kind=double) :: resnorm
123 real(kind=double) :: dnrm2
126 if (.not.
present(scr))
then
127 rc = ioerr(stderr, err_val,
'eval_dir_norm', &
128 'scratch array not passed')
132 scr(this%noddir(i)) = zero
134 resnorm = dnrm2(nvec, scr, 1)
Abstract interface for the computation of the norm.
real(kind=double) function eval_euc_norm(this, nvec, vec, scr)
TODO COMMENT.
real(kind=double) function eval_dir_norm(this, nvec, vec, scr)
subroutine init_dir_norm(this, lun_err, ndir, noddir)
TODO COMMENT.
Abstract type for the definition of the procedure for the evaluation of the norm of a vector.
Weighted version of Euclian norm.