cuIBM
A GPU-based Immersed Boundary Method code
FadlunEtAlSolver.cu
Go to the documentation of this file.
1 
7 #include <sys/stat.h>
8 
9 #include "FadlunEtAlSolver.h"
11 
12 
17 template <typename memoryType>
19 {
22 } // FadlunEtAlSolver
23 
24 
28 template <typename memoryType>
30 {
33  updateG();
34 } // generateQT
35 
36 
43 template <>
45 {
46  const int blocksize = 256;
47 
48  int nx = domInfo->nx,
49  ny = domInfo->ny;
50 
51  int GSize = 4*nx*ny-2*(nx+ny);
52 
53  int *GRows = thrust::raw_pointer_cast(&(G.row_indices[0])),
54  *GCols = thrust::raw_pointer_cast(&(G.column_indices[0]));
55  int *tags_r = thrust::raw_pointer_cast(&(tagsD[0]));
56 
57  real *GVals = thrust::raw_pointer_cast(&(G.values[0]));
58 
59  dim3 dimGrid( int((GSize-0.5)/blocksize) + 1, 1);
60  dim3 dimBlock(blocksize, 1);
61 
62  kernels::updateQ <<<dimGrid, dimBlock>>> (GRows, GCols, GVals, GSize, tags_r);
63 } // updateG
64 
65 
70 template <typename memoryType>
72 {
73  // temp_1 = G.pressure
75  // r^n = r^n - temp_1
77 } // calculateExplicitLambdaTerms
78 
79 
86 template <typename memoryType>
88 {
90 } // generateC
91 
92 
93 // specialization of the class
94 template class FadlunEtAlSolver<device_memory>;
95 
96 
101 template <typename memoryType>
103 {
106 } // FEAModifiedSolver
107 
108 
113 template <typename memoryType>
115 {
117 } // generateQT
118 
119 
126 template <typename memoryType>
128 {
130 } // generateC
131 
132 
133 // specialization of the class
134 template class FEAModifiedSolver<device_memory>;
Direct forcing method proposed by Fadlun et al (2000), without explicit pressure added when the inter...
double real
Is a float or a double depending on the machine precision.
Definition: types.h:116
virtual void generateQT()
Generates the matrices QT and Q, which are the same as if an immersed boundary is not present in the ...
A fully discrete formulation of the direct forcing method.
std::map< std::string, componentParameter > parameterDB
Map from a string to a componentParameter.
Definition: parameterDB.h:64
virtual void generateC()
Generates the matrix for the Poisson equation.
Stores information about the computational grid.
Definition: domain.h:16
virtual void generateQT()
Generates the matrix QT, Q and G for FadlunEtAlSolver.
FEAModifiedSolver(parameterDB *pDB=NULL, domain *dInfo=NULL)
Constructor. Copies the database and information about the computational grid.
virtual void generateC()
Declaration of the classes FadlunEtAlSolver and FEAModifiedSolver.
FadlunEtAlSolver(parameterDB *pDB=NULL, domain *dInfo=NULL)
Constructor. Copies the database and information about the computational grid.
Direct forcing method proposed by Fadlun et al (2000).
virtual void updateG()
virtual void calculateExplicitLambdaTerms()
Add the pressure gradient to the right hand side of the momentum equation.
virtual void generateC()
Generates the matrix for the Poisson equation.
Solves the Navier-Stokes equations in a rectangular domain.
Declaration of the kernels to generate gradient matrix and interpolation matrix.
virtual void generateQT()