~ubuntu-branches/ubuntu/natty/ffc/natty

« back to all changes in this revision

Viewing changes to ffc/compiler/tensor/geometrytensor.py

  • Committer: Bazaar Package Importer
  • Author(s): Johannes Ring
  • Date: 2010-02-03 20:22:35 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20100203202235-fe8d0kajuvgy2sqn
Tags: 0.9.0-1
* New upstream release.
* debian/control: Bump Standards-Version (no changes needed).
* Update debian/copyright and debian/copyright_hints.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
__author__ = "Anders Logg (logg@simula.no)"
2
 
__date__ = "2004-11-03 -- 2009-03-08"
3
 
__copyright__ = "Copyright (C) 2004-2009 Anders Logg"
4
 
__license__  = "GNU GPL version 3 or any later version"
5
 
 
6
 
# Modified by Marie E. Rognes (meg@math.uio.no) 2007
7
 
 
8
 
# FFC common modules
9
 
from ffc.common.log import debug
10
 
 
11
 
# FFC tensor representation modules
12
 
from monomialtransformation import MonomialIndex
13
 
from multiindex import create_multi_index
14
 
 
15
 
class GeometryTensor:
16
 
    """This class represents the geometry tensor for a monomial term
17
 
    of a multilinear form."""
18
 
 
19
 
    def __init__(self, monomial):
20
 
        "Create geometry tensor for given monomial."
21
 
 
22
 
        # Save monomial data
23
 
        self.determinant = monomial.determinant
24
 
        self.coefficients = monomial.coefficients
25
 
        self.transforms = monomial.transforms
26
 
 
27
 
        # Create secondary and auxiliary multi indices
28
 
        self.secondary_multi_index = create_multi_index(monomial, MonomialIndex.SECONDARY)
29
 
        self.external_multi_index  = create_multi_index(monomial, MonomialIndex.EXTERNAL)
30
 
 
31
 
        debug("Secondary multi index: " + str(self.secondary_multi_index))
32
 
        debug("External multi index:  " + str(self.external_multi_index))