pymead.core.param.AngleDesVar#
- class AngleDesVar(value: float, name: str, lower: float | None = None, upper: float | None = None, setting_from_geo_col: bool = False, point=None, root=None, rotation_handle=None, enabled: bool = True, equation_str: str | None = None)[source]#
Bases:
AngleParamDesign variable class for angle values; subclasses the base-level Param. Adds lower and upper bound default behavior.
- __init__(value: float, name: str, lower: float | None = None, upper: float | None = None, setting_from_geo_col: bool = False, point=None, root=None, rotation_handle=None, enabled: bool = True, equation_str: str | None = None)[source]#
- Parameters:
value (float) – Starting value of the design variable
name (str) – Name of the design variable
lower (float or None) – Lower bound for the design variable. If
None, a reasonable value is chosen. Default:None.upper (float or None) – Upper bound for the design variable. If
None, a reasonable value is chosen. Default:None.setting_from_geo_col (bool) – Whether this method is being called directly from the geometric collection. Default:
False.
Methods
Gets a dictionary representation of the pymead object.
set_value(value[, bounds_normalized, force, ...])In this special case of
set_valuefor anAngleDesVar, we skip over the call to theset_valuemethod inAngleParamand directly call theset_valuemethod inParam(the grandparent class).Attributes
- get_dict_rep()[source]#
Gets a dictionary representation of the pymead object. In general, this dictionary should consist of only the required arguments for object instantiation. For example, the dictionary representation of a point looks something like this:
{"x": 0.3, "y": 0.5}. If the argument requires a reference to aPymeadObjrather than a string or float value, thename()method should be the value that is stored. For an example, see the overridden value of this method inpymead.core.airfoil.Airfoil. All subclasses ofPymeadObjmust implement this method, since it is the way pymead objects are stored in saved instances of aGeometryCollection(.jmeafiles).
- set_value(value: float, bounds_normalized: bool = False, force: bool = False, param_graph_update: bool = False, from_request_move: bool = False)[source]#
In this special case of
set_valuefor anAngleDesVar, we skip over the call to theset_valuemethod inAngleParamand directly call theset_valuemethod inParam(the grandparent class). The reason for this is thatAngleParamalways keeps the angle between 0 and \(2 \pi\), which is not logical behavior for a bounded variable. This method eliminates that restriction.