next up previous contents
Next: 5.2.4 Clean Up Up: 5.2 Program Structure Previous: 5.2.2 Parallel Initialization   Contents


5.2.3 Parallel Solution

The solution of the micromagnetic problem (cf. Fig. 5.10) is then carried out with the requested solver. All solvers require the calculation of local effective field Eq. (3.58) with simple matrix-vector multiplications. Since all matrices (except for the boundary matrix Eq. (3.48)) are sparse matrices, these matrix-vector multiplications with distributed data are very efficient. If we assume a diagonal matrix with

\begin{displaymath}
a_{ij}=a_i \delta_{ij}
\end{displaymath} (5.3)

the matrix-vector multiplication in Fig. 5.7 would not require any communication:

\begin{eqnarray*}
b_1 & = & a_{11} x_1 \quad \ldots \mbox{all data on processor...
... \ldots \mbox{all data on processor 3} \\
& \vdots & \nonumber
\end{eqnarray*}

However, if there are also some off-diagonal elements, then some communication is required:

\begin{eqnarray*}
b_1 & = & a_{11} x_1 + a_{12} x_2 \quad \hspace{14.5mm}
\ldo...
...s x_4\mbox{ from processor 2 required} \\
& \vdots & \nonumber
\end{eqnarray*}

This gives a first idea, how distributed matrices and vectors and some linear algebra functions are handled. Yet, the user need not be concerned with these details since PETSc hides all the communication away and manages it internally.

For the integration of the LLG equation or the nudged elastic band method PVODE is called to make one time step. The energy minimization with TAO is performed until equilibrium has been reached. Then all required observables are calculated and written to a log file and additional data of the sampling line and graphics output are stored. Finally, several stopping criteria are checked and the simulation is continued with the next iterative step or it is aborted.

Figure 5.10: Flow chart of the solution loop.
\includegraphics[scale=0.5]{fig/talk/fig/fluss4.fig.eps}


next up previous contents
Next: 5.2.4 Clean Up Up: 5.2 Program Structure Previous: 5.2.2 Parallel Initialization   Contents
Werner Scholz 2003-06-08