1 |
# $Id$ |
# $Id$ |
2 |
|
|
3 |
from escript.modelframe import Model |
from escript.modelframe import Model,ParameterSet |
4 |
from escript.escript import Data |
from escript.escript import Data |
5 |
from escript.util import * |
from escript.util import * |
6 |
|
|
7 |
|
|
8 |
class EvaluateExpression(Model): |
class EvaluateExpression(ParameterSet): |
9 |
"""@brief return the evaluation of an expression at current time t and locations in the domain |
"""@brief return the evaluation of an expression at current time t and locations in the domain |
10 |
|
|
11 |
WARNING: this class use python's eval function!!!!! Please use input.InterpolateOverBox is possible!!!! |
WARNING: this class use python's eval function!!!!! Please use input.InterpolateOverBox is possible!!!! |
17 |
|
|
18 |
def __init__(self,debug=False): |
def __init__(self,debug=False): |
19 |
"""set up parameters""" |
"""set up parameters""" |
20 |
Model.__init__(self,debug=debug) |
ParameterSet.__init__(self,debug=debug) |
21 |
self.declareParameter(domain=None, \ |
self.declareParameter(domain=None, \ |
22 |
t=0., \ |
t=0., \ |
23 |
expression="x[0]") |
expression="x[0]") |