pyopensn.fieldfunc.FieldFunctionInterpolation
- class pyopensn.fieldfunc.FieldFunctionInterpolation
Base class for field-function interpolation objects.
Interpolators are configured by assigning a field function and any geometry- or operation-specific settings, then calling
Execute().Execute()rebuilds any required internal state from the current configuration each time it is called.Wrapper of
opensn::FieldFunctionInterpolation.- 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.
- 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.
- __init__(*args, **kwargs)