TaoTermSetSolutionSizes#

Set the sizes describing the layout of the solution vector space of a TaoTerm.

Synopsis#

Logically collective

Input Parameters#

  • term - a TaoTerm

  • n - the size of a solution vector on the current MPI process (or PETSC_DECIDE)

  • N - the global size of a solution vector (or PETSC_DECIDE)

  • bs - the block size of a solution vector (must be >= 1)

Notes#

The “solution space” of a TaoTerm is the vector space of the optimization variable \(x\) in \(f(x; p)\). This is distinct from the “parameter space” (the space of the fixed data \(p\), set with TaoTermSetParametersSizes()). Some TaoTermTypes require the solution and parameter spaces to be related (e.g., have the same size); see the documentation for each type.

When a mapping matrix \(A\) is used to add a term to a Tao via TaoAddTerm(), the mapping transforms the Tao solution vector into this term’s solution space. For example, if the Tao solution vector is \(x \in \mathbb{R}^n\) and the mapping matrix is \(A \in \mathbb{R}^{m \times n}\), then the term evaluates \(f(Ax; p)\) with \(Ax \in \mathbb{R}^m\). The term’s solution space is therefore \(\mathbb{R}^m\), and TaoTermView() will report \(N = m\) for this term.

Alternatively, one may use TaoTermSetSolutionLayout() or TaoTermSetSolutionTemplate() to define the vector sizes.

See Also#

TaoTerm: composable objective function terms, TaoTerm, TaoTermGetSolutionSizes(), TaoTermSetSolutionTemplate(), TaoTermGetSolutionVecType(), TaoTermSetSolutionVecType(), TaoTermGetSolutionLayout(), TaoTermSetSolutionLayout(), TaoTermCreateSolutionVec()

Level#

beginner

Location#

src/tao/term/interface/taoterm.c

Examples#

src/tao/term/tutorials/ex1.c


Index of all TaoTerm routines
Table of Contents for all manual pages
Index of all manual pages