Skip to content

Commit

Permalink
Merge pull request open-atmos#504 from slayoo/koehler_refactor
Browse files Browse the repository at this point in the history
fixing CUDA T()
  • Loading branch information
slayoo authored May 10, 2021
2 parents 924477a + 03f1c1a commit 6e19a63
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
1 change: 1 addition & 0 deletions PySDM/backends/thrustRTC/impl/c_inline.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ def c_inline(fun, **args):
if stripped.startswith('def '):
continue
source += stripped
source = source.replace("power(", "pow(")
source = re.sub("^return ", "", source)
for arg in inspect.signature(fun).parameters:
source = re.sub(f"{prae}({arg}){post}", f"\\1{real_t}({args[arg]})\\3", source)
Expand Down
7 changes: 1 addition & 6 deletions PySDM/physics/state_variable_triplet/rhod_thd_qv.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,7 @@ class RhodThdQv:
# A14 in libcloudph++ 1.0 paper
@staticmethod
def T(rhod, thd):
return thd * (
power(
(rhod * const.Rd * thd) / const.p1000 ** const.Rd_over_c_pd,
1 / (1 - const.Rd_over_c_pd)
) / const.p1000
) ** const.Rd_over_c_pd
return thd * power(rhod * thd / const.p1000 * const.Rd, const.Rd_over_c_pd / (1 - const.Rd_over_c_pd))

# A15 in libcloudph++ 1.0 paper
@staticmethod
Expand Down

0 comments on commit 6e19a63

Please sign in to comment.