NVIDIA / modulus-sym

Framework providing pythonic APIs, algorithms and utilities to be used with Modulus core to physics inform model training as well as higher level abstraction for domain experts
https://developer.nvidia.com/modulus
Apache License 2.0
137 stars 56 forks source link

🐛[BUG]: Repeated Geometry Sampled Wrongly #137

Open lwh9346 opened 3 months ago

lwh9346 commented 3 months ago

Version

1.4.0

On which installation method(s) does this occur?

No response

Describe the issue

Here is my code:

from modulus.sym.geometry.primitives_3d import Box
...
        microchannel_fluid = Box(
            (
                25 / 2,
                0,
                100,
            ),
            (
                25 / 2 + 25,
                300,
                100 + 200,
            ),
            parameterization=pr,
        ).repeat(
            spacing=50,
            repeat_higher=(30 - 1, 0, 0),
            repeat_lower=(0, 0, 0),
        )

        #debug

        from modulus.sym.utils.io.vtk import var_to_polyvtk
        var_to_polyvtk(microchannel_fluid.sample_boundary(10000),"debug")

Then I got boundary point cloud like this: image image Only one box has the right side. When I increase spacing to 100, it seems OK: image

Using docker image modulus:24.01

Minimum reproducible example

No response

Relevant log output

No response

Environment details

No response

Other/Misc.

No response