Peano
Loading...
Searching...
No Matches
PatchData.h
Go to the documentation of this file.
1#pragma once
2
3#include <string>
4#include <iostream>
5#include <unordered_map>
6#include <vector>
7
8#include "Variable.h"
9
10
11namespace convert {
12 namespace data {
13 class PatchData;
14 }
15}
16
17
18#define MaxDimensions 3
19
20
26 public:
27 PatchData(int dimensions, double* offset_, double* size_, int dofsPerAxis, int unknownsPerDoF, int originTree);
28
29 bool samePatch( const PatchData& otherPatch );
30 bool overlaps( const PatchData& otherPatch );
31
35 void free();
36
37 const int dimensions;
38
39 /*
40 * offset of the patch in each dimension
41 */
43
48
54 double* data;
55
61
62 void copyData( const PatchData& otherData, int dofsPerAxis, int unknownsPerDoF );
63};
64
#define MaxDimensions
Definition PatchData.h:18
A patch is a square or cube in the domain.
Definition PatchData.h:25
PatchData(int dimensions, double *offset_, double *size_, int dofsPerAxis, int unknownsPerDoF, int originTree)
Definition PatchData.cpp:15
void copyData(const PatchData &otherData, int dofsPerAxis, int unknownsPerDoF)
Definition PatchData.cpp:53
bool overlaps(const PatchData &otherPatch)
Definition PatchData.cpp:41
double * data
Mapping from variables onto the actual data.
Definition PatchData.h:54
double offset[MaxDimensions]
Definition PatchData.h:42
void free()
Free internal dynamic data types if there's still data left.
Definition PatchData.cpp:61
double size[MaxDimensions]
size of the patch in each dimension
Definition PatchData.h:47
int originTree
Tree that has originally written this piece of data.
Definition PatchData.h:60
bool samePatch(const PatchData &otherPatch)
Definition PatchData.cpp:29