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), $ mxyz(1),mxyz(2),mpierr)
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,
(1) |