6from .DoF
import DoFAssociation
7from .PatchToDoubleArray
import FloatTypes
8from .PatchToDoubleArray
import PatchToDoubleArray
14 Realise patch via smart pointers
16 Converter which maps the patch 1:1 onto a double array administered
17 through a smart pointer. This is an alternative to the patch realisation
18 on the call stack, which can become really costly and lead to call stack
21 Even though the name of the class does not highlight this, we use smart
22 pointers here, i.e. we do not only store data on the heap. This means
27 def __init__(self, patch, float_type="double"):
29 super(PatchToDoubleArrayOnHeap, self).
__init__(patch, float_type)
33 "peano4::stacks::STDVectorStack< "
34 + self.
data.get_full_qualified_type()
41 Pass in a version of output
43 output.makefile.add_cpp_file(
44 self.
data.subdirectory + self.
data.namespace[-1] +
"/" + self.
data.name +
".cpp", generated=
True
46 templatefile_prefix = (
47 os.path.realpath(__file__).replace(
".pyc",
"").replace(
".py",
"")
50 templatefile_prefix +
".template.h",
51 templatefile_prefix +
".template.cpp",
54 self.
data.subdirectory + self.
data.namespace[-1],
58 output.add(generated_files)
63#include "peano4/stacks/STDVectorOverContainerOfPointers.h"
65 + self.
data.namespace[-1]
Realise patch via smart pointers.
get_header_file_include(self)
This is the include statement for the data container.
construct_output(self, output)
get_stack_container(self)
__init__(self, patch, float_type="double")
includes Includes to be added to the generated file.
Very simple converter which maps the patch 1:1 onto a double array.
_get_dictionary_for_output(self)