warp.fem.scalar_type#
- warp.fem.scalar_type = <warp._src.fem.operator.Operator object>#
Return the scalar type (
warp.float32orwarp.float64) for the current geometry.Resolved at integrand transformation time to a type constructor, so it can be used to create precision-correct scalar literals. Accepts either a
Domainor aFieldargument:@fem.integrand def my_form(s: fem.Sample, domain: fem.Domain, u: fem.Field): half = fem.scalar_type(domain)(0.5) # or equivalently: half = fem.scalar_type(u)(0.5)