Skip to content
Open
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,5 @@ work
*.in
examples/fun3d_examples/ssw_meshdef_optimization/geometry/port7681.jrnl
examples/fun3d_examples/ssw_meshdef_optimization/geometry/autosave.csm
**/Scratch
**/Scratch
*.npy
4 changes: 4 additions & 0 deletions funtofem/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,7 @@
print(
"Mphys module couldn't be built despite available openmdao and mphys packages."
)

# from .sweep import *
# sweep is currently experimental, import with:
# from funtofem.sweep import ParameterSweep
25 changes: 25 additions & 0 deletions funtofem/sweep/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
"""
funtofem.sweep — General parameter sweep framework for FUNtoFEM.

.. warning::

**Experimental.** ``funtofem.sweep`` is under active development. Its
API may change in a backwards-incompatible way without a deprecation
cycle.
"""

from .strategy import CartesianStrategy, SweepStrategy, ZipStrategy
from .mesh_mode import MeshMode
from .parameter_sweep import ParameterSweep, load_point_file, cli_main
from .slurm_submitter import SlurmSweepSubmitter

__all__ = [
"SweepStrategy",
"CartesianStrategy",
"ZipStrategy",
"MeshMode",
"ParameterSweep",
"load_point_file",
"cli_main",
"SlurmSweepSubmitter",
]
36 changes: 36 additions & 0 deletions funtofem/sweep/mesh_mode.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
"""
funtofem.sweep.mesh_mode — MeshMode enumeration.

Controls which mesh-generation callbacks are invoked for each design point
during a parameter sweep.
"""

from enum import Enum


class MeshMode(Enum):
"""Enumeration of mesh-generation modes for a parameter sweep.

Attributes
----------
FULL_REGEN : str
Regenerate both the CFD mesh and the structural mesh for every design
point. Both the ``cfd_mesh_callback`` and the ``struct_mesh_callback``
must be registered.
CFD_ONLY : str
Regenerate the CFD mesh only and reuse a prior structural mesh. Only
the ``cfd_mesh_callback`` is required; ``struct_mesh_callback`` is not
invoked.
STRUCT_ONLY : str
Reuse a prior CFD mesh and regenerate the structural mesh only. Only
the ``struct_mesh_callback`` is required; ``cfd_mesh_callback`` is not
invoked.
NONE : str
Use pre-made meshes; neither the CFD mesh nor the structural mesh is
regenerated. Neither mesh callback is required or invoked.
"""

FULL_REGEN = "full_regen"
CFD_ONLY = "cfd_only"
STRUCT_ONLY = "struct_only"
NONE = "none"
Loading
Loading