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

Type Helmholtz

object --+    
         |    
 LinearPDE --+
             |
            Helmholtz


Class to define a Helmhotz equation problem, which is genear LinearPDE of the form

ω*u - grad(k*grad(u)[j])[j] = f

with natural boundary conditons

k*n[j]*grad(u)[j] = g- αu

and constraints:

u=r where q>0
Method Summary
  __init__(self, domain, debug)
initializes a new Poisson equation
Data getCoefficientOfGeneralPDE(self, name)
return the value of the coefficient name of the general PDE
  setValue(self, **coefficients)
sets new values to coefficients
    Inherited from LinearPDE
str __str__(self)
returns string representation of the PDE
  alteredCoefficient(self, name)
announce that coefficient name has been changed
Data applyOperator(self, u)
applies the operator of the PDE to a given u or the solution of PDE if u is not present.
Data checkSymmetry(self, verbose)
test the PDE for symmetry.
Data copyConstraint(self, u)
copies the constraint into u and returns u.
Data createCoefficient(self, name)
create a Data object corresponding to coefficient name
Data createCoefficientOfGeneralPDE(self, name)
returns a new instance of a coefficient for coefficient name of the general PDE
Data getCoefficient(self, name)
returns the value of the coefficient name
int getDim(self)
returns the spatial dimension of the PDE
Domain getDomain(self)
returns the domain of the PDE
Data getFlux(self, u)
returns the flux J for a given u
FunctionSpace getFunctionSpaceForCoefficient(self, name)
return the FunctionSpace to be used for coefficient name
FunctionSpace getFunctionSpaceForCoefficientOfGeneralPDE(self, name)
return the FunctionSpace to be used for coefficient name of the general PDE
FunctionSpace getFunctionSpaceForEquation(self)
returns the FunctionSpace used to discretize the equation
FunctionSpace getFunctionSpaceForSolution(self)
returns the FunctionSpace used to represent the solution
int getNumEquations(self)
returns the number of equations
int getNumSolutions(self)
returns the number of unknowns
Operator getOperator(self)
provides access to the operator of the PDE
Data getResidual(self, u)
return the residual of u or the current solution if u is not present.
Data getRightHandSide(self)
provides access to the right hand side of the PDE
tuple of int getShapeOfCoefficient(self, name)
return the shape of the coefficient name
tuple of int getShapeOfCoefficientOfGeneralPDE(self, name)
return the shape of the coefficient name of the general PDE
Data getSolution(self, **options)
returns the solution of the PDE.
int getSolverMethod(self)
returns the solver method
string getSolverMethodName(self)
returns the name of the solver currently used
int getSolverPackage(self)
returns the package of the solver
tuple of Operator, and Data. getSystem(self)
return the operator and right hand side of the PDE
float getTolerance(self)
returns the tolerance set for the solution
bool hasCoefficient(self, name)
return True if name is the name of a coefficient
bool hasCoefficientOfGeneralPDE(self, name)
checks if name is a the name of a coefficient of the general PDE.
bool isSymmetric(self)
checks if symmetry is indicated.
bool isUsingLumping(self)
checks if matrix lumping is used a solver method
bool reduceEquationOrder(self)
return status for order reduction for equation
bool reduceSolutionOrder(self)
return status for order reduction for the solution
  resetCoefficients(self)
resets all coefficients to there default values.
  setDebugOff(self)
switches off debugging
  setDebugOn(self)
switches on debugging
  setReducedOrderForEquationOff(self)
switches off reduced order for equation representation
  setReducedOrderForEquationOn(self)
switches on reduced order for equation representation
  setReducedOrderForEquationTo(self, flag)
sets order for test functions according to flag
  setReducedOrderForSolutionOff(self)
switches off reduced order for solution representation
  setReducedOrderForSolutionOn(self)
switches on reduced order for solution representation
  setReducedOrderForSolutionTo(self, flag)
sets order for test functions according to flag
  setReducedOrderOff(self)
switches off reduced order for solution and equation representation
  setReducedOrderOn(self)
