Package esys :: Package escript :: Module linearPDEs :: Class PDECoefficient
[show private | hide private]
[frames | no frames]

Type PDECoefficient

object --+
         |
        PDECoefficient


A class for describing a PDE coefficient
Method Summary
  __init__(self, where, pattern, altering)
Initialise a PDE Coefficient type
bool definesNumEquation(self)
checks if the coefficient allows to estimate the number of equations
bool definesNumSolutions(self)
checks if the coefficient allows to estimate the number of solution components
tuple of two int values or None estimateNumEquationsAndNumSolutions(self, domain, shape)
tries to estimate the number of equations and number of solutions if the coefficient has the given shape
FunctionSpace getFunctionSpace(self, domain, reducedEquationOrder, reducedSolutionOrder)
defines the FunctionSpace of the coefficient
tuple of int values getShape(self, domain, numEquations, numSolutions)
builds the required shape of the coefficient
Data getValue(self)
returns the value of the coefficient
bool isAlteringOperator(self)
checks if the coefficient alters the operator of the PDE
bool isAlteringRightHandSide(self)
checks if the coefficeint alters the right hand side of the PDE
  resetValue(self)
resets coefficient value to default
  setValue(self, domain, numEquations, numSolutions, reducedEquationOrder, reducedSolutionOrder, newValue)
set the value of the coefficient to a new value
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __repr__(x)
x.__repr__() <==> repr(x)
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
x.__str__() <==> str(x)

Class Variable Summary
int BOTH: indicator that the the coefficient alters the operator as well as the right hand side of the PDE
int BOUNDARY: indicator that coefficient is defined on the boundary of the PDE domain
int BY_DIM: indicator that the dimension of the coefficient shape is defined by the spatial dimension
int BY_EQUATION: indicator that the dimension of the coefficient shape is defined by the number PDE equations
int BY_SOLUTION: indicator that the dimension of the coefficient shape is defined by the number PDE solutions
int CONTACT: indicator that coefficient is defined on the contact region within the PDE domain
int INTERIOR: indicator that coefficient is defined on the interior of the PDE domain
int OPERATOR: indicator that the the coefficient alters the operator of the PDE
int REDUCED: indicator that coefficient is defined trough a reduced solution of the PDE
int RIGHTHANDSIDE: indicator that the the coefficient alters the right hand side of the PDE
int SOLUTION: indicator that coefficient is defined trough a solution of the PDE

Method Details

__init__(self, where, pattern, altering)
(Constructor)

Initialise a PDE Coefficient type
Parameters:
where - describes where the coefficient lives
           (type=one of INTERIOR, BOUNDARY, CONTACT, SOLUTION, REDUCED)
pattern - describes the shape of the coefficient and how the shape is build for a given spatial dimension and numbers of equation and solution in then PDE. For instance, (BY_EQUATION,BY_SOLUTION,BY_DIM) descrbes a rank 3 coefficient which is instanciated as shape (3,2,2) in case of a three equations and two solution components on a 2-dimensional domain. In the case of single equation and a single solution component the shape compoments marked by BY_EQUATION or BY_SOLUTION are dropped. In this case the example would be read as (2,).
           (type=tuple of BY_EQUATION, BY_SOLUTION, BY_DIM)
altering - indicates what part of the PDE is altered if the coefficiennt is altered
           (type=one of OPERATOR, RIGHTHANDSIDE, BOTH)
Overrides:
__builtin__.object.__init__

definesNumEquation(self)

checks if the coefficient allows to estimate the number of equations
Returns:
True if the coefficient allows an estimate of the number of equations
           (type=bool)

definesNumSolutions(self)

checks if the coefficient allows to estimate the number of solution components
Returns:
True if the coefficient allows an estimate of the number of solution components
           (type=bool)

estimateNumEquationsAndNumSolutions(self, domain, shape=())

