next up previous contents index
Next: The Module esys.escript.linearPDEs Up: The Module esys.escript Previous: Physical Units   Contents   Index

Utilities

The FileWriter provides a mechanism to write data to a file. In essence, this class wraps the standard file class to write data that are global in MPI to a file. In fact, data are written on the processor with MPI rank 0 only. It is recommended to use FileWriter rather than open in order to write code that is running with and without MPI. It is save to use open under MPI to read data which are global under MPI.


\begin{classdesc}{FileWriter}{fn\optional{,append=\constant{False}\xspace , \opt...
... its rank. This option is normally used for debug purposes only.
\end{classdesc}

The following methods are available:
\begin{methoddesc}[FileWriter]{close}{}
closes the file.
\end{methoddesc}

\begin{methoddesc}[FileWriter]{flush}{}
flushes the internal buffer to disk.
\end{methoddesc}

\begin{methoddesc}[FileWriter]{write}{txt}
Write string \var{txt} to file.
Note that newline is not added.
\end{methoddesc}

\begin{methoddesc}[FileWriter]{writelines}{txts}
Write the list \var{txts} of st...
...ed.
This method is equivalent to call write() for each string.
\end{methoddesc}

\begin{memberdesc}[FileWriter]{closed}
\constant{True}\xspace if file is closed.
\end{memberdesc}

\begin{memberdesc}[FileWriter]{mode}
access mode.
\end{memberdesc}

\begin{memberdesc}[FileWriter]{name}
file name.
\end{memberdesc}

\begin{memberdesc}[FileWriter]{newlines}
line separator
\end{memberdesc}


\begin{funcdesc}{setEscriptParamInt}{name,value}
assigns the integer value \var{...
...condensed format if more than \var{value} lines would be created.
\end{funcdesc}


\begin{funcdesc}{getEscriptParamInt}{name}
returns the current value of integer parameter \var{name}.
\end{funcdesc}


\begin{funcdesc}{listEscriptParams}{a}
returns a list of valid parameters and their description.
\end{funcdesc}


\begin{funcdesc}{getMPISizeWorld}{}
returns the number of {\it MPI}\index{Messag...
...{Message Passing Interface!MPI}\xspace is not used 1 is returned.
\end{funcdesc}

\begin{funcdesc}{getMPIRankWorld}{}
returns the rank of the process within the \...
...{Message Passing Interface!MPI}\xspace is not used 0 is returned.
\end{funcdesc}

\begin{funcdesc}{MPIBarrierWorld}{}
performs a barrier synchronization across al...
...I_COMM_WORLD}}\index{Environment!MPI_COMM_WORLD}
processor group.
\end{funcdesc}

\begin{funcdesc}{getMPIWorldMax}{a}
returns the maximum value of the integer \va...
...\textbf{\mbox{MPI_COMM_WORLD}}\index{Environment!MPI_COMM_WORLD}.
\end{funcdesc}


next up previous contents index
Next: The Module esys.escript.linearPDEs Up: The Module esys.escript Previous: Physical Units   Contents   Index
esys@esscc.uq.edu.au