Skip to content

Commit

Permalink
Merge pull request #169 from stewartboogert/torusFlukaConversion
Browse files Browse the repository at this point in the history
  • Loading branch information
stewartboogert authored Aug 6, 2024
2 parents bd658e8 + 4129a44 commit 129405d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/pyg4ometry/convert/geant42Fluka.py
Original file line number Diff line number Diff line change
Expand Up @@ -2110,8 +2110,9 @@ def geant4Torus2Fluka(
ny0 = d * _np.sin(i * dPhi + pSPhi + _np.pi / 2.0)
nz0 = 0

x1 = pRtor * _np.cos((i + 0.5) * dPhi + pSPhi)
y1 = pRtor * _np.sin((i + 0.5) * dPhi + pSPhi)
# _np.cos(dPhi/2) factor is due chord vs point on perimeter
x1 = pRtor * _np.cos(dPhi / 2) * _np.cos((i + 0.5) * dPhi + pSPhi)
y1 = pRtor * _np.cos(dPhi / 2) * _np.sin((i + 0.5) * dPhi + pSPhi)
z1 = 0

nx1 = d * _np.cos((i + 0.5) * dPhi + pSPhi + _np.pi / 2.0)
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ def pytest_sessionfinish(session, exitstatus):
@pytest.fixture(scope="session")
def testdata():
g4data = G4EdgeTestData()
g4data.checkout("ec37079")
g4data.checkout("2c25b5c")
return g4data

0 comments on commit 129405d

Please sign in to comment.