> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# compute_element_centroids class

**Namespace:** [Ans.DataProcessing.operators.scoping](https://developer.synopsys.com/docs/dpf/dpf-mechanical/api/Ans.DataProcessing/operators/scoping)

## Summary

Computes the element centroids of the mesh. It also outputs the element measure.

available inputs: `element_scoping` (Scoping) (optional), `mesh` (MeshedRegion)

available outputs: `centroids` (Field), `measure` (Field)

## Example

```python theme={null}
op = compute_element_centroids()

op = compute_element_centroids(element_scoping=my_element_scoping,mesh=my_mesh)
```

## Class Information

| Property | Value |
| - | - |
| Namespace | `Ans.DataProcessing.operators.scoping` |
| Assembly | `Ans_Dpf_FEMutils_dll_cs` |
| Base Class | `Ans.DataProcessing.internal_objects.BaseOperator` |

## Inputs

### element\_scoping

If provided, only the centroids of the elements in the scoping are computed.

**Type:** *LinkableInput*

### mesh

Mesh to compute centroids

**Type:** *LinkableInput*

## Outputs

### centroids

element centroids.

**Type:** *LinkableOutput*

### measure

element measure (length, surface or volume depending on the dimension of the element).

**Type:** *LinkableOutput*

## Constructors

#### Constructor

```python theme={null}
compute_element_centroids()
```

#### Constructor

```python theme={null}
compute_element_centroids(element_scoping, mesh, config)
```

**Parameters:**

* `element_scoping` (*object*)
* `mesh` (*object*)
* `config` (*OperatorConfig*)

#### Constructor

```python theme={null}
compute_element_centroids(config)
```

**Parameters:**

* `config` (*OperatorConfig*)

## Methods

## Properties

#### inputs

**Type:** *InputSpec*

```python theme={null}
# Get or set the property
value = obj.inputs
obj.inputs = new_value
```

#### outputs

**Type:** *OutputSpec*

```python theme={null}
# Get or set the property
value = obj.outputs
obj.outputs = new_value
```

#### defaultConfig

**Type:** *Config*

```python theme={null}
# Get the property (read-only)
value = obj.defaultConfig
```
