/[escript]/trunk/doc/user/escript.tex
ViewVC logotype

Diff of /trunk/doc/user/escript.tex

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 809 by gross, Sun Aug 13 22:10:03 2006 UTC revision 983 by gross, Tue Feb 20 02:49:08 2007 UTC
# Line 258  held in a dictionary. Operations on tagg Line 258  held in a dictionary. Operations on tagg
258  processing the value for each individual sample point.  processing the value for each individual sample point.
259  \escript allows use of constant, tagged and expanded data in a single expression.  \escript allows use of constant, tagged and expanded data in a single expression.
260    
261    The \var{dump} method provides a possibility to save \Data objects to a file, for instance to restart a simuation
262    or to save data for visualization. The file format uses \netCDF~\cite{netCDF} which commonly is using the file extension
263    {\tt nc}. For instance to save the coordinates of the data points of the \FunctionSpace
264    \ContinuousFunction to the file {\tt x.nc} one uses:
265    \begin{python}
266    x=ContinuousFunction(mydomain).getX()
267    x.dump("x.nc")
268    \end{python}
269    In order to keep the dump files small {\tt x.nc} does not contain a representation of the \Domain. It has to be saved using
270    apropriated methods of \var{mydomain} to be loaded before \var{x}. Alternatively, the \Domain can be reconstructed.
271    To recover the object \var{x} one uses
272    \begin{python}
273    x=load("x.nc", mydomain)
274    \end{python}
275    The \Data object represented by {\tt x.nc} is tight to a \FunctionSpace - in this case \ContinuousFunction - but not
276    o a \Domain. That means that \Data objects that are constant or tagged can be recovered with any \Domain. If the \Data object
277    is expanded, the number of data points in the file and of the \Domain for the particular \FunctionSpace must match.
278    Moreover, the ordering of the value is checked using the reference identifiers provided by
279    \FunctionSpace on the \Domain. In some cases, data points will be reordered.
280    
281    
282  \section{\Domain class}  \section{\Domain class}
283  \begin{classdesc}{Domain}{}  \begin{classdesc}{Domain}{}
284  A \Domain object is used to describe a geometrical region together with  A \Domain object is used to describe a geometrical region together with
# Line 526  Values are initialed with the double \va Line 547  Values are initialed with the double \va
547  the \Data object is represented in expanded from.  the \Data object is represented in expanded from.
548  \end{funcdesc}  \end{funcdesc}
549    
550    \begin{funcdesc}{load}{filename,domain}
551    recovers a \Data object on \Domain \var{domain} from the dump file \var{filename}.
552    \end{funcdesc}
553    
554  \subsection{\Data class methods}  \subsection{\Data class methods}
555  This is a list of frequently used methods of the  This is a list of frequently used methods of the
556  \Data class. A complete list can be fond on \ReferenceGuide.  \Data class. A complete list can be fond on \ReferenceGuide.
# Line 564  the value assigned to \DataSamplePoints Line 589  the value assigned to \DataSamplePoints
589  \var{value}.  \var{value}.
590  \end{methoddesc}  \end{methoddesc}
591    
592    \begin{methoddesc}[Data]{dump}{filename}
593    dumps the \Data object to the file \var{filename}. The file stores the
594    function space but not the \Domain. It is in the responsibilty of the user to
595    save the \Domain.
596    \end{methoddesc}
597    
598  \begin{methoddesc}[Data]{__str__}{}  \begin{methoddesc}[Data]{__str__}{}
599  returns a string representation of the object.  returns a string representation of the object.
600  \end{methoddesc}  \end{methoddesc}

Legend:
Removed from v.809  
changed lines
  Added in v.983

  ViewVC Help
Powered by ViewVC 1.1.26