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

Child FFD constraint tests and fixes #103

Merged
merged 14 commits into from
Oct 5, 2021
46 changes: 31 additions & 15 deletions pygeo/constraints/DVCon.py
Original file line number Diff line number Diff line change
Expand Up @@ -1825,14 +1825,18 @@ def addLeTeConstraints(
indSetB : array of int
Indices of control points on the *other* side of the FFD
name : str
Normally this does not need to be set; a default name will
be generated automatically. Only use this if you have
multiple DVCon objects and the constriant names need to
be distinguished
Normally this does not need to be set; a default name will
be generated automatically. Only use this if you have
multiple DVCon objects and the constriant names need to
be distinguished
config : str
The DVGeo configuration to apply this LETE con to. Must be either None
which will allpy to *ALL* the local DV groups or a single string specifying
a particular configuration.
The DVGeo configuration to apply this constraint to. Must be either None
which will apply to *ALL* the local DV groups or a single string specifying
a particular configuration.
childIdx : int
The zero-based index of the child FFD, if this constraint is being applied to a child FFD.
The index is defined by the order in which you add the child FFD to the parent.
For example, the first child FFD has an index of 0, the second an index of 1, and so on.

Examples
--------
Expand Down Expand Up @@ -1953,8 +1957,8 @@ def addLinearConstraintsShape(
upper=0,
name=None,
config=None,
DVGeoName="default",
childIdx=None,
DVGeoName="default",
):
"""
Add a complete generic set of linear constraints for the shape
Expand Down Expand Up @@ -1997,10 +2001,18 @@ def addLinearConstraintsShape(
upper : float or array
The upper bound of the constraint(s)
name : str
Normally this does not need to be set; a default name will
be generated automatically. Only use this if you have
multiple DVCon objects and the constriant names need to
be distinguished
Normally this does not need to be set; a default name will
be generated automatically. Only use this if you have
multiple DVCon objects and the constriant names need to
be distinguished
config : str
The DVGeo configuration to apply this constraint to. Must be either None
which will apply to *ALL* the local DV groups or a single string specifying
a particular configuration.
childIdx : int
The zero-based index of the child FFD, if this constraint is being applied to a child FFD.
The index is defined by the order in which you add the child FFD to the parent.
For example, the first child FFD has an index of 0, the second an index of 1, and so on.

Examples
--------
Expand Down Expand Up @@ -2767,7 +2779,7 @@ def addCurvatureConstraint(
)

def addMonotonicConstraints(
self, key, slope=1.0, name=None, start=0, stop=-1, config=None, DVGeoName="default", childIdx=None
self, key, slope=1.0, name=None, start=0, stop=-1, config=None, childIdx=None, DVGeoName="default"
):
"""
Parameters
Expand All @@ -2790,9 +2802,13 @@ def addMonotonicConstraints(
a design variable vector [4, 3, 6.5, 2, -5.4, -1], start=1 and
stop=4 would constrain [3, 6.5, 2, -5.4] to be a monotonic sequence.
config : str
The DVGeo configuration to apply this LETE con to. Must be either None
which will allpy to *ALL* the local DV groups or a single string specifying
The DVGeo configuration to apply this constraint to. Must be either None
which will apply to *ALL* the local DV groups or a single string specifying
a particular configuration.
childIdx : int
The zero-based index of the child FFD, if this constraint is being applied to a child FFD.
The index is defined by the order in which you add the child FFD to the parent.
For example, the first child FFD has an index of 0, the second an index of 1, and so on.

Examples
--------
Expand Down
Loading