switches on reduced order for solution and equation representation
  setReducedOrderTo(self, flag)
sets order reduction for both solution and equation representation according to flag.
  setSolverMethod(self, solver, preconditioner)
sets a new solver
  setSolverPackage(self, package)
sets a new solver package
  setSymmetryOff(self)
removes the symmetry flag.
  setSymmetryOn(self)
sets the symmetry flag.
  setSymmetryTo(self, flag)
sets the symmetry flag to flag
  setTolerance(self, tol)
resets the tolerance for the solver method to tol where for an appropriate norm |.|
  trace(self, text)
print the text message if debugging is swiched on.
    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

Class Variable Summary
    Inherited from LinearPDE
int AMG: algebraic multi grid
int BICGSTAB: The stabilized BiConjugate Gradient method.
int CGS: The conjugate gardient square method
int CHOLEVSKY: The direct solver based on LDLt factorization (can only be applied for symmetric PDEs)
int CR: The conjugate residual method
int DEFAULT: The default method used to solve the system of linear equations
int DIRECT: The direct solver based on LDU factorization
int GMRES: The Gram-Schmidt minimum residual method
int ILU0: The incomplete LU factorization preconditioner with no fill in
int ILUT: The incomplete LU factorization preconditioner with will in
int ITERATIVE: The default iterative solver
int JACOBI: The Jacobi preconditioner
int LUMPING: Matrix lumping.
int MINIMUM_FILL_IN: Reorder matrix to reduce fill-in during factorization
int MKL: Intel's MKL solver library
int NESTED_DISSECTION: Reorder matrix to improve load balancing during factorization
int NO_REORDERING: No matrix reordering allowed
int PASO: PASO solver package
int PCG: The preconditioned conjugate gradient method (can only be applied for symmetric PDEs)
int PRES20: Special GMRES with restart after 20 steps and truncation after 5 residuals
int RILU: recursive ILU
int SCSL: SGI SCSL solver library
float SMALL_TOLERANCE = 1e-13                                                                 
int SSOR: The symmetric overrealaxtion method
int UMFPACK: the UMFPACK library

Method Details

__init__(self, domain, debug=False)
(Constructor)

initializes a new Poisson equation
Parameters:
domain - domain of the PDE
           (type=Domain)
debug - if True debug informations are printed.
Overrides:
esys.escript.linearPDEs.LinearPDE.__init__

getCoefficientOfGeneralPDE(self, name)

return the value of the coefficient name of the general PDE
Parameters:
name - name of the coefficient requested.
           (type=string)
Returns:
the value of the coefficient name
           (type=Data)
Raises:
IllegalCoefficient - if name is not one of coefficients "A", B, C, D, X, Y, d, y, d_contact, y_contact, r or q.
Overrides:
esys.escript.linearPDEs.LinearPDE.getCoefficientOfGeneralPDE

Note: This method is called by the assembling routine to map the Possion equation onto the general PDE.

setValue(self, **coefficients)

sets new values to coefficients
Parameters:
coefficients - new values assigned to coefficients
Keyword Parameters:
omega - value for coefficient ω
           (type=any type that can be casted to Scalar object on Function.)
k - value for coefficeint k
           (type=any type that can be casted to Scalar object on Function.)
f - value for right hand side f
           (type=any type that can be casted to Scalar object on Function.)
alpha - value for right hand side α
           (type=any type that can be casted to Scalar object on FunctionOnBoundary.)
g - value for right hand side g
           (type=any type that can be casted to Scalar object on FunctionOnBoundary.)
r - prescribed values r for the solution in constraints.
           (type=any type that can be casted to Scalar object on Solution or ReducedSolution depending of reduced order is used for the representation of the equation.)
q - mask for location of constraints
           (type=any type that can be casted to Scalar object on Solution or ReducedSolution depending of reduced order is used for the representation of the equation.)
Raises:
IllegalCoefficient - if an unknown coefficient keyword is used.
Overrides:
esys.escript.linearPDEs.LinearPDE.setValue

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