HalfPlaneDomain Struct ReferenceΒΆ

adc_cpp: pops::detail::HalfPlaneDomain Struct Reference
adc_cpp 0.3.0
Model-free C++23 core for coupled hyperbolic-elliptic systems on adaptive (AMR) meshes, with MPI and GPU (Kokkos) backends
pops::detail::HalfPlaneDomain Struct Reference

HALF-PLANE level-set domain: ls(x, y) = a*x + b*y - c, ACTIVE on the side a*x + b*y < c. More...

#include <domain.hpp>

+ Collaboration diagram for pops::detail::HalfPlaneDomain:

Public Member Functions

POPS_HD Real level_set (Real x, Real y) const
 Level set ls(x, y) = a*x + b*y - c: < 0 inside (active side), 0 on the line, > 0 outside.
 
POPS_HD Real operator() (Real x, Real y) const
 Callable form (forwards to level_set), so the domain is directly usable as a LevelSet argument.
 
POPS_HD bool cell_active (Real x, Real y) const
 ACTIVE cell: its center (x, y) is on the active side (ls < 0).
 

Public Attributes

double a = 0.0
 x coefficient of the linear level set
 
double b = 0.0
 y coefficient
 
double c = 0.0
 offset: active where a*x + b*y - c < 0
 

Detailed Description

HALF-PLANE level-set domain: ls(x, y) = a*x + b*y - c, ACTIVE on the side a*x + b*y < c.

The simplest NON-disc instance of the contract; it proves the embedded-boundary machinery is generic over an arbitrary device-safe level set, not the circle alone. POD, device-clean (three doubles).

Member Function Documentation

◆ cell_active()

POPS_HD bool pops::detail::HalfPlaneDomain::cell_active ( Real  x,
Real  y 
) const
inline

ACTIVE cell: its center (x, y) is on the active side (ls < 0).

+ Here is the call graph for this function:

◆ level_set()

POPS_HD Real pops::detail::HalfPlaneDomain::level_set ( Real  x,
Real  y 
) const
inline

Level set ls(x, y) = a*x + b*y - c: < 0 inside (active side), 0 on the line, > 0 outside.

+ Here is the caller graph for this function:

◆ operator()()

POPS_HD Real pops::detail::HalfPlaneDomain::operator() ( Real  x,
Real  y 
) const
inline

Callable form (forwards to level_set), so the domain is directly usable as a LevelSet argument.

+ Here is the call graph for this function:

Member Data Documentation

◆ a

double pops::detail::HalfPlaneDomain::a = 0.0

x coefficient of the linear level set

◆ b

double pops::detail::HalfPlaneDomain::b = 0.0

y coefficient

◆ c

double pops::detail::HalfPlaneDomain::c = 0.0

offset: active where a*x + b*y - c < 0


The documentation for this struct was generated from the following file:
  • include/pops/numerics/spatial/embedded_boundary/domain.hpp