core
Shared MPI block decomposition + asynchronous ghost-layer exchange (header-only C++20)
Loading...
Searching...
No Matches
grid_sdf.hpp File Reference

Sampled (grid) signed-distance field with trilinear interpolation. More...

#include <algorithm>
#include <vector>
#include "peclet/core/common/types.hpp"

Go to the source code of this file.

Classes

struct  peclet::core::geom::GridSdf
 A signed-distance field sampled on a regular axis-aligned grid (negative inside solid). More...
 

Namespaces

namespace  peclet
 
namespace  peclet::core
 
namespace  peclet::core::geom
 

Functions

template<typename S >
GridSdf peclet::core::geom::sample (const S &shape, IVec< 3 > dims, Vec< 3 > origin, Vec< 3 > spacing)
 Sample any analytic SDF onto a grid, producing a GridSdf (e.g. to bake geometry for a solver).
 

Detailed Description

Sampled (grid) signed-distance field with trilinear interpolation.

This is how real geometry enters the Eulerian/Lagrangian solvers: an SDF sampled on a regular grid (x-fastest, matching the suite indexing and flow/dem's VTI fields). Values keep the suite sign convention (negative inside solid). Out-of-domain queries clamp to the nearest in-domain sample. Satisfies the same peclet::core::geom::Sdf concept as the analytic primitives, so solvers consume analytic and sampled geometry through one interface.

Definition in file grid_sdf.hpp.