Main Content

Search for decoupled blocks in systems of equations

`[`

identifies subsets (blocks) of equations that can be used to define subsets of variables.
The number of variables `eqsBlocks`

,`varsBlocks`

]
= findDecoupledBlocks(`eqs`

,`vars`

)`vars`

must coincide with the number of equations
`eqs`

.

The *i*th block is the set of equations determining the variables in
`vars(varsBlocks{i})`

. The variables in
`vars([varsBlocks{1},…,varsBlocks{i-1}])`

are determined recursively by
the previous blocks of equations. After you solve the first block of equations for the first
block of variables, the second block of equations, given by
`eqs(eqsBlocks{2})`

, defines a decoupled subset of equations containing
only the subset of variables given by the second block of variables,
`vars(varsBlock{2})`

, plus the variables from the first block (these
variables are known at this time). Thus, if a nontrivial block decomposition is possible,
you can split the solution process for a large system of equations involving many variables
into several steps, where each step involves a smaller subsystem.

The number of blocks `length(eqsBlocks)`

coincides with
`length(varsBlocks)`

. If ```
length(eqsBlocks) = length(varsBlocks)
= 1
```

, then a nontrivial block decomposition of the equations is not
possible.

The implemented algorithm requires that for each variable in

`vars`

there must be at least one matching equation in`eqs`

involving this variable. The same equation cannot also be matched to another variable. If the system does not satisfy this condition, then`findDecoupledBlocks`

throws an error. In particular,`findDecoupledBlocks`

requires that`length(eqs) = length(vars)`

.Applying the permutations

`e = [eqsBlocks{:}]`

to the vector`eqs`

and`v = [varsBlocks{:}]`

to the vector`vars`

produces an incidence matrix`incidenceMatrix(eqs(e), vars(v))`

that has a block lower triangular sparsity pattern.

`daeFunction`

| `decic`

| `diag`

| `incidenceMatrix`

| `isLowIndexDAE`

| `massMatrixForm`

| `odeFunction`

| `reduceDAEIndex`

| `reduceDAEToODE`

| `reduceDifferentialOrder`

| `reduceRedundancies`

| `tril`

| `triu`