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
23 def __init__(self, patch, float_type="double"):
25 super(PatchToDoubleArrayWithSmartPointer, self).
__init__(patch, float_type)
29 "peano4::stacks::STDVectorStackOverSmartPointers< "
30 + self.
data.get_full_qualified_type()
37 Pass in a version of output
39 output.makefile.add_cpp_file(
40 self.
data.subdirectory + self.
data.namespace[-1] +
"/" + self.
data.name +
".cpp", generated=
True
42 templatefile_prefix = (
43 os.path.realpath(__file__).replace(
".pyc",
"").replace(
".py",
"")
46 templatefile_prefix +
".template.h",
47 templatefile_prefix +
".template.cpp",
50 self.
data.subdirectory + self.
data.namespace[-1],
54 output.add(generated_files)
59#include "peano4/stacks/STDVectorStackOverSmartPointers.h"
61 + self.
data.namespace[-1]
Realise patch via smart pointers.
__init__(self, patch, float_type="double")
includes Includes to be added to the generated file.
get_stack_container(self)
get_header_file_include(self)
This is the include statement for the data container.
construct_output(self, output)
Very simple converter which maps the patch 1:1 onto a double array.
_get_dictionary_for_output(self)