def uxyz(self, n: int) -> Point: """ Structural displacement at node N as Point. :param n: int :return: Point """ x = self._read_inline(f"ux({n})") y = self._read_inline(f"uy({n})") z = self._read_inline(f"uz({n})") return Point(x, y, z)
def kxyz(self, k: int) -> Point: """ Coordinates of keypoint k in the active coordinate system. :param k: int :return: Point """ x = self._read_inline(f"kx({k})") y = self._read_inline(f"ky({k})") z = self._read_inline(f"kz({k})") return Point(x, y, z)
def centrxyz(self, e: int) -> Point: """ Centroid coordinates of element e in global Cartesian coordinate system. :param e: int :return: Point """ x = self._read_inline(f"centrx({e})") y = self._read_inline(f"centry({e})") z = self._read_inline(f"centrz({e})") return Point(x, y, z)
def nxyz(self, n: int) -> Point: """ Coordinates of node k in the active coordinate system. :param n: int :return: Point """ x = self._read_inline(f"nx({n})") y = self._read_inline(f"ny({n})") z = self._read_inline(f"nz({n})") return Point(x, y, z)
def lxyz(self, l: int, lfrac: float) -> Point: """ Coordinates of line l at length fraction lfrac (0.0 to 1.0). :param l: int :param lfrac: float :return: Point """ self._check_lfrac(lfrac) self._raise_if_not_line(l) x = self._read_inline(f"lx({l},{lfrac})") y = self._read_inline(f"ly({l},{lfrac})") z = self._read_inline(f"lz({l},{lfrac})") return Point(x, y, z)
def test_uxyz(self, inline, setup_data): assert inline.uxyz(1) == Point(0, 0, 0)
def test_lxyz(self, inline, setup_data): assert inline.lxyz(setup_data['l'].max, 0.5) == Point(-0.5, 0.0, -0.5)
def test_kxyz(self, inline, setup_data): assert inline.kxyz(setup_data['k'].max) == Point(-1, -1, -1)
def test_nxyz(self, inline, setup_data): assert inline.nxyz(setup_data['k'].max) == Point(0, 1, -1)
def test_centrxyz(self, inline, setup_data): assert inline.centrxyz(setup_data['e'].min) == Point(0.5, 0.5, 0.25)