1 |
# $Id$ |
# $Id$ |
|
# |
|
|
# COPYRIGHT ACcESS 2004 - All Rights Reserved |
|
|
# |
|
|
# This software is the property of ACcESS. No part of this code |
|
|
# may be copied in any form or by any means without the expressed written |
|
|
# consent of ACcESS. Copying, use or modification of this software |
|
|
# by any unauthorised person is illegal unless that |
|
|
# person has a software license agreement with ACcESS. |
|
|
# |
|
2 |
|
|
3 |
""" |
""" |
4 |
Utility functions for escript |
Utility functions for escript |
13 |
""" |
""" |
14 |
|
|
15 |
__author__="Lutz Gross, l.gross@uq.edu.au" |
__author__="Lutz Gross, l.gross@uq.edu.au" |
16 |
__licence__="contact: esys@access.uq.edu.au" |
__copyright__=""" Copyright (c) 2006 by ACcESS MNRF |
17 |
|
http://www.access.edu.au |
18 |
|
Primary Business: Queensland, Australia""" |
19 |
|
__licence__="""Licensed under the Open Software License version 3.0 |
20 |
|
http://www.opensource.org/licences/osl-3.0.php""" |
21 |
__url__="http://www.iservo.edu.au/esys/escript" |
__url__="http://www.iservo.edu.au/esys/escript" |
22 |
__version__="$Revision$" |
__version__="$Revision$" |
23 |
__date__="$Date$" |
__date__="$Date$" |
25 |
|
|
26 |
import math |
import math |
27 |
import numarray |
import numarray |
|
import numarray.linear_algebra |
|
28 |
import escript |
import escript |
29 |
import os |
import os |
30 |
|
|
3401 |
@remark: for L{escript.Data} objects the dimension is restricted to 3. |
@remark: for L{escript.Data} objects the dimension is restricted to 3. |
3402 |
""" |
""" |
3403 |
if isinstance(arg,numarray.NumArray): |
if isinstance(arg,numarray.NumArray): |
3404 |
|
import numarray.linear_algebra |
3405 |
return numarray.linear_algebra.inverse(arg) |
return numarray.linear_algebra.inverse(arg) |
3406 |
elif isinstance(arg,escript.Data): |
elif isinstance(arg,escript.Data): |
3407 |
return escript_inverse(arg) |
return escript_inverse(arg) |