50
public :: addto, zero, set_from_function, set, set_all, &
50
public :: addto, set_from_function, set, set_all, &
51
51
& set_from_python_function, remap_field, remap_field_to_surface, &
52
52
& set_to_submesh, set_from_submesh, scale, bound, invert, &
53
53
& absolute_value, inner_product, cross_prod, clone_header
233
228
call deallocate(t_field_local)
235
230
end subroutine tensor_second_invariant
237
subroutine zero_scalar(field)
238
!!< Set all entries in the field provided to 0.0
239
type(scalar_field), intent(inout) :: field
241
assert(field%field_type/=FIELD_TYPE_PYTHON)
244
end subroutine zero_scalar
246
subroutine zero_vector(field)
247
!!< Set all entries in the field provided to 0.0
248
type(vector_field), intent(inout) :: field
252
assert(field%field_type/=FIELD_TYPE_PYTHON)
257
end subroutine zero_vector
259
subroutine zero_vector_dim(field, dim)
260
!!< Set all entries in dimension dim of the field provided to 0.0
261
type(vector_field), intent(inout) :: field
262
integer, intent(in) :: dim
264
assert(field%field_type/=FIELD_TYPE_PYTHON)
267
end subroutine zero_vector_dim
269
subroutine zero_tensor(field)
270
!!< Set all entries in the field provided to 0.0
271
type(tensor_field), intent(inout) :: field
273
assert(field%field_type/=FIELD_TYPE_PYTHON)
276
end subroutine zero_tensor
278
subroutine zero_tensor_dim_dim(field, dim1, dim2)
279
!!< Set all entries in the component indicated of field to 0.0
280
type(tensor_field), intent(inout) :: field
281
integer, intent(in) :: dim1, dim2
283
assert(field%field_type/=FIELD_TYPE_PYTHON)
284
field%val(dim1,dim2,:)=0.0
286
end subroutine zero_tensor_dim_dim
288
subroutine zero_scalar_field_nodes(field, node_numbers)
289
!!< Zeroes the scalar field at the specified node_numbers
290
!!< Does not work for constant fields
291
type(scalar_field), intent(inout) :: field
292
integer, dimension(:), intent(in) :: node_numbers
294
assert(field%field_type==FIELD_TYPE_NORMAL)
296
field%val(node_numbers) = 0.0
298
end subroutine zero_scalar_field_nodes
300
subroutine zero_vector_field_nodes(field, node_numbers)
301
!!< Zeroes the vector field at the specified nodes
302
!!< Does not work for constant fields
303
type(vector_field), intent(inout) :: field
304
integer, dimension(:), intent(in) :: node_numbers
307
assert(field%field_type==FIELD_TYPE_NORMAL)
310
field%val(i,node_numbers) = 0.0
313
end subroutine zero_vector_field_nodes
315
subroutine zero_tensor_field_nodes(field, node_numbers)
316
!!< Zeroes the tensor field at the specified nodes
317
!!< Does not work for constant fields
318
type(tensor_field), intent(inout) :: field
319
integer, dimension(:), intent(in) :: node_numbers
321
assert(field%field_type==FIELD_TYPE_NORMAL)
323
field%val(:, :, node_numbers) = 0.0
325
end subroutine zero_tensor_field_nodes
327
232
subroutine scalar_field_vaddto(field, node_numbers, val)
328
233
!!< Add val to the field%val(node_numbers) for a vector of