-
Notifications
You must be signed in to change notification settings - Fork 349
Closed
Labels
Milestone
Description
Description
I'm trying to create a warp struct that holds a sparse matrix:
@wp.struct
class NeohookeanElasticMaterial:
sparse_hessian: wps.bsr_matrix_t(dtype=wp.types.matrix(shape=(9,9), dtype=wp.float32))
Context
Setting the sparse matrix shape during construction as follows;
neohookean_struct = NeohookeanElasticMaterial()
neohookean_struct.sparse_hessian = wps.bsr_zeros(
N, N, block_type=wp.types.matrix(shape=(9, 9), dtype=wp.float32), device=device)
And finally setting its values within the hessian function as:
wps.bsr_set_diag(neohookean_struct.sparse_hessian,hessian_blocks)
I get an error saying:
AttributeError: 'StructInstance' object has no attribute 'copy_nnz_async'