Peano
Loading...
Searching...
No Matches
PatchToDoubleArrayOnHeap.template.h
Go to the documentation of this file.
1//
2// Peano4 data file
3// Generated by Peano's Python API
4// www.peano-framework.org
5// This is generated. Be careful with adding your own stuff
6//
7#pragma once
8
9
10
11#include <string>
12#include <memory>
13
14
15#include "tarch/la/Vector.h"
16#include "tarch/mpi/mpi.h"
17
20
25
26
36{% for item in NAMESPACE -%}
37 namespace {{ item }} {
38{%- endfor %}
39
40 class {{CLASSNAME}};
41
42{% for item in NAMESPACE -%}
43 }
44{%- endfor %}
45
46
47{{INCLUDES}}
48
49
50
51struct {{NAMESPACE | join("::")}}::{{CLASSNAME}} {
52 private:
53 #if Parallel
54 static MPI_Datatype Datatype;
55 #endif
56
57 #if PeanoDebug>=1
60 #endif
61
62 public:
63 typedef {{FLOAT_TYPE}} DoFType;
64
65 #if Dimensions==2
66 static constexpr int Cardinality = {{CARDINALITY_2D}};
67 #else
68 static constexpr int Cardinality = {{CARDINALITY_3D}};
69 #endif
70
71 #if PeanoDebug>=1
72 void setDebugX( const tarch::la::Vector<Dimensions,double>& data );
73 void setDebugH( const tarch::la::Vector<Dimensions,double>& data );
76 #endif
77
83 {{FLOAT_TYPE}}* value;
84
85 enum ObjectConstruction {
86 NoData
87 };
88
89
96 {{CLASSNAME}}();
97
98 {{CLASSNAME}}(ObjectConstruction flag);
99
106 {{CLASSNAME}}(const {{CLASSNAME}}& other);
107
113 ~{{CLASSNAME}}();
114
121 void clone(const {{CLASSNAME}}& other);
122
126 {{CLASSNAME}}& operator=(const {{CLASSNAME}}& other);
127
128 std::string toString() const;
129
130 {% if DATA_ASSOCIATION == 1 -%}
131 void merge(peano4::grid::TraversalObserver::SendReceiveContext context, const {{CLASSNAME}}& neighbour, const peano4::datamanagement::VertexMarker& marker, int spacetreeId);
132 bool send(
134 {% for arg in ADDITIONAL_LOAD_STORE_ARGUMENTS %}, const {{arg[1]}}& {{arg[2]}} {% endfor %}
135 ) const;
136 bool receiveAndMerge(
138 {% for arg in ADDITIONAL_LOAD_STORE_ARGUMENTS %}, const {{arg[1]}}& {{arg[2]}} {% endfor %}
139 ) const;
140 static ::peano4::grid::LoadStoreComputeFlag loadStoreComputeFlag(
142 {% for arg in ADDITIONAL_LOAD_STORE_ARGUMENTS %}, const {{arg[1]}}& {{arg[2]}} {% endfor %}
143 );
144 {% endif -%}
145
146 {% if DATA_ASSOCIATION == 2 -%}
147 void merge(peano4::grid::TraversalObserver::SendReceiveContext context, const {{CLASSNAME}}& neighbour, const peano4::datamanagement::FaceMarker& marker, int spacetreeId);
148 bool send(
150 {% for arg in ADDITIONAL_LOAD_STORE_ARGUMENTS %}, const {{arg[1]}}& {{arg[2]}} {% endfor %}
151 ) const;
152 bool receiveAndMerge(
154 {% for arg in ADDITIONAL_LOAD_STORE_ARGUMENTS %}, const {{arg[1]}}& {{arg[2]}} {% endfor %}
155 ) const;
156 static ::peano4::grid::LoadStoreComputeFlag loadStoreComputeFlag(
158 {% for arg in ADDITIONAL_LOAD_STORE_ARGUMENTS %}, const {{arg[1]}}& {{arg[2]}} {% endfor %}
159 );
160 {% endif -%}
161
162 {% if DATA_ASSOCIATION == 3 -%}
163 void merge(peano4::grid::TraversalObserver::SendReceiveContext context, const {{CLASSNAME}}& neighbour, const peano4::datamanagement::CellMarker& marker, int spacetreeId);
164 bool send(
166 {% for arg in ADDITIONAL_LOAD_STORE_ARGUMENTS %}, const {{arg[1]}}& {{arg[2]}} {% endfor %}
167 ) const;
168 bool receiveAndMerge(
170 {% for arg in ADDITIONAL_LOAD_STORE_ARGUMENTS %}, const {{arg[1]}}& {{arg[2]}} {% endfor %}
171 ) const;
172 static ::peano4::grid::LoadStoreComputeFlag loadStoreComputeFlag(
174 {% for arg in ADDITIONAL_LOAD_STORE_ARGUMENTS %}, const {{arg[1]}}& {{arg[2]}} {% endfor %}
175 );
176 {% endif -%}
177
183 tarch::la::Vector< Cardinality, {{FLOAT_TYPE}} > get() const;
184
185 {{FLOAT_TYPE}} get(int index) const;
186
191 void set( const tarch::la::Vector< Cardinality, {{FLOAT_TYPE}} >& );
192
193 void set(int index, {{FLOAT_TYPE}} value);
194
195
196 #ifdef Parallel
200 static void initDatatype();
201
205 static void shutdownDatatype();
206
211 static MPI_Datatype getForkDatatype();
212 static MPI_Datatype getJoinDatatype();
213 static MPI_Datatype getBoundaryExchangeDatatype();
214 static MPI_Datatype getMultiscaleDataExchangeDatatype();
215 static MPI_Datatype getGlobalCommunciationDatatype();
216 #endif
217};
218
219
std::string toString(exahype2::RefinementCommand value)
SendReceiveContext
There are three different scenarios when we merge data:
std::vector< GridControlEvent > merge(std::vector< GridControlEvent > events, const double Tolerance=0.1)
Merge set of refinement/coarsening commands.
Provide information about selected face.
Definition FaceMarker.h:35
Vertex marker to provide information about selected vertex.
Simple vector class.
Definition Vector.h:159