Skip to content

Commit

Permalink
Update drivers to import FUN3D v14 interface. (#351)
Browse files Browse the repository at this point in the history
  • Loading branch information
bburke38 authored Oct 24, 2024
1 parent efbc996 commit f8bab62
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions funtofem/driver/funtofem_shape_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class methods FuntofemShapeDriver.remesh and FuntofemShapeDriver.analysis which
- Construct the FUNtoFEMmodel
- Construct the bodies and scenarios
- Register aerodynamic DVs to the scenarios/bodies (no shape variables added and no AIMs here)
- Construct the Fun3dInterface
- Construct the Fun3d14Interface
- Construct the solvers (SolverManager), and set solvers.flow = my_fun3d_interface
- Construct the a fun3d oneway driver with class method FuntofemShapeDriver.analysis
- Run solve_forward() and solve_adjoint() on the FuntofemShapeDriver
Expand All @@ -49,7 +49,7 @@ class methods FuntofemShapeDriver.remesh and FuntofemShapeDriver.analysis which
fun3d_loader = importlib.util.find_spec("fun3d")
tacs_loader = importlib.util.find_spec("tacs")
if fun3d_loader is not None: # check whether we can import FUN3D
from funtofem.interface import Fun3dInterface, Fun3dModel
from funtofem.interface import Fun3d14Interface, Fun3dModel
if tacs_loader is not None:
from funtofem.interface import (
TacsSteadyInterface,
Expand Down Expand Up @@ -211,7 +211,7 @@ def __init__(
self._flow_solver_type = None
if model.flow is None:
if fun3d_loader is not None:
if isinstance(solvers.flow, Fun3dInterface):
if isinstance(solvers.flow, Fun3d14Interface):
self._flow_solver_type = "fun3d"
# TBD on new types
else: # check with shape change
Expand Down
6 changes: 3 additions & 3 deletions funtofem/driver/oneway_aero_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class methods OnewayAeroDriver.remote and OnewayAeroDriver.analysis which build
- Construct the FUNtoFEMmodel
- Construct the bodies and scenarios
- Register aerodynamic DVs to the scenarios/bodies (no shape variables added and no AIMs here)
- Construct the Fun3dInterface
- Construct the Fun3d14Interface
- Construct the solvers (SolverManager), and set solvers.flow = my_fun3d_interface
- Construct the a fun3d oneway driver with class method OnewayAeroDriver.analysis
- Run solve_forward() and solve_adjoint() on the Fun3dOnewayAnalyzer
Expand All @@ -75,7 +75,7 @@ class methods OnewayAeroDriver.remote and OnewayAeroDriver.analysis which build
# 1) FUN3D
fun3d_loader = importlib.util.find_spec("fun3d")
if fun3d_loader is not None: # check whether we can import FUN3D
from funtofem.interface import Fun3dInterface, Fun3dModel
from funtofem.interface import Fun3d14Interface, Fun3dModel

# 2) TBD
# -----------------------------------------------------
Expand Down Expand Up @@ -200,7 +200,7 @@ def __init__(
self._flow_solver_type = None
if model.flow is None:
if fun3d_loader is not None:
if isinstance(solvers.flow, Fun3dInterface):
if isinstance(solvers.flow, Fun3d14Interface):
self._flow_solver_type = "fun3d"
# TBD on new types
else: # check with shape change
Expand Down

0 comments on commit f8bab62

Please sign in to comment.