Skip to main content

Set

Set entries in STScalarField.

Calling example:

Set single entry
    CLASS(STScalarField_), INTENT(INOUT) :: obj
INTEGER(I4B):: globalNode
REAL(DFP):: VALUE(:)
REAL(DFP):: scale
LOGICAL(LGT):: addContribution
Set all entries
    CLASS(STScalarField_):: obj
REAL(DFP):: VALUE(:)
REAL(DFP):: scale
LOGICAL(LGT):: addContribution
Set all enties of timecompo
    CLASS(STScalarField_):: obj
REAL(DFP):: VALUE
INTEGER(I4B):: timeCompo
REAL(DFP):: scale
LOGICAL(LGT):: addContribution
Set all entries
    REAL(DFP):: VALUE(:, :)
REAL(DFP):: scale
LOGICAL(LGT):: addContribution
Set all entries of timeCompo
    CLASS(STScalarField_):: obj
REAL(DFP):: VALUE(:)
INTEGER(I4B):: timeCompo
REAL(DFP):: scale
LOGICAL(LGT):: addContribution
Set single entries of timeCompo
    CLASS(STScalarField_):: obj
TYPE(ScalarField_):: VALUE
INTEGER(I4B):: timeCompo
REAL(DFP):: scale
LOGICAL(LGT):: addContribution
Set the multiple entries
    CLASS(STScalarField_):: obj
INTEGER(I4B):: globalNode(:)
REAL(DFP):: VALUE(:)
REAL(DFP):: scale
LOGICAL(LGT):: addContribution
Set multiple entries
    CLASS(STScalarField_):: obj
INTEGER(I4B):: globalNode(:)
REAL(DFP):: VALUE(:, :)
REAL(DFP):: scale
LOGICAL(LGT):: addContribution
Set multiple entries of timeCompo
    CLASS(STScalarField_):: obj
REAL(DFP):: VALUE(:)
INTEGER(I4B):: globalNode(:)
INTEGER(I4B):: timeCompo
REAL(DFP):: scale
LOGICAL(LGT):: addContribution
Set single entry of a timeCompo
    CLASS(STScalarField_):: obj
REAL(DFP):: VALUE
INTEGER(I4B):: globalNode
INTEGER(I4B):: timeCompo
REAL(DFP):: scale
LOGICAL(LGT):: addContribution
Set multiple entries using triplets
    CLASS(STScalarField_):: obj
INTEGER(I4B):: istart
INTEGER(I4B):: iend
INTEGER(I4B):: stride
REAL(DFP):: VALUE(:)
REAL(DFP):: scale
LOGICAL(LGT):: addContribution
Set multiple entries using triplets
    CLASS(STScalarField_):: obj
REAL(DFP):: VALUE(:, :)
INTEGER(I4B):: istart
INTEGER(I4B):: iend
INTEGER(I4B):: stride
REAL(DFP):: scale
LOGICAL(LGT):: addContribution
Set multiple entries using FEVariable
    CLASS(STScalarField_):: obj
TYPE(FEVariable_):: VALUE
INTEGER(I4B):: globalNode(:)
REAL(DFP):: scale
LOGICAL(LGT):: addContribution
Set all values
    CLASS(STScalarField_):: obj
REAL(DFP):: VALUE
REAL(DFP):: scale
LOGICAL(LGT):: addContribution

Interface 1

INTERFACE
MODULE SUBROUTINE Set1(obj, globalNode, VALUE, scale, &
& addContribution)
CLASS(STScalarField_), INTENT(INOUT) :: obj
INTEGER(I4B), INTENT(IN) :: globalNode
REAL(DFP), INTENT(IN) :: VALUE(:)
REAL(DFP), OPTIONAL, INTENT(IN) :: scale
LOGICAL(LGT), OPTIONAL, INTENT(IN) :: addContribution
END SUBROUTINE Set1
END INTERFACE
  • This routine sets the single entry of the STScalarField.
  • Here, value should be a space-time scalar representing the components of a STScalar.
  • The size of value should be same as obj%timeCompo.
In simple words it does following.
STScalar( :, globalNode ) = value( : )

Interface 2

 INTERFACE
MODULE SUBROUTINE Set2(obj, VALUE, scale, addContribution)
CLASS(STScalarField_), TARGET, INTENT(INOUT) :: obj
REAL(DFP), INTENT(IN) :: VALUE(:)
REAL(DFP), OPTIONAL, INTENT(IN) :: scale
LOGICAL(LGT), OPTIONAL, INTENT(IN) :: addContribution
END SUBROUTINE Set2
END INTERFACE