tries to estimate the number of equations and number of solutions if the coefficient has the given shape
Parameters:
domain - domain on which the PDE uses the coefficient
           (type=Domain)
shape - suggested shape of the coefficient
           (type=tuple of int values)
Returns:
the number of equations and number of solutions of the PDE is the coefficient has shape s. If no appropriate numbers could be identified, None is returned
           (type=tuple of two int values or None)

getFunctionSpace(self, domain, reducedEquationOrder=False, reducedSolutionOrder=False)

defines the FunctionSpace of the coefficient
Parameters:
domain - domain on which the PDE uses the coefficient
           (type=bool)
reducedEquationOrder - True to indicate that reduced order is used to represent the equation
reducedSolutionOrder - True to indicate that reduced order is used to represent the solution
Returns:
FunctionSpace of the coefficient
           (type=FunctionSpace)

getShape(self, domain, numEquations=1, numSolutions=1)

builds the required shape of the coefficient
Parameters:
domain - domain on which the PDE uses the coefficient
           (type=Domain)
numEquations - number of equations of the PDE
           (type=int)
numSolutions - number of components of the PDE solution
           (type=int)
Returns:
shape of the coefficient
           (type=tuple of int values)

getValue(self)

returns the value of the coefficient
Returns:
value of the coefficient
           (type=Data)

isAlteringOperator(self)

checks if the coefficient alters the operator of the PDE
Returns:
True if the operator of the PDE is changed when the coefficient is changed
           (type=bool)

isAlteringRightHandSide(self)

checks if the coefficeint alters the right hand side of the PDE
Returns:
True if the right hand side of the PDE is changed when the coefficient is changed
           (type=bool)

resetValue(self)

resets coefficient value to default

setValue(self, domain, numEquations=1, numSolutions=1, reducedEquationOrder=False, reducedSolutionOrder=False, newValue=None)

set the value of the coefficient to a new value
Parameters:
domain - domain on which the PDE uses the coefficient
           (type=bool)
numEquations - number of equations of the PDE
           (type=int)
numSolutions - number of components of the PDE solution
           (type=int)
reducedEquationOrder - True to indicate that reduced order is used to represent the equation
reducedSolutionOrder - True to indicate that reduced order is used to represent the solution
newValue - number of components of the PDE solution
           (type=any object that can be converted into a Data object with the appropriate shape and FunctionSpace)
Raises:
IllegalCoefficientValue - if the shape of the assigned value does not match the shape of the coefficient

Class Variable Details

BOTH

indicator that the the coefficient alters the operator as well as the right hand side of the PDE
Type:
int
Value:
12                                                                    

BOUNDARY

indicator that coefficient is defined on the boundary of the PDE domain
Type:
int
Value:
1                                                                     

BY_DIM

indicator that the dimension of the coefficient shape is defined by the spatial dimension
Type:
int
Value:
7                                                                     

BY_EQUATION

indicator that the dimension of the coefficient shape is defined by the number PDE equations
Type:
int
Value:
5                                                                     

BY_SOLUTION

indicator that the dimension of the coefficient shape is defined by the number PDE solutions
Type:
int
Value:
6                                                                     

CONTACT

indicator that coefficient is defined on the contact region within the PDE domain
Type:
int
Value:
2                                                                     

INTERIOR

indicator that coefficient is defined on the interior of the PDE domain
Type:
int
Value:
0                                                                     

OPERATOR

indicator that the the coefficient alters the operator of the PDE
Type:
int
Value:
10                                                                    

REDUCED

indicator that coefficient is defined trough a reduced solution of the PDE
Type:
int
Value:
4                                                                     

RIGHTHANDSIDE

indicator that the the coefficient alters the right hand side of the PDE
Type:
int
Value:
11                                                                    

SOLUTION

indicator that coefficient is defined trough a solution of the PDE
Type:
int
Value:
3                                                                     

Generated by Epydoc 2.1 on Thu Apr 27 11:16:20 2006 http://epydoc.sf.net