BELFEM 0.9.0
Berkeley Lab Finite Element Framework
Loading...
Searching...
No Matches
corc.frame.Frame Class Reference

Public Member Functions

 __init__ (self, curve, reference_up=(0.0, 0.0, 1.0), nsamples=2048)
np.ndarray R (self, float s)
np.ndarray origin (self, float s)
np.ndarray transform (self, float s, float x, float y)
 check_domain_admissibility (self, float domain_radius)

Public Attributes

 curve = curve
 reference_up = np.array(reference_up, dtype=float)
 kappa_max = float(self._kappa.max())

Static Public Attributes

int KAPPA_TOL = 1e-8
float MAX_STEP_ROTATION = 0.35

Protected Member Functions

 _raw_frame (self, float s, use_fallback=None)
np.ndarray _fallback_normal (self, np.ndarray t)
 _build_reference (self, int nsamples)
int _nearest_sample (self, float s)

Protected Attributes

 _sref = np.linspace(0.0, L, nsamples + 1)
 _nref = np.zeros((nsamples + 1, 3))
 _kappa = np.zeros(nsamples + 1)
 _fallback = np.zeros(nsamples + 1, dtype=bool)

Constructor & Destructor Documentation

◆ __init__()

corc.frame.Frame.__init__ ( self,
curve,
reference_up = (0.0, 0.0, 1.0),
nsamples = 2048 )

Member Function Documentation

◆ _build_reference()

corc.frame.Frame._build_reference ( self,
int nsamples )
protected

◆ _fallback_normal()

np.ndarray corc.frame.Frame._fallback_normal ( self,
np.ndarray t )
protected

◆ _nearest_sample()

int corc.frame.Frame._nearest_sample ( self,
float s )
protected

◆ _raw_frame()

corc.frame.Frame._raw_frame ( self,
float s,
use_fallback = None )
protected
Pointwise frame before continuity fixes: returns (p, t, n, b,
kappa). The Frenet-vs-fallback decision can be forced so that
queries follow the hysteresis decision of the reference pass
instead of chattering around the threshold.

◆ check_domain_admissibility()

corc.frame.Frame.check_domain_admissibility ( self,
float domain_radius )
Local: the domain tube must not fold (kappa * r < 1). Global:
distant centerline points must stay 2 r apart.

◆ origin()

np.ndarray corc.frame.Frame.origin ( self,
float s )

◆ R()

np.ndarray corc.frame.Frame.R ( self,
float s )
Rotation matrix with columns [n, b, t]: local (x, y, s) ->
global; the Frenet/fallback mode and the n,b sign follow the
reference sampling (continuity, no threshold chatter).

◆ transform()

np.ndarray corc.frame.Frame.transform ( self,
float s,
float x,
float y )
Map local cross-section coordinates (x, y) at arc length s to
global coordinates.

Member Data Documentation

◆ _fallback

corc.frame.Frame._fallback = np.zeros(nsamples + 1, dtype=bool)
protected

◆ _kappa

corc.frame.Frame._kappa = np.zeros(nsamples + 1)
protected

◆ _nref

corc.frame.Frame._nref = np.zeros((nsamples + 1, 3))
protected

◆ _sref

corc.frame.Frame._sref = np.linspace(0.0, L, nsamples + 1)
protected

◆ curve

corc.frame.Frame.curve = curve

◆ kappa_max

corc.frame.Frame.kappa_max = float(self._kappa.max())

◆ KAPPA_TOL

int corc.frame.Frame.KAPPA_TOL = 1e-8
static

◆ MAX_STEP_ROTATION

float corc.frame.Frame.MAX_STEP_ROTATION = 0.35
static

◆ reference_up

corc.frame.Frame.reference_up = np.array(reference_up, dtype=float)

The documentation for this class was generated from the following file:
  • examples/corc_twolayer/python/corc/frame.py