MoDeNa  1.0
Software framework facilitating sequential multi-scale modelling
python.SurrogateModel.Function Class Reference
+ Inheritance diagram for python.SurrogateModel.Function:

Public Member Functions

def __init__ (self, args, kwargs)
 
def Parse (self, formula, debug=False, model='', stack={}, delim=0, var=r'[A-Za-z]+\d *', add=r'\+', sub=r'-', mul=r'\ *', div=r'/', pow=r'\^', dig=r'\d+\.?\d *'\)
 
- Public Member Functions inherited from python.SurrogateModel.CFunction
def __init__ (self, args, kwargs)
 
def initKwargs (self, kwargs)
 
def compileCcode (self, kwargs)
 Helper function to compile a model into local library. More...
 
- Public Member Functions inherited from python.SurrogateModel.SurrogateFunction
def __init__ (self, args, kwargs)
 Constructor.
 
def initKwargs (self, kwargs)
 Method that is overwritten by children. More...
 
def indexSet (self, name)
 Method returning index for a specie in IndexSet. More...
 
def checkVariableName (self, name)
 Method checking whether 'name' exists in the 'IndexSet'.
 
def inputs_iterAll (self)
 Method returning an iterator over the SurrogateFunction inputs. More...
 
def inputs_size (self)
 Method calculating the size of the input vector. More...
 
def exceptionLoad (self, surrogateFunctionId)
 Method raising exception when a surrogate function is not instantiated.
 
def load (self, surrogateFunctionId)
 Method loading a surrogate function from the database. More...
 

Additional Inherited Members

- Data Fields inherited from python.SurrogateModel.CFunction
 name
 
 libraryName
 
 functionName
 
- Static Public Attributes inherited from python.SurrogateModel.SurrogateFunction
 name = StringField(primary_key=True)
 
 inputs = MapField(EmbeddedDocumentField(MinMaxArgPosOpt))
 
 outputs = MapField(EmbeddedDocumentField(MinMaxArgPos))
 
 parameters = MapField(EmbeddedDocumentField(MinMaxArgPos))
 
 functionName = StringField(required=True)
 
 libraryName = StringField(required=True)
 
 indices = MapField(ReferenceField(IndexSet))
 
dictionary meta = {'allow_inheritance': True}
 

Detailed Description

Todo:
This is a draft for a class that can parse simple functions and write the Ccode that is compiled by CFunction.

Definition at line 614 of file SurrogateModel.py.


The documentation for this class was generated from the following file: