Base type to define an abstract linear operator. All other types defined in
LightKrylov
derive from this fundamental one.
Warning
Users should not extend this abstract class to define their own types.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
type(lightkrylov_timer), | public | :: | matvec_timer | = | lightkrylov_timer('matvec timer') | ||
type(lightkrylov_timer), | public | :: | rmatvec_timer | = | lightkrylov_timer('rmatvec timer') |
Finalize timers and print complete history_info
Finalize the matvec/rmatvec timers Note: Wrapper of the corresponding routine from lightkrylov_timer
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_linop), | intent(inout) | :: | self |
Return matvec/rmatvec counter value
Getter function for the number of matvec calls
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_linop), | intent(in) | :: | self | |||
logical, | intent(in) | :: | trans |
matvec or rmatvec? |
Print current timing data
Getter routine to print the current timing information for matvec/rmatvec Note: Wrapper of the corresponding routine from lightkrylov_timer
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_linop), | intent(inout) | :: | self | |||
logical, | intent(in), | optional | :: | trans |
matvec or rmatvec? |
Reset matvec/rmatvec counter
Setter routine to reset the matvec counter and reset timers
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_linop), | intent(inout) | :: | self | |||
logical, | intent(in) | :: | trans |
matvec or rmatvec? |
||
character(len=*), | intent(in) | :: | procedure |
name of the caller routine |
||
integer, | intent(in), | optional | :: | counter |
optional flag to reset to an integer other than zero. |
|
logical, | intent(in), | optional | :: | reset_timer |
optional flag to reset also the timers |
|
logical, | intent(in), | optional | :: | soft_reset |
optional flag to choose whether to save previous timing data (default: .true.) |
|
logical, | intent(in), | optional | :: | clean_timer |
optional flag to choose whether to fully reset the timer (default: .false.) |
Reset current timing data
Setter routine to reset the matvec/rmatvec timers Note: Wrapper of the corresponding routine from lightkrylov_timer
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_linop), | intent(inout) | :: | self | |||
logical, | intent(in), | optional | :: | trans |
matvec or rmatvec? |
|
logical, | intent(in), | optional | :: | soft | ||
logical, | intent(in), | optional | :: | clean |
type, abstract, public :: abstract_linop !! Base type to define an abstract linear operator. All other types defined in !! `LightKrylov` derive from this fundamental one. !! !! @warning !! Users should not extend this abstract class to define their own types. !! @endwarning integer, private :: matvec_counter = 0 integer, private :: rmatvec_counter = 0 type(lightkrylov_timer) :: matvec_timer = lightkrylov_timer('matvec timer') type(lightkrylov_timer) :: rmatvec_timer = lightkrylov_timer('rmatvec timer') contains procedure, pass(self), public :: get_counter !! Return matvec/rmatvec counter value procedure, pass(self), public :: reset_counter !! Reset matvec/rmatvec counter procedure, pass(self), public :: print_timer_info !! Print current timing data procedure, pass(self), public :: reset_timer => reset_linop_timer !! Reset current timing data procedure, pass(self), public :: finalize_timer => finalize_linop_timer !! Finalize timers and print complete history_info end type abstract_linop