accumulate#

class ansys.dpf.core.operators.math.accumulate.accumulate(fieldA=None, ponderation=None, time_scoping=None, config=None, server=None)#

Bases: ansys.dpf.core.dpf_operator.Operator

Sums all the elementary data of a field to produce one elementary data point.

Parameters:
  • fieldA (Field or FieldsContainer) – Field or fields container with only one field is expected

  • ponderation (Field, optional) – Field containing weights, one weight per entity

  • time_scoping (Scoping, optional) – Time_scoping

Returns:

field – Field containing the (weighted) sum for each component in an elementary data

Return type:

Field

Examples

>>> from ansys.dpf import core as dpf
>>> # Instantiate operator
>>> op = dpf.operators.math.accumulate()
>>> # Make input connections
>>> my_fieldA = dpf.Field()
>>> op.inputs.fieldA.connect(my_fieldA)
>>> my_ponderation = dpf.Field()
>>> op.inputs.ponderation.connect(my_ponderation)
>>> my_time_scoping = dpf.Scoping()
>>> op.inputs.time_scoping.connect(my_time_scoping)
>>> # Instantiate operator and connect inputs in one line
>>> op = dpf.operators.math.accumulate(
...     fieldA=my_fieldA,
...     ponderation=my_ponderation,
...     time_scoping=my_time_scoping,
... )
>>> # Get output data
>>> result_field = op.outputs.field()

Overview#

inputs

Enables to connect inputs to the operator

outputs

Enables to get outputs of the operator by evaluating it

default_config

Returns the default config of the operator.

Import detail#

from ansys.dpf.core.operators.math.accumulate import accumulate

Property detail#

property accumulate.inputs#

Enables to connect inputs to the operator

Returns:

inputs

Return type:

InputsAccumulate

property accumulate.outputs#

Enables to get outputs of the operator by evaluating it

Returns:

outputs

Return type:

OutputsAccumulate

Method detail#

static accumulate.default_config(server=None)#

Returns the default config of the operator.

This config can then be changed to the user needs and be used to instantiate the operator. The Configuration allows to customize how the operation will be processed by the operator.

Parameters:

server (server.DPFServer, optional) – Server with channel connected to the remote or local instance. When None, attempts to use the global server.