/[escript]/trunk/escript/py_src/util.py
ViewVC logotype

Diff of /trunk/escript/py_src/util.py

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

revision 117 by jgs, Fri Apr 1 05:48:57 2005 UTC revision 122 by jgs, Thu Jun 9 05:38:05 2005 UTC
# Line 419  def dot(arg1,arg2): Line 419  def dot(arg1,arg2):
419         return numarray.dot(arg1,arg2)         return numarray.dot(arg1,arg2)
420    
421  def kronecker(d):  def kronecker(d):
422     return numarray.identity(d)     if hasattr(d,"getDim"):
423          return numarray.identity(d.getDim())
424       else:
425          return numarray.identity(d)
426    
427  def unit(i,d):  def unit(i,d):
428     """     """
# Line 430  def unit(i,d): Line 433  def unit(i,d):
433     e = numarray.zeros((d,))     e = numarray.zeros((d,))
434     e[i] = 1.0     e[i] = 1.0
435     return e     return e
436    
437    #
438    # $Log$
439    # Revision 1.10  2005/06/09 05:37:59  jgs
440    # Merge of development branch back to main trunk on 2005-06-09
441    #
442    # Revision 1.2.2.14  2005/05/20 04:05:23  gross
443    # some work on a darcy flow started
444    #
445    # Revision 1.2.2.13  2005/03/16 05:17:58  matt
446    # Implemented unit(idx, dim) to create cartesian unit basis vectors to
447    # complement kronecker(dim) function.
448    #
449    # Revision 1.2.2.12  2005/03/10 08:14:37  matt
450    # Added non-member Linf utility function to complement Data::Linf().
451    #
452    # Revision 1.2.2.11  2005/02/17 05:53:25  gross
453    # some bug in saveDX fixed: in fact the bug was in
454    # DataC/getDataPointShape
455    #
456    # Revision 1.2.2.10  2005/01/11 04:59:36  gross
457    # automatic interpolation in integrate switched off
458    #
459    # Revision 1.2.2.9  2005/01/11 03:38:13  gross
460    # Bug in Data.integrate() fixed for the case of rank 0. The problem is not totallly resolved as the method should return a scalar rather than a numarray object in the case of rank 0. This problem is fixed by the util.integrate wrapper.
461    #
462    # Revision 1.2.2.8  2005/01/05 04:21:41  gross
463    # FunctionSpace checking/matchig in slicing added
464    #
465    # Revision 1.2.2.7  2004/12/29 05:29:59  gross
466    # AdvectivePDE successfully tested for Peclet number 1000000. there is still a problem with setValue and Data()
467    #
468    # Revision 1.2.2.6  2004/12/24 06:05:41  gross
469    # some changes in linearPDEs to add AdevectivePDE
470    #
471    # Revision 1.2.2.5  2004/12/17 00:06:53  gross
472    # mk sets ESYS_ROOT is undefined
473    #
474    # Revision 1.2.2.4  2004/12/07 03:19:51  gross
475    # options for GMRES and PRES20 added
476    #
477    # Revision 1.2.2.3  2004/12/06 04:55:18  gross
478    # function wraper extended
479    #
480    # Revision 1.2.2.2  2004/11/22 05:44:07  gross
481    # a few more unitary functions have been added but not implemented in Data yet
482    #
483    # Revision 1.2.2.1  2004/11/12 06:58:15  gross
484    # a lot of changes to get the linearPDE class running: most important change is that there is no matrix format exposed to the user anymore. the format is chosen by the Domain according to the solver and symmetry
485    #
486    # Revision 1.2  2004/10/27 00:23:36  jgs
487    # fixed minor syntax error
488    #
489    # Revision 1.1.1.1  2004/10/26 06:53:56  jgs
490    # initial import of project esys2
491    #
492    # Revision 1.1.2.3  2004/10/26 06:43:48  jgs
493    # committing Lutz's and Paul's changes to brach jgs
494    #
495    # Revision 1.1.4.1  2004/10/20 05:32:51  cochrane
496    # Added incomplete Doxygen comments to files, or merely put the docstrings that already exist into Doxygen form.
497    #
498    # Revision 1.1  2004/08/05 03:58:27  gross
499    # Bug in Assemble_NodeCoordinates fixed
500    #
501    #

Legend:
Removed from v.117  
changed lines
  Added in v.122

  ViewVC Help
Powered by ViewVC 1.1.26