Skip to content

Commit

Permalink
Merge pull request #81 from BconstantMMK/dev
Browse files Browse the repository at this point in the history
FastS: bug fix for ale init. in warmup MPI
  • Loading branch information
BconstantMMK authored Mar 3, 2025
2 parents b09e815 + 0fe326f commit 0a2ad50
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions Fast/FastS/FastS/Mpi.py
Original file line number Diff line number Diff line change
Expand Up @@ -844,8 +844,10 @@ def warmup(t, tc, graph=None, infos_ale=None, Adjoint=False, tmy=None, list_grap
sol = Internal.getNodeFromName1(z, 'FlowSolution#Centers')
ro = Internal.getNodeFromName1(sol, 'Density')
metrics[c][2] = ro[1]
elif motion == 'deformation': ale = 2
else: ale = 1
elif motion == 'rigid': ale = 1
elif motion == 'rigid_ext': ale = 2
elif motion == 'deformation': ale = 3
else: raise ValueError('warmup: invalid value for motion.')
c += 1

#
Expand All @@ -863,6 +865,15 @@ def warmup(t, tc, graph=None, infos_ale=None, Adjoint=False, tmy=None, list_grap
R._evalPosition(t, time)
R._evalGridSpeed(t, time)
copy_velocity_ale(t, metrics)
elif ale == 3:
# force init (provisoire)
first = Internal.getNodeFromName1(t, 'Time')
if first is not None: time = Internal.getValue(first)
else: time = 0.
R._evalPosition(t, time)
R._evalGridSpeed(t, time)
# end force
copy_velocity_ale(t, metrics)
#
# Compactage arbre transfert
#
Expand Down

0 comments on commit 0a2ad50

Please sign in to comment.