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

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

#include "fluid.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 SPH backend implementations.

Mirrors src/backends/dispatch.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/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/CMakeLists.txt

Definition in file fluid.cpp.