Skip to main content

DPF Framework 2026 R1

math:fft filtering and cubic fitting

Last update: 31.07.2026

Version: 0.0.0

Description

Computes the fitting curve using FFT filtering and cubic fitting in space (node i: x=time, y=data), with the possibility to compute the first and the second derivatives of the curve.

Inputs

This table lists the input pins for this operator. Input pins define the data that the operator requires to perform its operation. Some inputs are required, while others are optional and provide additional configuration. Each parameter is detailed in the sections that follow the table.

Pin number Name Status Expected type(s)
0 time_scoping vector<int32>, scoping
1 mesh_scoping umap<int32,int32>, scoping, scopings_container
2 entity_to_fit Required fields_container
3 component_number Required int32
4 first_derivative Required bool
5 second_derivative Required bool
6 fit_data Required bool
7 cutoff_fr double, int32

time_scoping (Pin 0)

A time scoping to rescope / split the fields container given as input.

mesh_scoping (Pin 1)

A space (mesh entities) scoping (or scopings container) to rescope / split the fields container given as input.

entity_to_fit (Pin 2)

Data changing in time to be fitted.

component_number (Pin 3)

  • Required: Yes
  • Expected type(s): int32

Component number as an integer, for example '0' for X-displacement, '1' for Y-displacement, and so on.

first_derivative (Pin 4)

  • Required: Yes
  • Expected type(s): bool

Calculate the first derivative (bool). The default is false.

second_derivative (Pin 5)

  • Required: Yes
  • Expected type(s): bool

Calculate the second derivative (bool). The default is false.

fit_data (Pin 6)

  • Required: Yes
  • Expected type(s): bool

Calculate the fitted values (bool). The default is false

cutoff_fr (Pin 7)

Cutoff frequency.

Outputs

This table lists the output pins for this operator. Output pins provide the results of the operator's computation and can be connected to inputs of other operators or retrieved for further processing. Each output is detailed in the sections that follow the table.

Pin number Name Expected type(s)
0 fitted_entity_y fields_container
1 first_der_dy fields_container
2 second_der_d2y fields_container

fitted_entity_y (Pin 0)

The fitted entity is fitted using FFT along the space scoping (node i: x=time, y=data). Fitted Y is expected to be close to the input data.

first_der_dy (Pin 1)

The first derivative (dY) from the fitted Y.

second_der_d2y (Pin 2)

The second derivative (d2Y) from the fitted Y.

Configurations

This operator supports configuration options that modify its behavior.

mutex

  • Expected type(s): bool
  • Default value: false

If this option is set to true, the shared memory is prevented from being simultaneously accessed by multiple threads.

num_threads

  • Expected type(s): int32
  • Default value: 0

Number of threads to use to run in parallel

run_in_parallel

  • Expected type(s): bool
  • Default value: true

Loops are allowed to run in parallel if the value of this config is set to true.

Scripting

This operator can be accessed through scripting interfaces using these identifiers.

Category: math

Plugin: core

Scripting name: fft_approx

Full name: math.fft_approx

Internal name: fft_approx

License: None

Examples

These examples demonstrate how to use this operator in different programming environments. Each example shows how to instantiate the operator, connect the required inputs, and retrieve the output.

C++
#include "dpf_api.h"

ansys::dpf::Operator op("fft_approx"); // operator instantiation
op.connect(0, my_time_scoping);
op.connect(1, my_mesh_scoping);
op.connect(2, my_entity_to_fit);
op.connect(3, my_component_number);
op.connect(4, my_first_derivative);
op.connect(5, my_second_derivative);
op.connect(6, my_fit_data);
op.connect(7, my_cutoff_fr);
ansys::dpf::FieldsContainer my_fitted_entity_y = op.getOutput<ansys::dpf::FieldsContainer>(0);
ansys::dpf::FieldsContainer my_first_der_dy = op.getOutput<ansys::dpf::FieldsContainer>(1);
ansys::dpf::FieldsContainer my_second_der_d2y = op.getOutput<ansys::dpf::FieldsContainer>(2);
CPython
import ansys.dpf.core as dpf

op = dpf.operators.math.fft_approx() # operator instantiation
op.inputs.time_scoping.connect(my_time_scoping)
op.inputs.mesh_scoping.connect(my_mesh_scoping)
op.inputs.entity_to_fit.connect(my_entity_to_fit)
op.inputs.component_number.connect(my_component_number)
op.inputs.first_derivative.connect(my_first_derivative)
op.inputs.second_derivative.connect(my_second_derivative)
op.inputs.fit_data.connect(my_fit_data)
op.inputs.cutoff_fr.connect(my_cutoff_fr)
my_fitted_entity_y = op.outputs.fitted_entity_y()
my_first_der_dy = op.outputs.first_der_dy()
my_second_der_d2y = op.outputs.second_der_d2y()
IPython
import mech_dpf
import Ans.DataProcessing as dpf

op = dpf.operators.math.fft_approx() # operator instantiation
op.inputs.time_scoping.Connect(my_time_scoping)
op.inputs.mesh_scoping.Connect(my_mesh_scoping)
op.inputs.entity_to_fit.Connect(my_entity_to_fit)
op.inputs.component_number.Connect(my_component_number)
op.inputs.first_derivative.Connect(my_first_derivative)
op.inputs.second_derivative.Connect(my_second_derivative)
op.inputs.fit_data.Connect(my_fit_data)
op.inputs.cutoff_fr.Connect(my_cutoff_fr)
my_fitted_entity_y = op.outputs.fitted_entity_y.GetData()
my_first_der_dy = op.outputs.first_der_dy.GetData()
my_second_der_d2y = op.outputs.second_der_d2y.GetData()

Changelog

  • Version 0.0.0: Initial release.

Connect with Ansys