This routine work as follows.

  • The size of value should be same as obj%timeCompo, then this value is set for all the nodal values.
STScalar( 1:timeCompo, i ) = value( 1:timeCompo ), for i = 1, tNodes

Interface 3

 INTERFACE
MODULE SUBROUTINE Set3(obj, VALUE, timeCompo, scale, &
& addContribution)
CLASS(STScalarField_), INTENT(INOUT) :: obj
REAL(DFP), INTENT(IN) :: VALUE
INTEGER(I4B), INTENT(IN) :: timeCompo
REAL(DFP), OPTIONAL, INTENT(IN) :: scale
LOGICAL(LGT), OPTIONAL, INTENT(IN) :: addContribution
END SUBROUTINE Set3
END INTERFACE
  • This routine sets all values of timeCompo component of the STScalarField to given scalar value value
STScalar( timeCompo, i ) = value, for i = 1, tNodes

Interface 4

 INTERFACE
MODULE SUBROUTINE Set4(obj, VALUE, scale, addContribution)
CLASS(STScalarField_), INTENT(INOUT) :: obj
REAL(DFP), INTENT(IN) :: VALUE(:, :)
REAL(DFP), OPTIONAL, INTENT(IN) :: scale
LOGICAL(LGT), OPTIONAL, INTENT(IN) :: addContribution
END SUBROUTINE Set4
END INTERFACE
  • This routine sets all entries of STScalar field to a given STScalarField_
  • Here, shape of value should be value(1:timeCompo, tNodes).
  • Rows of value denotes the time components
  • Columns of value represents the spatial nodes.
STScalar( :, : ) = value( :, : )

Interface 5

 INTERFACE
MODULE SUBROUTINE Set5(obj, VALUE, timeCompo, scale, &
& addContribution)
CLASS(STScalarField_), INTENT(INOUT) :: obj
REAL(DFP), INTENT(IN) :: VALUE(:)
INTEGER(I4B), INTENT(IN) :: timeCompo
REAL(DFP), OPTIONAL, INTENT(IN) :: scale
LOGICAL(LGT), OPTIONAL, INTENT(IN) :: addContribution
END SUBROUTINE Set5
END INTERFACE
  • This routine sets all entries of the component timeCompo of STScalarField to value
STScalar( timeCompo, 1:tNodes ) = value( 1:tNodes )
note

The size of value should be equal to the total number of spatial nodes.

Interface 6

 INTERFACE
MODULE SUBROUTINE Set6(obj, VALUE, timeCompo, scale, &
& addContribution)
CLASS(STScalarField_), INTENT(INOUT) :: obj
TYPE(ScalarField_), INTENT(IN) :: VALUE
INTEGER(I4B), INTENT(IN) :: timeCompo
REAL(DFP), OPTIONAL, INTENT(IN) :: scale
LOGICAL(LGT), OPTIONAL, INTENT(IN) :: addContribution
END SUBROUTINE Set6
END INTERFACE
  • This routine sets all entries of the component timeCompo of STScalarField to given ScalarField value
STScalar( timeCompo, 1:tNodes ) = value(1:tNodes)
  • The size of value should be same as the total number of nodes in obj.

Interface 7

 INTERFACE
MODULE SUBROUTINE Set7(obj, VALUE, globalNode, scale, &
& addContribution)
CLASS(STScalarField_), INTENT(INOUT) :: obj
INTEGER(I4B), INTENT(IN) :: globalNode(:)
REAL(DFP), INTENT(IN) :: VALUE(:)
REAL(DFP), OPTIONAL, INTENT(IN) :: scale
LOGICAL(LGT), OPTIONAL, INTENT(IN) :: addContribution
END SUBROUTINE Set7
END INTERFACE

This method sets the selected enties of a STScalarField to value( : )

Effectively it does the following:
STScalar( 1:timeCompo, globalNode ) = value( 1:timeCompo ), for entries in global nodes
note

size of value should be equal to the obj%timeCompo

Interface 8

 INTERFACE
MODULE SUBROUTINE Set8(obj, globalNode, VALUE, scale, &
& addContribution)
CLASS(STScalarField_), INTENT(INOUT) :: obj
INTEGER(I4B), INTENT(IN) :: globalNode(:)
REAL(DFP), INTENT(IN) :: VALUE(:, :)
REAL(DFP), OPTIONAL, INTENT(IN) :: scale
LOGICAL(LGT), OPTIONAL, INTENT(IN) :: addContribution
END SUBROUTINE Set8
END INTERFACE
  • This routine sets selected entries of STScalarField.
