Skip to content

Commit

Permalink
Update fun3d_14_interface.py
Browse files Browse the repository at this point in the history
Correct forward min tolerance warning.
Fix the copy interface methods to include convergence settings.
  • Loading branch information
bburke38 committed Sep 19, 2024
1 parent 8b53ecb commit fdb3bad
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion funtofem/interface/fun3d_14_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ def post(self, scenario, bodies):
# throw a runtime error if adjoint didn't converge sufficiently
if scalar_resid > self.forward_min_tolerance:
raise RuntimeError(
f"Funtofem/Fun3dInterface: fun3d forward flow residual = {resid} > {self.forward_tolerance:.2e}, is too large..."
f"Funtofem/Fun3dInterface: fun3d forward flow residual = {resid} > {self.forward_min_tolerance:.2e}, is too large..."
)
return

Expand Down Expand Up @@ -1416,6 +1416,12 @@ def copy_real_interface(cls, fun3d_interface):
fun3d_dir=fun3d_interface.fun3d_dir,
auto_coords=fun3d_interface.auto_coords,
coord_test_override=fun3d_interface._coord_test_override,
forward_options=fun3d_interface.forward_options,
adjoint_options=fun3d_interface.adjoint_options,
forward_min_tolerance=fun3d_interface.forward_min_tolerance,
forward_stop_tolerance=fun3d_interface.forward_tolerance,
adjoint_min_tolerance=fun3d_interface.adjoint_min_tolerance,
adjoint_stop_tolerance=fun3d_interface.adjoint_tolerance,
)

@classmethod
Expand All @@ -1437,4 +1443,10 @@ def copy_complex_interface(cls, fun3d_interface):
fun3d_dir=fun3d_interface.fun3d_dir,
auto_coords=fun3d_interface.auto_coords,
coord_test_override=fun3d_interface._coord_test_override,
forward_options=fun3d_interface.forward_options,
adjoint_options=fun3d_interface.adjoint_options,
forward_min_tolerance=fun3d_interface.forward_min_tolerance,
forward_stop_tolerance=fun3d_interface.forward_tolerance,
adjoint_min_tolerance=fun3d_interface.adjoint_min_tolerance,
adjoint_stop_tolerance=fun3d_interface.adjoint_tolerance,
)

0 comments on commit fdb3bad

Please sign in to comment.