Page MenuHome

Mantaflow [Part 11]: Updated entire smoke.c code
ClosedPublic

Authored by Sebastián Barschkis (sebbas) on Oct 29 2018, 6:49 PM.

Diff Detail

Repository
rB Blender

Event Timeline

Added changes from new outflow object allocation setup.

Update manta files after merge with master.

Small fix for levelset and added a sanity check.

that file is probably half-rewritten at least, imho should just be a new one, with name mantaflow.c or something like that.

Updated diff with latest changes from fluid-mantaflow branch

Updated diff with latest changes from fluid-mantaflow branch

Sergey Sharybin (sergey) requested changes to this revision.Dec 10 2019, 3:58 PM
Sergey Sharybin (sergey) added inline comments.
source/blender/blenkernel/intern/manta.c
421 ↗(On Diff #19942)

min_ff

426 ↗(On Diff #19942)

max_ff

In fact, minmax_v3v3_v3.

503 ↗(On Diff #19942)

copy_v3_v3

509 ↗(On Diff #19942)

int -> bool ?

630 ↗(On Diff #19942)

What's effec ?

701 ↗(On Diff #19942)

Use early outputs.

1532 ↗(On Diff #19942)

Why not 100001?

1626–1628 ↗(On Diff #19942)

Calculate inverse once, then multiply.
Same in the code below.

1718 ↗(On Diff #19942)

For arrays use MEM_calloc_arrayN.

1740 ↗(On Diff #19942)

No need to calloc to then initialize, use malloc+initialize.

1742 ↗(On Diff #19942)

1 -> true.

1918–1920 ↗(On Diff #19942)

Multiply by inverse.

3822 ↗(On Diff #19942)

Can there be a little description of what topology is and whatnot?

4011 ↗(On Diff #19942)

This function should be split up.

This revision now requires changes to proceed.Dec 10 2019, 3:58 PM
Sebastián Barschkis (sebbas) marked 14 inline comments as done.Dec 11 2019, 12:39 PM

See c98a82b7d5c7 for changes.

source/blender/blenkernel/intern/manta.c
630 ↗(On Diff #19942)

It's referring to effector. Effector objects are objects that have can have an effect on the simulation (e.g. collision objects, guiding objects). I.e. their movement applies a force onto the simulation.

701 ↗(On Diff #19942)

Yup agree, fewer indents == more horizontal space.

1532 ↗(On Diff #19942)

Would probably also work :) It's just a sanity check that initializes grids before writing to them. Here it's 9999 to have a value that big enough but not inf.

4011 ↗(On Diff #19942)

Yes, I divided it a bit more. The new function mantaModifier_processDomain() is something I wouldn't make smaller though. There are many booleans that would otherwise have to be redefined in a new function or passed as arguments (big overhead).

source/blender/blenkernel/intern/manta.c
630 ↗(On Diff #19942)

So why not to call it effector ?

1532 ↗(On Diff #19942)

FLT_MAX then maybe?

Sebastián Barschkis (sebbas) marked 6 inline comments as done.Dec 11 2019, 5:44 PM

The change to "effector" caused some more renaming. So here (b75c38ee8369) is the commit with

  • all the renaming
  • the changes from 9999 to FLT_MAX
source/blender/blenkernel/intern/manta.c
630 ↗(On Diff #19942)

Yes, that's a good idea.

1532 ↗(On Diff #19942)

Yes, let's try it that way.

This revision is now accepted and ready to land.Dec 12 2019, 9:39 AM
Sebastián Barschkis (sebbas) marked 2 inline comments as done.

Updated diff with latest changes from fluid-mantaflow branch

Updated diff with latest changes from fluid-mantaflow branch