Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Public Member Functions | Public Attributes | List of all members
CellMLToNektar.optimize.ExpressionMatcher.N Class Reference
Inheritance diagram for CellMLToNektar.optimize.ExpressionMatcher.N:
Inheritance graph
[legend]
Collaboration diagram for CellMLToNektar.optimize.ExpressionMatcher.N:
Collaboration graph
[legend]

Public Member Functions

def __init__
 
def match
 
- Public Member Functions inherited from CellMLToNektar.optimize.ExpressionMatcher.Pattern
def match
 

Public Attributes

 value
 

Detailed Description

A constant number, optionally with the value specified.

Definition at line 1377 of file optimize.py.

Constructor & Destructor Documentation

def CellMLToNektar.optimize.ExpressionMatcher.N.__init__ (   self,
  value = None 
)

Definition at line 1379 of file optimize.py.

1380  def __init__(self, value=None):
1381  self.value = value

Member Function Documentation

def CellMLToNektar.optimize.ExpressionMatcher.N.match (   self,
  expr 
)

Definition at line 1382 of file optimize.py.

References Nektar::NekMeshUtils::Condition.value, Nektar::NekMeshUtils::ConfigOption.value, and CellMLToNektar.optimize.ExpressionMatcher.N.value.

1383  def match(self, expr):
1384  matched = False
1385  if isinstance(expr, mathml_cn):
1386  value = expr.evaluate()
1387  if self.value is None:
1388  self.value = value
1389  if self.value == value:
1390  matched = True
1391  return matched
class X(Pattern):

Member Data Documentation

CellMLToNektar.optimize.ExpressionMatcher.N.value

Definition at line 1380 of file optimize.py.

Referenced by CellMLToNektar.validator.ValidatorError.__str__(), and CellMLToNektar.optimize.ExpressionMatcher.N.match().