-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBoundCond.cuh
64 lines (47 loc) · 1.64 KB
/
BoundCond.cuh
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
#pragma once
#include "Define.h"
#include <vector_types.h>
#include "BoundCond.h"
#include <vector>
#include "Mesh.h"
namespace cfd {
struct BCInfo {
integer label = 0;
integer n_boundary = 0;
int2 *boundary = nullptr;
};
class Mesh;
template<typename BCType>
void register_bc(BCType *&bc, Parameter ¶meter, int n_bc, std::vector<integer> &indices, BCInfo *&bc_info
#if MULTISPECIES == 1
, Species &species
#endif
);
struct DZone;
struct DParameter;
struct Field;
struct DBoundCond {
DBoundCond()=default;
void initialize_bc_on_GPU(Mesh &mesh, std::vector<Field>& field
#if MULTISPECIES == 1
, Species &species
#endif
);
void link_bc_to_boundaries(Mesh &mesh, std::vector<Field>& field) const;
void apply_boundary_conditions(const Mesh &mesh, std::vector<Field> &field, DParameter *param) const;
integer n_wall = 0, n_inflow = 0, n_outflow = 0;
BCInfo *wall_info = nullptr;
BCInfo *inflow_info = nullptr;
BCInfo *outflow_info = nullptr;
Wall *wall = nullptr;
Inflow *inflow = nullptr;
Outflow *outflow = nullptr;
};
void count_boundary_of_type_bc(const std::vector<Boundary> &boundary, integer n_bc, integer *sep, integer blk_idx,
integer n_block, BCInfo *bc_info);
void link_boundary_and_condition(const std::vector<Boundary> &boundary, BCInfo *bc, integer n_bc, const integer *sep,
integer i_zone);
__global__ void apply_outflow(DZone *zone, integer i_face);
__global__ void apply_inflow(DZone *zone, Inflow *inflow, DParameter *param, integer i_face);
__global__ void apply_wall(DZone *zone, Wall *wall, DParameter *param, integer i_face);
} // cfd