From 5f9db9aa45d6948dd6b2da944a6e12ce31a0103e Mon Sep 17 00:00:00 2001 From: arshsaja Date: Thu, 2 Feb 2023 13:39:34 -0500 Subject: [PATCH 1/3] raising error when the surface is not completely embedded inside FFDS. --- pygeo/pyBlock.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pygeo/pyBlock.py b/pygeo/pyBlock.py index f771bc16..cd38840c 100644 --- a/pygeo/pyBlock.py +++ b/pygeo/pyBlock.py @@ -929,6 +929,10 @@ def projectPoints(self, x0, checkErrors, embTol, eps, nIter): badPts[i][1][2], ) ) + raise Error( + "The FFD box does not completely fit the surface mesh. \ + Please regenerate the FFD points such that the whole surface mesh is embedded inside FFDs." + ) return volID, u, v, w, D From 60dea260442d4c27a535191208fb1e4788e42fd4 Mon Sep 17 00:00:00 2001 From: arshsaja Date: Thu, 2 Feb 2023 14:05:23 -0500 Subject: [PATCH 2/3] flake8. --- pygeo/pyBlock.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pygeo/pyBlock.py b/pygeo/pyBlock.py index cd38840c..a4bf4806 100644 --- a/pygeo/pyBlock.py +++ b/pygeo/pyBlock.py @@ -930,8 +930,7 @@ def projectPoints(self, x0, checkErrors, embTol, eps, nIter): ) ) raise Error( - "The FFD box does not completely fit the surface mesh. \ - Please regenerate the FFD points such that the whole surface mesh is embedded inside FFDs." + "The FFD box does not completely fit the surface mesh. Please regenerate the FFD points such that the whole surface mesh is embedded inside FFDs." ) return volID, u, v, w, D From 706585c23f5fea69fbfd187a66bd7e83230a3f9c Mon Sep 17 00:00:00 2001 From: arshsaja Date: Thu, 2 Feb 2023 14:18:48 -0500 Subject: [PATCH 3/3] fixing flake errors. --- pygeo/mphys/mphys_dvgeo.py | 1 - pygeo/parameterization/DVGeoSketch.py | 1 - pygeo/parameterization/DVGeoVSP.py | 1 - 3 files changed, 3 deletions(-) diff --git a/pygeo/mphys/mphys_dvgeo.py b/pygeo/mphys/mphys_dvgeo.py index bffe8226..ac886e72 100644 --- a/pygeo/mphys/mphys_dvgeo.py +++ b/pygeo/mphys/mphys_dvgeo.py @@ -1,6 +1,5 @@ import openmdao.api as om from .. import DVGeometry, DVConstraints -from ..constraints.baseConstraint import LinearConstraint try: from .. import DVGeometryVSP diff --git a/pygeo/parameterization/DVGeoSketch.py b/pygeo/parameterization/DVGeoSketch.py index ec2dbb4b..a77ec3ac 100644 --- a/pygeo/parameterization/DVGeoSketch.py +++ b/pygeo/parameterization/DVGeoSketch.py @@ -12,7 +12,6 @@ from abc import abstractmethod from collections import OrderedDict import numpy as np -import copy from mpi4py import MPI from .BaseDVGeo import BaseDVGeometry from .designVars import geoDVComposite diff --git a/pygeo/parameterization/DVGeoVSP.py b/pygeo/parameterization/DVGeoVSP.py index 6d1f3688..b4429bfb 100644 --- a/pygeo/parameterization/DVGeoVSP.py +++ b/pygeo/parameterization/DVGeoVSP.py @@ -9,7 +9,6 @@ from .DVGeoSketch import DVGeoSketch from pyspline.utils import searchQuads from .designVars import vspDV -import copy # openvsp python interface try: