Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various small changes #241

Merged
merged 9 commits into from
May 16, 2024
2 changes: 1 addition & 1 deletion pygeo/constraints/areaConstraint.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def __init__(
if geograd_parallel is None:
raise ImportError("Geograd package must be installed to use triangulated surface constraint")

super().__init__(name, 2, -1e10, 0.0, scale, None, addToPyOpt)
super().__init__(name, 2, None, 0.0, scale, None, addToPyOpt)

self.comm = comm

Expand Down
3 changes: 2 additions & 1 deletion pygeo/parameterization/DVGeo.py
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ def addRefAxis(
"rot0axis": rot0axis,
}
nAxis = len(curve.coef)
elif xFraction or yFraction or zFraction:
elif xFraction is not None or yFraction is not None or zFraction is not None:
A-CGray marked this conversation as resolved.
Show resolved Hide resolved
# Some assumptions
# - FFD should be a close approximation of geometry surface so that
# xFraction roughly corresponds to airfoil LE, TE, or 1/4 chord
Expand Down Expand Up @@ -1520,6 +1520,7 @@ def addCompositeDV(self, dvName, ptSetName=None, u=None, scale=None, prependName
self.computeTotalJacobian(ptSetName)
J_full = self.JT[ptSetName].todense() # this is in CSR format but we convert it to a dense matrix
u, s, _ = np.linalg.svd(J_full, full_matrices=False)
u = np.array(u)
A-CGray marked this conversation as resolved.
Show resolved Hide resolved
scale = np.sqrt(s)
# normalize the scaling
scale = scale * (NDV / np.sum(scale))
Expand Down