Sets the label or value of a column ofa a monitor given by name.
| 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) | :: | colID |
Number of columns |
||
| class(*), | intent(in), | optional | :: | value |
Value |
|
| character(len=*), | intent(in), | optional | :: | label |
Column label |
impure subroutine monitor_set_Set(this,name,colID,value,label) !> Sets the label or value of a column ofa a monitor given by name. implicit none class(monitor_set), intent(inout) :: this !! Set of monitor objects character(len=*), intent(in) :: name !! Name of the monitor integer, intent(in) :: colID !! Number of columns character(len=*), intent(in), & optional :: label !! Column label class(*), intent(in), & optional :: value !! Value ! Work variables integer :: n associate(mpi => this%parallel) if (mpi%RankIsRoot()) then If (.not.present(label).and..not.present(value)) & call this%parallel%Stop("Need to pass at least a value") ! Find ID of monitor n=this%GetIndex(name) ! Check column number is valid if (colID.gt.size(this%m(n)%col)) & call this%parallel%Stop("Invalid column number") ! Set label or value if (present(label)) this%m(n)%col(colID)%label=label if (present(value)) call this%m(n)%SetVal(colID,value) end if end associate return end subroutine monitor_set_Set