numerics
Loading...
Searching...
No Matches
fluid3d.cpp File Reference

Single-switch dispatch from Backend enum to 3D SPH backend implementations. More...

#include "fluid3d.hpp"
#include "backends/seq/impl.hpp"
#include "backends/omp/impl.hpp"

Go to the source code of this file.

Namespaces

namespace  physics
 

Detailed Description

Single-switch dispatch from Backend enum to 3D SPH backend implementations.

Mirrors apps/fluid_sim/fluid.cpp exactly:

  • Includes both seq and omp impl.hpp headers
  • switch(params_.policy) routes each phase to the correct backend
  • Non-computational methods (add_particle, clear, ...) live here directly

Adding a new backend:

  1. Add the enumerator to num::Backend in include/core/policy.hpp
  2. Create apps/fluid_sim_3d/backends/<name>/ with impl.hpp + fluid.cpp + heat.cpp
  3. Add case num::Backend::<name>: to the switch in step()
  4. Register the .cpp files in apps/fluid_sim_3d/CMakeLists.txt

Definition in file fluid3d.cpp.