samurai icon indicating copy to clipboard operation
samurai copied to clipboard

[Bug]: Divergence of VectorField should be compatible with ScalarField

Open sbstndb opened this issue 8 months ago • 2 comments

What happened?

In the Capillarity code, we compute the divergence of a VectorField. But, during the execution, there is a bug: xt::broadcast_error: Incompatible dimensions of arrays

Workaround

A potential solution is to assign the return type as a VectorField with n_comp=1. This solution resolve the issue.

Suggestion:

The team want the divergence to return a ScalarField, or, to be able to convert them to ScalarField.

Input code

no input code.

What expected?

We expecte dthe code to work without any issue

What is your operating system?

Linux

How did you install our software?

conda or mamba

Software version

0.23.0

Relevant log output


Code of Conduct

  • [x] I agree to follow this project's Code of Conduct

sbstndb avatar Apr 22 '25 16:04 sbstndb

Could you extract a minimalist example in order to fix this issue ?

gouarin avatar Apr 22 '25 16:04 gouarin

I will try.

sbstndb avatar Apr 22 '25 18:04 sbstndb