pyopensn.fieldfunc.FieldFunctionInterpolationLine

class pyopensn.fieldfunc.FieldFunctionInterpolationLine

Line based interpolation function.

Configure the line segment and number of points, assign a field function, then call Execute(). Execute() rebuilds the line sampling data from the current configuration before evaluating the field.

Wrapper of opensn::FieldFunctionInterpolationLine.

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 SetFieldFunction to replace the current one or ClearFieldFunctions to 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.

SetFinalPoint(self: pyopensn.fieldfunc.FieldFunctionInterpolationLine, point: pyopensn.math.Vector3) None

Set final point.

Parameters:

point (pyopensn.math.Vector3) – Coordinates of the final point.

SetInitialPoint(self: pyopensn.fieldfunc.FieldFunctionInterpolationLine, point: pyopensn.math.Vector3) None

Set initial point.

Parameters:

point (pyopensn.math.Vector3) – Coordinates of the initial point.

SetNumberOfPoints(self: pyopensn.fieldfunc.FieldFunctionInterpolationLine, number: int) None

Set number of points.

Parameters:

number (int) – Number of points.

__init__(self: pyopensn.fieldfunc.FieldFunctionInterpolationLine) None

Default constructor.