# Manual

## High-level API

`FinEtoolsMultithreading.parallel_make_matrix`

— Function```
parallel_make_matrix(
fes,
u,
createsubd,
matrixupdt!;
ntasks = Threads.nthreads(),
kind = :CSC,
)
```

Assemble a sparse matrix.

Either a `:CSC`

matrix or a `:CSR`

matrix is created. We shall refer to this matrix as a CSX matrix. The process is:

- Construct the incidence relation node-to-neighbors.
- Make the sparse pattern and create a sparse CSX matrix with all values zero.
- Construct the incidence relation element-to-neighbors.
- Compute element coloring.
- Set up domain decomposition.
- Compute and assemble the matrix entries.

```
parallel_make_matrix(
fes,
dofnums,
ndofs,
FT,
n2e,
createsubd,
matrixupdt!,
ntasks,
kind,
)
```

Assemble a sparse matrix.

- Construct the incidence relation node-to-neighbors.
- Make the sparse pattern and create a sparse CSX matrix with all values zero.
- Construct the incidence relation element-to-neighbors.
- Compute element coloring.
- Set up domain decomposition.
- Compute and assemble the matrix entries.