STScalar( 1:timeCompo, globalNode ) = value( 1:timeCompo, 1:size(globalNode) )
  • SIZE(value, 1) should be equal to obj%timeCompo
  • SIZE(value, 2) should be equal to SIZE(globalNode)

Interface 9

 INTERFACE
MODULE SUBROUTINE Set9(obj, VALUE, globalNode, timeCompo, scale, &
& addContribution)
CLASS(STScalarField_), INTENT(INOUT) :: obj
REAL(DFP), INTENT(IN) :: VALUE(:)
INTEGER(I4B), INTENT(IN) :: globalNode(:)
INTEGER(I4B), INTENT(IN) :: timeCompo
REAL(DFP), OPTIONAL, INTENT(IN) :: scale
LOGICAL(LGT), OPTIONAL, INTENT(IN) :: addContribution
END SUBROUTINE Set9
END INTERFACE

This routine sets the selected components of selected nodes to given value.

STScalar( timeCompo, globalNode ) = value( 1:SIZE(globalNode) )
note

size of globalNode should be equal to the size of value.

Interface 10

 INTERFACE
MODULE SUBROUTINE Set10(obj, VALUE, globalNode, timeCompo, scale, &
& addContribution)
CLASS(STScalarField_), INTENT(INOUT) :: obj
REAL(DFP), INTENT(IN) :: VALUE
INTEGER(I4B), INTENT(IN) :: globalNode
INTEGER(I4B), INTENT(IN) :: timeCompo
REAL(DFP), OPTIONAL, INTENT(IN) :: scale
LOGICAL(LGT), OPTIONAL, INTENT(IN) :: addContribution
END SUBROUTINE Set10
END INTERFACE
  • This routine sets the single entry of a given time components.

Interface 11

 INTERFACE
MODULE SUBROUTINE Set11(obj, VALUE, istart, iend, stride, scale, &
& addContribution)
CLASS(STScalarField_), INTENT(INOUT) :: obj
INTEGER(I4B), INTENT(IN) :: istart
INTEGER(I4B), INTENT(IN) :: iend
INTEGER(I4B), INTENT(IN) :: stride
REAL(DFP), INTENT(IN) :: VALUE(:)
REAL(DFP), OPTIONAL, INTENT(IN) :: scale
LOGICAL(LGT), OPTIONAL, INTENT(IN) :: addContribution
END SUBROUTINE Set11
END INTERFACE
  • Set multiple entries using triad
note

The size of value should be equal to obj%timeCompo

Interface 12

INTERFACE
MODULE SUBROUTINE Set12(obj, VALUE, istart, iend, stride, scale, &
& addContribution)
CLASS(STScalarField_), INTENT(INOUT) :: obj
REAL(DFP), INTENT(IN) :: VALUE(:, :)
INTEGER(I4B), INTENT(IN) :: istart
INTEGER(I4B), INTENT(IN) :: iend
INTEGER(I4B), INTENT(IN) :: stride
REAL(DFP), OPTIONAL, INTENT(IN) :: scale
LOGICAL(LGT), OPTIONAL, INTENT(IN) :: addContribution
END SUBROUTINE Set12
END INTERFACE
  • Set multiple entries using triad
note

The number of rows in value should be equal to obj%timeCompo

note

The number of cols in value should be equal to size of istart:iend:stride

Interface 13

 INTERFACE
MODULE SUBROUTINE Set13(obj, VALUE, globalNode, scale, &
& addContribution)
CLASS(STScalarField_), INTENT(INOUT) :: obj
TYPE(FEVariable_), INTENT(IN) :: VALUE
INTEGER(I4B), INTENT(IN) :: globalNode(:)
REAL(DFP), OPTIONAL, INTENT(IN) :: scale
LOGICAL(LGT), OPTIONAL, INTENT(IN) :: addContribution
END SUBROUTINE Set13
END INTERFACE
  • Set the value by using FEVariable

Interface 14

INTERFACE
MODULE SUBROUTINE Set14(obj, VALUE, scale, addContribution)
CLASS(STScalarField_), INTENT(INOUT) :: obj
REAL(DFP), INTENT(IN) :: VALUE
REAL(DFP), OPTIONAL, INTENT(IN) :: scale
LOGICAL(LGT), OPTIONAL, INTENT(IN) :: addContribution
END SUBROUTINE Set14
END INTERFACE
  • Set all the values of STScalarField to a scalar value Value