warp.fem.GeometryField#

class warp.fem.GeometryField[source]#

Base class for fields defined over a geometry

__init__()#

Methods

__init__()

divergence_valid()

Whether the divergence operator is implemented for this field.

eval_arg_value(device)

Value of the field-level arguments to be passed to device functions

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)

Fill the field-level arguments to be passed to device functions

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

trace()

Trace of this field over lower-dimensional elements

Attributes

degree

Polynomial degree of the field, used to estimate necessary quadrature order

divergence_dtype

Return type of the divergence operator.

dtype

element_kind

Kind of element over which the field is expressed

geometry

Geometry over which the field is expressed

gradient_dtype

Return type of the (world space) gradient operator.

name

reference_gradient_dtype

Return type of the reference space gradient operator.

EvalArg

Structure containing field-level arguments passed to device functions for field evaluation

ElementEvalArg

Structure combining geometry-level and field-level arguments passed to device functions for field evaluation

property geometry: Geometry[source]#

Geometry over which the field is expressed

property element_kind: ElementKind[source]#

Kind of element over which the field is expressed

property dtype: type[source]#
static eval_reference_grad_inner(args, s)[source]#

Device function evaluating the inner field gradient with respect to reference element coordinates at a sample point

Parameters:
  • args (ElementEvalArg)

  • s (Sample)

static eval_reference_grad_outer(args, s)[source]#

Device function evaluating the outer field gradient with respect to reference element coordinates at a sample point

Parameters:
  • args (ElementEvalArg)

  • s (Sample)

trace()[source]#

Trace of this field over lower-dimensional elements

Return type:

FieldLike

make_deformed_geometry(relative=True)[source]#

Returns a deformed version of the underlying geometry, with positions displaced according to this field’s values.

Parameters:

relative – If True, the field is interpreted as a relative displacement over the original geometry. If False, the field values are interpreted as absolute positions.

Return type:

Geometry

property gradient_dtype#

Return type of the (world space) gradient operator. Assumes self.gradient_valid()

property reference_gradient_dtype#

Return type of the reference space gradient operator. Assumes self.gradient_valid()

property divergence_dtype#

Return type of the divergence operator. Assumes self.divergence_valid()