General Matrix Vector Enhancements

The new MicroMag code makes use of the PETSc data manipulation methods, which provide methods for point-wise combinations, which combine the data on a point-by-point basis, for example, the code which will square all the values of a vector is shown below,

CALL VecPointwiseMult(asSqr(1),as(1),as(1),mpierr)

here both as(:) and asSqr(:) are three-vectors, 1 being the X component. Several variations of axpy methods exist for combining vectors and scalars, for example,

CALL VecAXPBYPCZ(as(3),Prot(1,3),Prot(2,3),Prot(3,3), $

where as(3) , mxyz(1) and mxyz(2) are individual components of three- vectors and Prot(:,:) is an array, thus individual components are scalars. The routine evaluates the following expression,

\vec z = \alpha \times \vec x + \beta \times \vec y + \gamma \times \vec z
\end{displaymath} (1)

where the order of the arguments of the routine is $\vec z$, $\alpha$, $\beta$, $\gamma$, $\vec x$, $\vec y$.

Chris Maynard 2011-06-08