Skip to main content

math:centroid

Version: 0.0.0

Description​

Computes centroid of field1 and field2, using fieldOut = field1*(1.-fact)+field2*(fact). Only works by index.

Inputs​

InputNameExpected type(s)Description
Pin 0
Required
fieldAfield, fields_containerfield or fields container with only one field is expected
Pin 1
Required
fieldBfield, fields_containerfield or fields container with only one field is expected
Pin 2
Required
factordoubleScalar

Outputs​

OutputNameExpected type(s)Description
Pin 0fieldfield

Configurations​

NameExpected type(s)Default valueDescription
mutexboolfalseIf this option is set to true, the shared memory is prevented from being simultaneously accessed by multiple threads.
num_threadsint320Number of threads to use to run in parallel
run_in_parallelbooltrueLoops are allowed to run in parallel if the value of this config is set to true.
work_by_indexbooltrueIf this option is set to true, loops and comparisons by entity will be done by index instead of ids.

Scripting​

Category: math

Plugin: core

Scripting name: None

Full name: None

Internal name: centroid

License: None

Changelog​

  • Version 0.0.0: Initial release.