Peano
Loading...
Searching...
No Matches
DaStGen.py
Go to the documentation of this file.
1# This file is part of the Peano project. For conditions of distribution and
2# use, please see the copyright notice at www.peano-framework.org
3from .DaStGenToLegacyTool import DaStGenToLegacyTool
4from .DoF import DoF
5
6
7
8class DaStGen(DoF):
9 def __init__(self, name):
10 """
11 dim should be a two-tuple or a three-tuple of integers, so a construction
12 could look like
13
14 cell_data = peano4.datamodel.Patch( (6,6,6), "Fluid" )
15
16 attributes_double Series of strings which encode doubles.
17 attributes_enum Series of tuples with a string plus an array of strings.
18 """
19 super(DaStGen, self).__init__(name)
24
25
26 def add_double_scalar(self, name):
27 self.attributes_double.append( name )
28
29
30 def add_integer_scalar(self, name):
31 self.attributes_integer.append( name )
32
33
34 def add_enum(self, enum_name, enum_variants ):
35 """
36 enum Is a set or series of strings.
37 """
38 self.attributes_enum.append( (enum_name, enum_variants) )
39 # attributes_enum Series of tuples with a string plus an array of strings.
40
add_enum(self, enum_name, enum_variants)
enum Is a set or series of strings.
Definition DaStGen.py:34
__init__(self, name)
dim should be a two-tuple or a three-tuple of integers, so a construction could look like
Definition DaStGen.py:9