![]() |
Peano
|
An array of doubles, i.e. More...
Public Member Functions | |
__init__ (self, name, cardinality, valid_mantissa_bits=None, ifdefs=[], qualifier=Attribute.Qualifier.NONE, initval=None) | |
@Pawel Can you add some docu? | |
use_default_copy_constructor (self) | |
Cannot use the default copy constructor, as it is an array, i.e. | |
get_methods (self, _full_qualified_class_name, for_declaration=True) | |
Return sequence of methods that are defined for this attribute. | |
get_plain_C_attributes (self, for_constructor=False) | |
Return list of n-tuples. | |
get_first_plain_C_attribute (self) | |
For MPI for example, I need to know the first attribute. | |
get_method_body (self, signature) | |
I hand in the method signature (see get_methods()) and wanna get the whole implementation. | |
get_native_MPI_type (self) | |
Return native (built-in) MPI datatype. | |
get_to_string (self) | |
Return string representation of attribute. | |
valid_mantissa_bits (self) | |
valid_mantissa_bits (self, value) | |
Set mantissa used. | |
![]() | |
get_public_fields (self) | |
Return string that is to be embedded into the public part of the class definition. | |
get_constructor_arguments (self) | |
Return list of tuple of arguments for the constructor. | |
get_attribute_declaration_string (self) | |
Construct the string used for variable declaration using the output of get_plain_C_attributes(self). | |
get_accessor_name (self) | |
Generate the accessor name used throughout dastgen2 to create variables, function names, etc. | |
name (self) | |
I expect that there's at least one setter/getter pair. | |
get_includes (self) | |
Protected Attributes | |
_cardinality | |
_valid_mantissa_bits | |
![]() | |
_valid_mantissa_bits | |
_is_constexpr | |
![]() | |
_name | |
_initval | |
Additional Inherited Members | |
![]() | |
use_data_store | |
ifdefs | |
qualifier | |
expose_in_header_file | |
![]() | |
_is_static (self) | |
_is_const_static (self) | |
_is_const (self) | |
_is_constexpr (self) | |
An array of doubles, i.e.
a vector in the mathematical sense
:Arguments:
name: String Name of this vector
cardinality: String Cardinality of data. This has to be a string. Therefore it can be a symbol, i.e. a name defined via ifdef somewhere in your code.
Definition at line 7 of file DoubleArray.py.
dastgen2.attributes.DoubleArray.DoubleArray.__init__ | ( | self, | |
name, | |||
valid_mantissa_bits, | |||
ifdefs = None, | |||
qualifier = [], | |||
initval = Attribute.Qualifier.NONE, | |||
initval = None ) |
@Pawel Can you add some docu?
Reimplemented from dastgen2.attributes.Double.Double.
Reimplemented in peano4.dastgen2.Peano4DoubleArray.Peano4DoubleArray.
Definition at line 23 of file DoubleArray.py.
dastgen2.attributes.DoubleArray.DoubleArray.get_first_plain_C_attribute | ( | self | ) |
For MPI for example, I need to know the first attribute.
If you map your attribute onto multiple data types, it is one type that represents the whole thing.
Reimplemented from dastgen2.attributes.Attribute.Attribute.
Reimplemented in peano4.dastgen2.Peano4DoubleArray.Peano4DoubleArray.
Definition at line 84 of file DoubleArray.py.
References SBH.Limiter._name, dastgen2.attributes.Attribute.Attribute._name, dastgen2.attributes.BooleanArray.BooleanArray._name, dastgen2.attributes.Enumeration.Enumeration._name, exahype2.solvers.aderdg.ADERDG.ADERDG._name, exahype2.solvers.elliptic.AMRMarker.AMRMarker._name, exahype2.solvers.elliptic.ConstrainedPoissonEquationForMarkerOnCells.ConstrainedPoissonEquationForMarkerOnCells._name, exahype2.solvers.fv.EnclaveTasking.EnclaveTasking._name, exahype2.solvers.fv.FV.FV._name, exahype2.solvers.limiting.PosterioriLimiting.PosterioriLimiting._name, exahype2.solvers.limiting.StaticLimiting.StaticLimiting._name, exahype2.solvers.rkdg.RungeKuttaDG.RungeKuttaDG._name, exahype2.solvers.rkdg.SeparateSweeps.SeparateSweeps._name, exahype2.solvers.rkdg.SeparateSweepsWithEnclaveTasking.SeparateSweepsWithEnclaveTasking._name, exahype2.solvers.rkfd.CellCenteredFiniteDifferences.CellCenteredFiniteDifferences._name, exahype2.solvers.rkfd.OneSweepPerRungeKuttaStep.OneSweepPerRungeKuttaStep._name, exahype2.solvers.rkfd.SeparateSweeps.SeparateSweeps._name, exahype2.solvers.rkfd.SeparateSweepsWithEnclaveTasking.SeparateSweepsWithEnclaveTasking._name, peano4.dastgen2.Peano4DoubleArray.Peano4DoubleArray._name, peano4.dastgen2.Peano4IntegerArray.Peano4IntegerArray._name, solvers.api.Solver.Solver._name, mghype::matrixfree::solvers::Solver._name, api.solvers.Solver.Solver._name, and tarch::services::ServiceRepository::ServiceEntry._name.
dastgen2.attributes.DoubleArray.DoubleArray.get_method_body | ( | self, | |
signature ) |
I hand in the method signature (see get_methods()) and wanna get the whole implementation.
Reimplemented from dastgen2.attributes.Double.Double.
Reimplemented in peano4.dastgen2.Peano4DoubleArray.Peano4DoubleArray.
Definition at line 87 of file DoubleArray.py.
References dastgen2.attributes.BooleanArray.BooleanArray._cardinality, dastgen2.attributes.DoubleArray.DoubleArray._cardinality, dastgen2.attributes.IntegerArray.IntegerArray._cardinality, peano4.dastgen2.Peano4DoubleArray.Peano4DoubleArray._cardinality, peano4.dastgen2.Peano4IntegerArray.Peano4IntegerArray._cardinality, SBH.Limiter._name, dastgen2.attributes.Attribute.Attribute._name, dastgen2.attributes.BooleanArray.BooleanArray._name, dastgen2.attributes.Enumeration.Enumeration._name, exahype2.solvers.aderdg.ADERDG.ADERDG._name, exahype2.solvers.elliptic.AMRMarker.AMRMarker._name, exahype2.solvers.elliptic.ConstrainedPoissonEquationForMarkerOnCells.ConstrainedPoissonEquationForMarkerOnCells._name, exahype2.solvers.fv.EnclaveTasking.EnclaveTasking._name, exahype2.solvers.fv.FV.FV._name, exahype2.solvers.limiting.PosterioriLimiting.PosterioriLimiting._name, exahype2.solvers.limiting.StaticLimiting.StaticLimiting._name, exahype2.solvers.rkdg.RungeKuttaDG.RungeKuttaDG._name, exahype2.solvers.rkdg.SeparateSweeps.SeparateSweeps._name, exahype2.solvers.rkdg.SeparateSweepsWithEnclaveTasking.SeparateSweepsWithEnclaveTasking._name, exahype2.solvers.rkfd.CellCenteredFiniteDifferences.CellCenteredFiniteDifferences._name, exahype2.solvers.rkfd.OneSweepPerRungeKuttaStep.OneSweepPerRungeKuttaStep._name, exahype2.solvers.rkfd.SeparateSweeps.SeparateSweeps._name, exahype2.solvers.rkfd.SeparateSweepsWithEnclaveTasking.SeparateSweepsWithEnclaveTasking._name, peano4.dastgen2.Peano4DoubleArray.Peano4DoubleArray._name, peano4.dastgen2.Peano4IntegerArray.Peano4IntegerArray._name, solvers.api.Solver.Solver._name, mghype::matrixfree::solvers::Solver._name, api.solvers.Solver.Solver._name, tarch::services::ServiceRepository::ServiceEntry._name, and dastgen2.attributes.Attribute.Attribute.use_data_store.
dastgen2.attributes.DoubleArray.DoubleArray.get_methods | ( | self, | |
_full_qualified_class_name, | |||
for_declaration = True ) |
Return sequence of methods that are defined for this attribute.
Each entry is a tuple. Its first entry is the signature of the function (not including the semicolon), the second entry is the return type.
for_declaration: Boolean if True, assume we want method names for function declaration, not definition. Some generators might - for example - add additional annotations for the declaration such as Clang attributes. The most frequently used use case for this flag is the static annotation. To make a function a class function, you have to declare it as static. But the definition does not allow you to repeat that static keyword again.
Reimplemented from dastgen2.attributes.Double.Double.
Reimplemented in peano4.dastgen2.Peano4DoubleArray.Peano4DoubleArray.
Definition at line 54 of file DoubleArray.py.
References dastgen2.attributes.BooleanArray.BooleanArray._cardinality, dastgen2.attributes.DoubleArray.DoubleArray._cardinality, dastgen2.attributes.IntegerArray.IntegerArray._cardinality, peano4.dastgen2.Peano4DoubleArray.Peano4DoubleArray._cardinality, peano4.dastgen2.Peano4IntegerArray.Peano4IntegerArray._cardinality, SBH.Limiter._name, dastgen2.attributes.Attribute.Attribute._name, dastgen2.attributes.BooleanArray.BooleanArray._name, dastgen2.attributes.Enumeration.Enumeration._name, exahype2.solvers.aderdg.ADERDG.ADERDG._name, exahype2.solvers.elliptic.AMRMarker.AMRMarker._name, exahype2.solvers.elliptic.ConstrainedPoissonEquationForMarkerOnCells.ConstrainedPoissonEquationForMarkerOnCells._name, exahype2.solvers.fv.EnclaveTasking.EnclaveTasking._name, exahype2.solvers.fv.FV.FV._name, exahype2.solvers.limiting.PosterioriLimiting.PosterioriLimiting._name, exahype2.solvers.limiting.StaticLimiting.StaticLimiting._name, exahype2.solvers.rkdg.RungeKuttaDG.RungeKuttaDG._name, exahype2.solvers.rkdg.SeparateSweeps.SeparateSweeps._name, exahype2.solvers.rkdg.SeparateSweepsWithEnclaveTasking.SeparateSweepsWithEnclaveTasking._name, exahype2.solvers.rkfd.CellCenteredFiniteDifferences.CellCenteredFiniteDifferences._name, exahype2.solvers.rkfd.OneSweepPerRungeKuttaStep.OneSweepPerRungeKuttaStep._name, exahype2.solvers.rkfd.SeparateSweeps.SeparateSweeps._name, exahype2.solvers.rkfd.SeparateSweepsWithEnclaveTasking.SeparateSweepsWithEnclaveTasking._name, peano4.dastgen2.Peano4DoubleArray.Peano4DoubleArray._name, peano4.dastgen2.Peano4IntegerArray.Peano4IntegerArray._name, solvers.api.Solver.Solver._name, mghype::matrixfree::solvers::Solver._name, api.solvers.Solver.Solver._name, and tarch::services::ServiceRepository::ServiceEntry._name.
dastgen2.attributes.DoubleArray.DoubleArray.get_native_MPI_type | ( | self | ) |
Return native (built-in) MPI datatype.
Return None if there's no direct mapping. The actual result is not a string only, but a list of tuples from native type to cardinality.
Reimplemented from dastgen2.attributes.Double.Double.
Reimplemented in peano4.dastgen2.Peano4DoubleArray.Peano4DoubleArray.
Definition at line 104 of file DoubleArray.py.
References dastgen2.attributes.BooleanArray.BooleanArray._cardinality, dastgen2.attributes.DoubleArray.DoubleArray._cardinality, dastgen2.attributes.IntegerArray.IntegerArray._cardinality, peano4.dastgen2.Peano4DoubleArray.Peano4DoubleArray._cardinality, and peano4.dastgen2.Peano4IntegerArray.Peano4IntegerArray._cardinality.
dastgen2.attributes.DoubleArray.DoubleArray.get_plain_C_attributes | ( | self, | |
for_constructor = False ) |
Return list of n-tuples.
The tuple can either host two, three or four entries. The list itself may contain arbitrary many tuples, as one attribute logically can map onto multiple technical attributes. For example, when declaring an array, also declare an integer variable containing its length.
for_constructor: bool whether the return value of this function is intended for use in the constructor method of the DataModel. If true, will omit (optionally provided) initialization values in the attribute string.
The first triple entry always is the name, the second one the type. Type has to be plain C.
The first triple entry always is the name, the second one the type. Type has to be plain C. The third entry is a C++ attribute, i.e. a string embedded into [[...]].
The first triple entry always is the name, the second one the type. Type has to be plain C. The third entry is a C++ attribute, i.e. a string embedded into [[...]]. The fourth attribute is a list of ifdef symbols that have to be defined to use this attribute. The list of symbols is concatenated with an and. You can return an empty list. All symbol definitions can also be expressions such sa DEBUG>0 or defined(DEBUG).
Please note that these latter ifdefs are something completely different than the base class ifdefs. The base class ifdefs are to be used if you want to switch attributes on and off. The attributes here are used to switch between realisation variants.
Arrays can be modelled by adding a cardinality ("[15]" for example) to the first triple entry, i.e. the name.
Reimplemented from dastgen2.attributes.Double.Double.
Reimplemented in peano4.dastgen2.Peano4DoubleArray.Peano4DoubleArray.
Definition at line 70 of file DoubleArray.py.
References dastgen2.attributes.BooleanArray.BooleanArray._cardinality, dastgen2.attributes.DoubleArray.DoubleArray._cardinality, dastgen2.attributes.IntegerArray.IntegerArray._cardinality, peano4.dastgen2.Peano4DoubleArray.Peano4DoubleArray._cardinality, peano4.dastgen2.Peano4IntegerArray.Peano4IntegerArray._cardinality, SBH.Limiter._name, dastgen2.attributes.Attribute.Attribute._name, dastgen2.attributes.BooleanArray.BooleanArray._name, dastgen2.attributes.Enumeration.Enumeration._name, exahype2.solvers.aderdg.ADERDG.ADERDG._name, exahype2.solvers.elliptic.AMRMarker.AMRMarker._name, exahype2.solvers.elliptic.ConstrainedPoissonEquationForMarkerOnCells.ConstrainedPoissonEquationForMarkerOnCells._name, exahype2.solvers.fv.EnclaveTasking.EnclaveTasking._name, exahype2.solvers.fv.FV.FV._name, exahype2.solvers.limiting.PosterioriLimiting.PosterioriLimiting._name, exahype2.solvers.limiting.StaticLimiting.StaticLimiting._name, exahype2.solvers.rkdg.RungeKuttaDG.RungeKuttaDG._name, exahype2.solvers.rkdg.SeparateSweeps.SeparateSweeps._name, exahype2.solvers.rkdg.SeparateSweepsWithEnclaveTasking.SeparateSweepsWithEnclaveTasking._name, exahype2.solvers.rkfd.CellCenteredFiniteDifferences.CellCenteredFiniteDifferences._name, exahype2.solvers.rkfd.OneSweepPerRungeKuttaStep.OneSweepPerRungeKuttaStep._name, exahype2.solvers.rkfd.SeparateSweeps.SeparateSweeps._name, exahype2.solvers.rkfd.SeparateSweepsWithEnclaveTasking.SeparateSweepsWithEnclaveTasking._name, peano4.dastgen2.Peano4DoubleArray.Peano4DoubleArray._name, peano4.dastgen2.Peano4IntegerArray.Peano4IntegerArray._name, solvers.api.Solver.Solver._name, mghype::matrixfree::solvers::Solver._name, api.solvers.Solver.Solver._name, tarch::services::ServiceRepository::ServiceEntry._name, dastgen2.attributes.Double.Double._valid_mantissa_bits, dastgen2.attributes.DoubleArray.DoubleArray._valid_mantissa_bits, and peano4.dastgen2.Peano4DoubleArray.Peano4DoubleArray._valid_mantissa_bits.
Referenced by dastgen2.attributes.Attribute.Attribute.get_attribute_declaration_string(), dastgen2.attributes.Attribute.Attribute.get_constructor_arguments(), and dastgen2.attributes.Attribute.Attribute.get_first_plain_C_attribute().
dastgen2.attributes.DoubleArray.DoubleArray.get_to_string | ( | self | ) |
Return string representation of attribute.
Reimplemented from dastgen2.attributes.Double.Double.
Reimplemented in peano4.dastgen2.Peano4DoubleArray.Peano4DoubleArray.
Definition at line 107 of file DoubleArray.py.
References SBH.Limiter._name, dastgen2.attributes.Attribute.Attribute._name, dastgen2.attributes.BooleanArray.BooleanArray._name, dastgen2.attributes.Enumeration.Enumeration._name, exahype2.solvers.aderdg.ADERDG.ADERDG._name, exahype2.solvers.elliptic.AMRMarker.AMRMarker._name, exahype2.solvers.elliptic.ConstrainedPoissonEquationForMarkerOnCells.ConstrainedPoissonEquationForMarkerOnCells._name, exahype2.solvers.fv.EnclaveTasking.EnclaveTasking._name, exahype2.solvers.fv.FV.FV._name, exahype2.solvers.limiting.PosterioriLimiting.PosterioriLimiting._name, exahype2.solvers.limiting.StaticLimiting.StaticLimiting._name, exahype2.solvers.rkdg.RungeKuttaDG.RungeKuttaDG._name, exahype2.solvers.rkdg.SeparateSweeps.SeparateSweeps._name, exahype2.solvers.rkdg.SeparateSweepsWithEnclaveTasking.SeparateSweepsWithEnclaveTasking._name, exahype2.solvers.rkfd.CellCenteredFiniteDifferences.CellCenteredFiniteDifferences._name, exahype2.solvers.rkfd.OneSweepPerRungeKuttaStep.OneSweepPerRungeKuttaStep._name, exahype2.solvers.rkfd.SeparateSweeps.SeparateSweeps._name, exahype2.solvers.rkfd.SeparateSweepsWithEnclaveTasking.SeparateSweepsWithEnclaveTasking._name, peano4.dastgen2.Peano4DoubleArray.Peano4DoubleArray._name, peano4.dastgen2.Peano4IntegerArray.Peano4IntegerArray._name, solvers.api.Solver.Solver._name, mghype::matrixfree::solvers::Solver._name, api.solvers.Solver.Solver._name, tarch::services::ServiceRepository::ServiceEntry._name, and dastgen2.attributes.Attribute.Attribute.use_data_store.
dastgen2.attributes.DoubleArray.DoubleArray.use_default_copy_constructor | ( | self | ) |
Cannot use the default copy constructor, as it is an array, i.e.
we need some manual deep copying.
Reimplemented from dastgen2.attributes.Attribute.Attribute.
Reimplemented in peano4.dastgen2.Peano4DoubleArray.Peano4DoubleArray.
Definition at line 45 of file DoubleArray.py.
dastgen2.attributes.DoubleArray.DoubleArray.valid_mantissa_bits | ( | self | ) |
Reimplemented from dastgen2.attributes.Double.Double.
Definition at line 119 of file DoubleArray.py.
References dastgen2.attributes.Double.Double._valid_mantissa_bits, dastgen2.attributes.DoubleArray.DoubleArray._valid_mantissa_bits, and peano4.dastgen2.Peano4DoubleArray.Peano4DoubleArray._valid_mantissa_bits.
dastgen2.attributes.DoubleArray.DoubleArray.valid_mantissa_bits | ( | self, | |
value ) |
Set mantissa used.
Pass in None, if you want to use the default accuracy.
Reimplemented from dastgen2.attributes.Double.Double.
Definition at line 123 of file DoubleArray.py.
References dastgen2.attributes.Double.Double._valid_mantissa_bits, dastgen2.attributes.DoubleArray.DoubleArray._valid_mantissa_bits, and peano4.dastgen2.Peano4DoubleArray.Peano4DoubleArray._valid_mantissa_bits.
|
protected |
Definition at line 42 of file DoubleArray.py.
Referenced by dastgen2.attributes.BooleanArray.BooleanArray.get_constructor_arguments(), peano4.dastgen2.Peano4DoubleArray.Peano4DoubleArray.get_constructor_arguments(), peano4.dastgen2.Peano4IntegerArray.Peano4IntegerArray.get_constructor_arguments(), dastgen2.attributes.BooleanArray.BooleanArray.get_method_body(), dastgen2.attributes.DoubleArray.DoubleArray.get_method_body(), dastgen2.attributes.IntegerArray.IntegerArray.get_method_body(), peano4.dastgen2.Peano4DoubleArray.Peano4DoubleArray.get_method_body(), peano4.dastgen2.Peano4IntegerArray.Peano4IntegerArray.get_method_body(), dastgen2.attributes.BooleanArray.BooleanArray.get_methods(), dastgen2.attributes.DoubleArray.DoubleArray.get_methods(), dastgen2.attributes.IntegerArray.IntegerArray.get_methods(), peano4.dastgen2.Peano4DoubleArray.Peano4DoubleArray.get_methods(), peano4.dastgen2.Peano4IntegerArray.Peano4IntegerArray.get_methods(), dastgen2.attributes.DoubleArray.DoubleArray.get_native_MPI_type(), dastgen2.attributes.IntegerArray.IntegerArray.get_native_MPI_type(), peano4.dastgen2.Peano4DoubleArray.Peano4DoubleArray.get_native_MPI_type(), peano4.dastgen2.Peano4IntegerArray.Peano4IntegerArray.get_native_MPI_type(), dastgen2.attributes.BooleanArray.BooleanArray.get_plain_C_attributes(), dastgen2.attributes.DoubleArray.DoubleArray.get_plain_C_attributes(), dastgen2.attributes.IntegerArray.IntegerArray.get_plain_C_attributes(), peano4.dastgen2.Peano4DoubleArray.Peano4DoubleArray.get_plain_C_attributes(), and peano4.dastgen2.Peano4IntegerArray.Peano4IntegerArray.get_plain_C_attributes().
|
protected |
Definition at line 43 of file DoubleArray.py.
Referenced by peano4.dastgen2.Peano4DoubleArray.Peano4DoubleArray.get_method_body(), dastgen2.attributes.Double.Double.get_plain_C_attributes(), dastgen2.attributes.DoubleArray.DoubleArray.get_plain_C_attributes(), peano4.dastgen2.Peano4DoubleArray.Peano4DoubleArray.get_plain_C_attributes(), peano4.dastgen2.Peano4DoubleArray.Peano4DoubleArray.get_to_string(), dastgen2.attributes.Double.Double.valid_mantissa_bits(), dastgen2.attributes.DoubleArray.DoubleArray.valid_mantissa_bits(), dastgen2.attributes.Double.Double.valid_mantissa_bits(), and dastgen2.attributes.DoubleArray.DoubleArray.valid_mantissa_bits().