pyopensn.fieldfunc.FieldFunctionInterpolationPoint
- class pyopensn.fieldfunc.FieldFunctionInterpolationPoint
Interpolate the field function at a point.
Configure the point with
SetPointOfInterest(...), assign a field function, then callExecute()before reading the result withGetPointValue().Wrapper of
opensn::FieldFunctionInterpolationPoint.- AddFieldFunction(self: pyopensn.fieldfunc.FieldFunctionInterpolation, ff: pyopensn.fieldfunc.FieldFunction) None
Add a field function to this interpolator.
Current point/line/volume interpolators support exactly one field function. This method only succeeds when no field function is currently assigned. It raises an error if one is already present. Use
SetFieldFunctionto replace the current one orClearFieldFunctionsto remove it first.Changing the assigned field function affects subsequent
Execute()calls; no separate initialization step is required.
- ClearFieldFunctions(self: pyopensn.fieldfunc.FieldFunctionInterpolation) None
Remove all field functions from this interpolator.
Execute()will raise an error until a new field function is assigned.
- Execute(self: pyopensn.fieldfunc.FieldFunctionInterpolation) None
Execute the field function interpolator using the current configuration.
This method rebuilds any required internal interpolation state each time it is called. No separate
Initialize()step is required.
- ExportToCSV(self: pyopensn.fieldfunc.FieldFunctionInterpolation, base_name: str) None
Export field function interpolation to CSV files.
- Parameters:
base_name (str) – Base name of the exported CSVs.
- GetPointValue(self: pyopensn.fieldfunc.FieldFunctionInterpolationPoint) float
Get the most recently computed point value.
Call
Execute()after changing the point or field function to refresh the stored result.
- SetFieldFunction(self: pyopensn.fieldfunc.FieldFunctionInterpolation, ff: pyopensn.fieldfunc.FieldFunction) None
Replace the current field function with
ff.Unlike
AddFieldFunction, this method does not require the interpolator to be empty first.The next call to
Execute()uses this field function.
- SetPointOfInterest(self: pyopensn.fieldfunc.FieldFunctionInterpolationPoint, point: pyopensn.math.Vector3) None
Set the point at which the field function will be evaluated.
- Parameters:
point (pyopensn.math.Vector3) – Coordinates of the point of interest.
- __init__(self: pyopensn.fieldfunc.FieldFunctionInterpolationPoint) None
Default constructor.