Peano
Loading...
Searching...
No Matches
DynamicArrayOverPrimitivesToStdVector.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
4import os
5
6
7
9 """
10 Very simple converter which maps the patch 1:1 onto a double array
11 """
12 def __init__(self,patch):
13 self.data = patch
14
15
17 return "peano4::stacks::STDVectorStack< " + self._data.get_full_qualified_type() + " >";
18
19
21 return "#include \"peano4/stacks/STDVectorStack.h\" \n \
22 #include \"" + self.data.namespace[-1] + "/" + self.data.name + ".h\""
23
24
25 def construct_output(self,output):
26 """
27 Pass in a version of output
28 """
29 templatefile_prefix = os.path.realpath(__file__).replace( ".pyc", "" ).replace( ".py", "" )
31 templatefile_prefix+".template.h",
32 None,
33 self.data.name,
34 self.data.namespace,
35 self.data.subdirectory + self.data.namespace[-1],
36 {
37 "TYPE" : self.data.primitive_type
38 },
39 #{
40 # "CARDINALITY_2D": str(self.data.no_of_unknowns*self.data.dim[0]*self.data.dim[1]),
41 # "CARDINALITY_3D": str(self.data.no_of_unknowns*self.data.dim[0]*self.data.dim[1]*self.data.dim[2])
42 #},
43 True)
44 output.add(generated_files)
45 pass
46