cuIBM
A GPU-based Immersed Boundary Method code
Main Page
Namespaces
Classes
Files
File List
File Members
src
solvers
DFModifiedSolver.cu
Go to the documentation of this file.
1
7
#include <sys/stat.h>
8
9
#include "
DFModifiedSolver.h
"
10
11
15
template
<
typename
memoryType>
16
DFModifiedSolver<memoryType>::DFModifiedSolver
(
parameterDB
*pDB,
domain
*dInfo)
17
{
18
NavierStokesSolver<memoryType>::paramDB
= pDB;
19
NavierStokesSolver<memoryType>::domInfo
= dInfo;
20
}
// DFModifiedSolver
21
22
26
template
<
typename
memoryType>
27
void
DFModifiedSolver<memoryType>::calculateExplicitLambdaTerms
()
28
{
29
// temp_1 = Q.pressure
30
cusp::multiply(
NavierStokesSolver<memoryType>::Q
,
DirectForcingSolver<memoryType>::pressure
,
NavierStokesSolver<memoryType>::temp1
);
31
// r^n = r^n - temp1
32
cusp::blas::axpy(
NavierStokesSolver<memoryType>::temp1
,
NavierStokesSolver<memoryType>::rn
, -1.0);
33
}
// calculateExplicitLambdaTerms
34
35
39
template
<
typename
memoryType>
40
void
DFModifiedSolver<memoryType>::projectionStep
()
41
{
42
// u^{n+1} = u^{*} - B^N.Q.\phi
43
NavierStokesSolver<memoryType>::projectionStep
();
44
45
// p^{n+1} = p^{n} + \phi
46
NavierStokesSolver<memoryType>::logger
.startTimer(
"projectionStep"
);
47
cusp::blas::axpy(
NavierStokesSolver<memoryType>::lambda
,
DirectForcingSolver<memoryType>::pressure
, 1.0);
48
NavierStokesSolver<memoryType>::logger
.stopTimer(
"projectionStep"
);
49
}
// projectionStep
50
51
52
// specialization of the class
53
template
class
DFModifiedSolver<device_memory>
;
DFModifiedSolver::DFModifiedSolver
DFModifiedSolver(parameterDB *pDB=NULL, domain *dInfo=NULL)
Constructor – get simulation parameters and grid.
Definition:
DFModifiedSolver.cu:16
DFModifiedSolver::calculateExplicitLambdaTerms
virtual void calculateExplicitLambdaTerms()
Compute and add the explicit pressure gradient to the RHS of velocity system.
Definition:
DFModifiedSolver.cu:27
DirectForcingSolver
A fully discrete formulation of the direct forcing method.
Definition:
DirectForcingSolver.h:27
parameterDB
std::map< std::string, componentParameter > parameterDB
Map from a string to a componentParameter.
Definition:
parameterDB.h:64
DFModifiedSolver.h
Definition of the class DFModifiedSolver.
domain
Stores information about the computational grid.
Definition:
domain.h:16
NavierStokesSolver::projectionStep
virtual void projectionStep()
Projects the flux onto the divergence-free field.
Definition:
NavierStokesSolver.cu:536
DFModifiedSolver
A fully discrete formulation of the direct forcing method, with an explicit pressure term in the inte...
Definition:
DFModifiedSolver.h:25
NavierStokesSolver
Solves the Navier-Stokes equations in a rectangular domain.
Definition:
NavierStokesSolver.h:26
DFModifiedSolver::projectionStep
virtual void projectionStep()
Project velocity field onto divergence-free space and update pressure.
Definition:
DFModifiedSolver.cu:40
Generated on Wed Jul 19 2017 12:27:42 for cuIBM by
1.8.11