warp.fem.field.TestField#
- class warp.fem.field.TestField(space, space_restriction)[source]#
Field defined over a space restriction that can be used as a test function.
In order to reuse computations, it is possible to define the test field using a SpaceRestriction defined for a different value type than the test function value type, as long as the node topology is similar.
- Parameters:
space (FunctionSpace)
space_restriction (SpaceRestriction)
- __init__(space, space_restriction)[source]#
- Parameters:
space (FunctionSpace)
space_restriction (SpaceRestriction)
Methods
__init__(space, space_restriction)divergence_valid()Whether the divergence operator is implemented for this field.
eval_arg_value(device)eval_degree(args)Polynomial degree of the field is applicable, or hint for determination of interpolation order
eval_div_inner(args, s)Device function evaluating the inner field divergence at a sample point
eval_div_outer(args, s)Device function evaluating the outer field divergence at a sample point
eval_grad_inner(args, s)Device function evaluating the inner field gradient at a sample point
eval_grad_outer(args, s)Device function evaluating the outer field gradient at a sample point
eval_inner(args, s)Device function evaluating the inner field value at a sample point
eval_outer(args, s)Device function evaluating the outer field value at a sample point
eval_reference_grad_inner(args, s)Device function evaluating the inner field gradient with respect to reference element coordinates at a sample point
eval_reference_grad_outer(args, s)Device function evaluating the outer field gradient with respect to reference element coordinates at a sample point
fill_eval_arg(arg, device)gradient_valid()Whether the gradient operator is implemented for this field.
make_deformed_geometry([relative])Returns a deformed version of the underlying geometry, with positions displaced according to this field's values.
notify_operator_usage(ops)Makes the Domain aware that the operators ops will be applied
rebind(space, space_restriction)Rebind the test field to a new space restriction and space.
trace()Trace of this field over lower-dimensional elements
Attributes
degreedivergence_dtypeReturn type of the divergence operator.
dof_dtypedtypeelement_kindgeometrygradient_dtypeReturn type of the (world space) gradient operator.
namereference_gradient_dtypeReturn type of the reference space gradient operator.
spacespace_partitionEvalArgStructure containing field-level arguments passed to device functions for field evaluation
ElementEvalArgStructure combining geometry-level and field-level arguments passed to device functions for field evaluation
- rebind(space, space_restriction)[source]#
Rebind the test field to a new space restriction and space. The new space restriction and space must be of a similar type as the current ones
- Parameters:
space (FunctionSpace)
space_restriction (SpaceRestriction)