Personal tools
You are here: Home / openCMISS / Wiki / Vectors: solution and current_local_solution
Navigation
Log in


Forgot your password?
 

Vectors: solution and current_local_solution

When 'PetscVector< T >::init()' (or 'NumericVector< T >::init()') is called with an integer second argument 'n_local' different from the first argument 'N', then the vector is distributed with global size 'N' and with 'n_local' elements local to the process. If 'n_local' is not provided or is the same as 'N', then a full separate vector of size 'N' is created on each process.

'System::solution' uses the distributed form. This form seems suitable for performing multiplication operations with matrices of type 'SparseMatrix< Number >'.

'System::current_local_solution', 'TransientSystem< Base >::old_local_solution', and 'TransientSystem< Base >::older_local_solution' use the full non-distributed form. Although the size is the full 'N', only the entries corresponding to process's local dofs and the ghost dofs it needs are non-zero. This form seems suitable for use in interpolating values in elements.