Skip to main content

Set

Set the entries in the ScalarField.

Calling example:

Set a single entry

CALL Set(
CLASS(ScalarField_):: obj
INTEGER(I4B):: globalNode
REAL(DFP):: VALUE
REAL(DFP):: scale
LOGICAL(LGT):: addContribution
)

Set all entries to a single scalar value

CALL Set(
CLASS(ScalarField_):: obj
REAL(DFP):: VALUE
REAL(DFP):: scale
LOGICAL(LGT):: addContribution
)

Set all entries of scalar field to a given vector.

CALL Set(
CLASS(ScalarField_):: obj
REAL(DFP):: VALUE(:)
REAL(DFP):: scale
LOGICAL(LGT):: addContribution
)

Set selected entries to a single value.

CALL Set(
CLASS(ScalarField_):: obj
INTEGER(I4B):: globalNode(:)
REAL(DFP):: VALUE
REAL(DFP):: scale
LOGICAL(LGT):: addContribution
)

Set multiple entries to different values.

CALL Set(
CLASS(ScalarField_):: obj
INTEGER(I4B):: globalNode(:)
REAL(DFP):: VALUE(:)
REAL(DFP):: scale
LOGICAL(LGT):: addContribution
)

Select multiple enties using triads.

CALL Set(
CLASS(ScalarField_):: obj
INTEGER(I4B):: istart
INTEGER(I4B):: iend
INTEGER(I4B):: stride
REAL(DFP):: VALUE
REAL(DFP):: scale
LOGICAL(LGT):: addContribution
)

Select multiple enties using triads.

CALL Set(
CLASS(ScalarField_):: obj
INTEGER(I4B):: istart
INTEGER(I4B):: iend
INTEGER(I4B):: stride
REAL(DFP):: VALUE(:)
REAL(DFP):: scale
LOGICAL(LGT):: addContribution
)

Copy obj2 in obj.

CALL Set(
CLASS(ScalarField_):: obj
CLASS(ScalarField_):: obj2
)

Select multiple values using FEVariable.

CALL Set(
CLASS(ScalarField_):: obj
INTEGER(I4B):: globalNode(:)
TYPE(FEVariable_):: VALUE
REAL(DFP):: scale
LOGICAL(LGT):: addContribution
)

Copy obj2 into obj like AXPY.

CALL Set(
CLASS(ScalarField_):: obj
CLASS(ScalarField_):: obj2
REAL(DFP):: scale
LOGICAL(LGT):: addContribution
)

Interface 1

INTERFACE
MODULE SUBROUTINE set1(obj, globalNode, VALUE, scale, &
& addContribution)
CLASS(ScalarField_), 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
  • Set single entry.

Interface 2

INTERFACE
MODULE SUBROUTINE set2(obj, VALUE, scale, addContribution)
CLASS(ScalarField_), 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
  • Set all values of scalar field to a given scalar.

Interface 3

INTERFACE
MODULE SUBROUTINE set3(obj, VALUE, scale, addContribution)
CLASS(ScalarField_), INTENT(INOUT) :: obj
REAL(DFP), INTENT(IN) :: VALUE(:)
REAL(DFP), OPTIONAL, INTENT(IN) :: scale
LOGICAL(LGT), OPTIONAL, INTENT(IN) :: addContribution
END SUBROUTINE set3
END INTERFACE
  • Set all values of scalarfield using a vector of reals.
  • The size of value should be same as the size of scalar field.

Interface 4

INTERFACE
MODULE SUBROUTINE set4(obj, globalNode, VALUE, scale, addContribution)
CLASS(ScalarField_), 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 set4
END INTERFACE

Set multiple values to a scalar value.

Interface 5

INTERFACE
MODULE SUBROUTINE set5(obj, globalNode, VALUE, scale, addContribution)
CLASS(ScalarField_), 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 set5
END INTERFACE

Set multiple values of scalar field.

Interface 6

INTERFACE
MODULE SUBROUTINE set6(obj, istart, iend, stride, VALUE, &
& scale, addContribution)
CLASS(ScalarField_), 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 set6
END INTERFACE

Set multiple values by using triplets istart:iend:stride

Interface 7

INTERFACE
MODULE SUBROUTINE set7(obj, istart, iend, stride, VALUE, &
& scale, addContribution)
CLASS(ScalarField_), 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 set7
END INTERFACE

Set multiple values using triplets.

Interface 8

INTERFACE
MODULE SUBROUTINE set8(obj, obj2)
CLASS(ScalarField_), INTENT(INOUT) :: obj
CLASS(ScalarField_), INTENT(IN) :: obj2
END SUBROUTINE set8
END INTERFACE

Interface 9

INTERFACE
MODULE SUBROUTINE set9(obj, globalNode, VALUE, scale, addContribution)
CLASS(ScalarField_), INTENT(INOUT) :: obj
INTEGER(I4B), INTENT(IN) :: globalNode(:)
TYPE(FEVariable_), INTENT(IN) :: VALUE
!! Scalar, Nodal, FEVariable (Space or Constant)
REAL(DFP), OPTIONAL, INTENT(IN) :: scale
LOGICAL(LGT), OPTIONAL, INTENT(IN) :: addContribution
END SUBROUTINE set9
END INTERFACE

Interface 10

 INTERFACE
MODULE SUBROUTINE set10(obj, obj2, scale, addContribution)
CLASS(ScalarField_), INTENT(INOUT) :: obj
CLASS(ScalarField_), INTENT(IN) :: obj2
REAL(DFP), INTENT(IN) :: scale
LOGICAL(LGT), INTENT(IN) :: addContribution
END SUBROUTINE set10
END INTERFACE

Interface 11

 INTERFACE
MODULE SUBROUTINE Set11(obj, ivar, idof, VALUE, ivar_value, &
& idof_value, scale, addContribution)
CLASS(ScalarField_), INTENT(INOUT) :: obj
INTEGER(I4B), INTENT(IN) :: ivar
INTEGER(I4B), INTENT(IN) :: idof
CLASS(AbstractNodeField_), INTENT(IN) :: VALUE
INTEGER(I4B), INTENT(IN) :: ivar_value
INTEGER(I4B), INTENT(IN) :: idof_value
REAL(DFP), OPTIONAL, INTENT(IN) :: scale
LOGICAL(LGT), OPTIONAL, INTENT(IN) :: addContribution
END SUBROUTINE Set11
END INTERFACE