flow 1.4.0
Kokkos cut-cell IBM incompressible Navier-Stokes solver + pnm pore extraction
Loading...
Searching...
No Matches
packing2d.Cell Class Reference

Public Member Functions

 __init__ (self, n, R, off=(0.0, 0.0))
 pos (self, c)

Public Attributes

 n
 R
float h = n, R, 1.0 / n
float x0 = off[1] * h
float xc = self.y0 + (np.arange(n) + 0.5) * h
float xe = self.y0 + np.arange(n + 1) * h
 s = np.array([[sdf(np.array([X[i, j], Y[i, j]]), R) for j in range(n)] for i in range(n)])
int solid = self.s < 0
 asx = np.array([[solid_len(self.xe[i], self.ye[j], self.ye[j + 1], 0) / h for j in range(n)] for i in range(n + 1)])
 asy = np.array([[solid_len(self.ye[j], self.xe[i], self.xe[i + 1], 1) / h for j in range(n + 1)] for i in range(n)])
int ks = self.solid.astype(float)

Detailed Description

Definition at line 36 of file packing2d.py.

Constructor & Destructor Documentation

◆ __init__()

packing2d.Cell.__init__ ( self,
n,
R,
off = (0.0, 0.0) )

Definition at line 37 of file packing2d.py.

Member Function Documentation

◆ pos()

Member Data Documentation

◆ n

◆ R

packing2d.Cell.R

◆ h

◆ x0

float packing2d.Cell.x0 = off[1] * h

Definition at line 40 of file packing2d.py.

Referenced by pos().

◆ xc

float packing2d.Cell.xc = self.y0 + (np.arange(n) + 0.5) * h

Definition at line 41 of file packing2d.py.

◆ xe

float packing2d.Cell.xe = self.y0 + np.arange(n + 1) * h

Definition at line 42 of file packing2d.py.

◆ s

◆ solid

int packing2d.Cell.solid = self.s < 0

Definition at line 45 of file packing2d.py.

◆ asx

packing2d.Cell.asx = np.array([[solid_len(self.xe[i], self.ye[j], self.ye[j + 1], 0) / h for j in range(n)] for i in range(n + 1)])

Definition at line 54 of file packing2d.py.

◆ asy

packing2d.Cell.asy = np.array([[solid_len(self.ye[j], self.xe[i], self.xe[i + 1], 1) / h for j in range(n + 1)] for i in range(n)])

Definition at line 55 of file packing2d.py.

◆ ks

int packing2d.Cell.ks = self.solid.astype(float)

Definition at line 57 of file packing2d.py.


The documentation for this class was generated from the following file: