Creates a new monitor.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(monitor_set), | intent(inout) | :: | this |
Set of monitor objects |
||
| character(len=*), | intent(in) | :: | name |
Name of the monitor |
||
| integer, | intent(in) | :: | ncol |
Number of columns |
||
| logical, | intent(in), | optional | :: | stdout |
Switch to write to the stdout |
|
| character(len=*), | intent(in), | optional | :: | sep |
Number of columns |
impure subroutine monitor_set_Create(this,name,ncol,stdout,sep) !> Creates a new monitor. implicit none class(monitor_set), intent(inout) :: this !! Set of monitor objects character(len=*), intent(in) :: name !! Name of the monitor integer, intent(in) :: ncol !! Number of columns logical, intent(in), & optional :: stdout !! Switch to write to the stdout character(len=*), intent(in), & optional :: sep !! Number of columns ! Work variables integer :: n associate(mpi => this%parallel) if (mpi%RankIsRoot()) then ! Add one monitor slot call this%Expand n=size(this%m) ! Add to hash table call this%tbl%Put(key=this%tbl%HashString(name),val=n) ! Do we write to the stdout or a file if (present(stdout)) then this%m(n)%stdout=stdout else this%m(n)%stdout=.false. end if call this%m(n)%Initialize(name,ncol,sep) end if end associate return end subroutine monitor_set_Create