-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathattachData.h
More file actions
65 lines (57 loc) · 1.88 KB
/
attachData.h
File metadata and controls
65 lines (57 loc) · 1.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#ifndef __attachData_H_
#define __attachData_H_
#ifdef SIM
#include "MeshSim.h"
#endif
#ifdef FMDB
#include "AOMD.h"
#include "AOMDInternals.h"
#endif
#ifdef __cplusplus
extern "C" {
#endif
// attaches array to mesh entities
// `dataID' is the MeshDataId
// `nVar' is the no. of variables at each dof
// e.g., `nVar'=5 (for flow problems) or 27 (for hessians)
// `poly' is the polynomial order
// this routine attaches valueArray
// the incoming "valueArray" which contains data
// for ALL vertices (general dofs) is split into
// local entity-level arrays to handle the memory
// during local mesh modifications
void attachArray( double *valueArray,
pMesh mesh,
pMeshDataId dataID,
int nVar,
int poly);
// get data (previously attached) from mesh
// `dataID' is the MeshDataId
// `nVar' is the no. of variables at each dof
// e.g., `nVar'=5 (for flow problems) or 27 (for hessians)
// `poly' is the polynomial order
// this routine gets attached data array from mesh
// in restart-writable format
// memory is allocated within the function
// user has to delete the memory
void getAttachedArray( double *&valueArray,
pMesh mesh,
pMeshDataId dataID,
int nVar,
int poly);
// cleans data attached to mesh entities
// `dataID' is the MeshDataId
// `en_type' is the entity type on which data is atached
// e.g., 0 (for vertex), 3 (for regions), 4 (for all)
// can use polynomial order to delete data on entities
// i.e., for different modes, instead user should call routine
// for different entities depending on poly. order/mode
// with this attached data doesn't have to be solution
void cleanAttachedData( pMesh mesh,
pMeshDataId dataID,
int en_type,
int array=1);
#ifdef __cplusplus
}
#endif
#endif