cuIBM
A GPU-based Immersed Boundary Method code
types.h
Go to the documentation of this file.
1 
7 #pragma once
8 
9 #include <fstream>
10 #include <iostream>
11 #include <cmath>
12 #include <cstdio>
13 
14 #include <cusp/csr_matrix.h>
15 #include <cusp/array1d.h>
16 #include <cusp/print.h>
17 #include <cusp/transpose.h>
18 #include <cusp/blas/blas.h>
19 #include <cusp/krylov/cg.h>
20 #include <cusp/krylov/bicgstab.h>
21 #include <cusp/krylov/gmres.h>
22 #include <cusp/multiply.h>
23 #include <cusp/elementwise.h>
24 #include <thrust/device_ptr.h>
25 
26 #include "logger.h"
27 
28 
33 enum bcType
34 {
40 };
41 
42 
48 {
53 };
54 
55 
61 {
67 };
68 
69 
75 {
85 };
86 
87 
93 {
97 };
98 
99 
105 {
110 };
111 
116 typedef double real;
117 
118 
119 using cusp::device_memory;
120 using cusp::host_memory;
121 
126 typedef cusp::coo_matrix<int, real, host_memory> cooH;
127 
128 
133 typedef cusp::coo_matrix<int, real, device_memory> cooD;
134 
135 
140 typedef cusp::csr_matrix<int, real, host_memory> csrH;
141 
142 
147 typedef cusp::csr_matrix<int, real, device_memory> csrD;
148 
149 
154 typedef cusp::array1d<real, host_memory> vecH;
155 
156 
161 typedef cusp::array1d<real, device_memory> vecD;
Fadlun et al. modified.
Definition: types.h:83
constant
Definition: types.h:94
double real
Is a float or a double depending on the machine precision.
Definition: types.h:116
cusp::csr_matrix< int, real, host_memory > csrH
CSR matrix stored on the host.
Definition: types.h:140
Dirichlet boundary condition.
Definition: types.h:35
fully discrete direct forcing method
Definition: types.h:78
right boundary
Definition: types.h:50
Neumann boundary condition.
Definition: types.h:36
ibmScheme
Specifies the immersed boundary method used to solve the flow.
Definition: types.h:74
bottom boundary
Definition: types.h:51
implicit Euler method (first order)
Definition: types.h:63
timeScheme
Specifies the numerical scheme used for time-integration.
Definition: types.h:60
preconditionerType
Specifies the type of preconditioner.
Definition: types.h:104
smoothed aggregation preconditioner
Definition: types.h:108
cusp::array1d< real, host_memory > vecH
Cusp 1D array stored in the host.
Definition: types.h:154
left boundary
Definition: types.h:49
no immersed bodies - Perot (1993)
Definition: types.h:76
Direct Forcing Improved.
Definition: types.h:84
Fadlun et al (2000)
Definition: types.h:79
Saiki & Biringen (1996)
Definition: types.h:77
convective boundary condition
Definition: types.h:37
quadratic
Definition: types.h:96
interpolationType
Specifies the type of interpolation.
Definition: types.h:92
cusp::coo_matrix< int, real, device_memory > cooD
COO matrix stored on the device.
Definition: types.h:133
Taira & Colonius (2007)
Definition: types.h:80
no preconditioner
Definition: types.h:106
periodic boundary condition
Definition: types.h:38
top boundary
Definition: types.h:52
approximate inverse preconditioner
Definition: types.h:109
cusp::csr_matrix< int, real, device_memory > csrD
CSR matrix stored on the device.
Definition: types.h:147
bcType
Specifies the type of boundary condition.
Definition: types.h:33
boundary
Specifies the location of the boundary.
Definition: types.h:47
Definition of the class Logger.
second-order Adams-Bashforth scheme
Definition: types.h:64
third-order low storage Runge-Kutta method
Definition: types.h:65
Crank-Nicolson scheme (second order)
Definition: types.h:66
linear
Definition: types.h:95
diagonal preconditioner
Definition: types.h:107
Diffusion.
Definition: types.h:81
cusp::coo_matrix< int, real, host_memory > cooH
COO matrix stored on the host.
Definition: types.h:126
Definition: types.h:39
explicit Euler method (first order)
Definition: types.h:62
Direct Forcing modified.
Definition: types.h:82
cusp::array1d< real, device_memory > vecD
Cusp 1D array stored in the device.
Definition: types.h:161