PetIBM 0.5.4
Toolbox and applications of the immersed-boundary method for distributed-memory architectures
decoupledibpm.cpp
Go to the documentation of this file.
1
10#include <petscviewerhdf5.h>
11
12#include <petibm/delta.h>
13
14#include "decoupledibpm.h"
15
17 const YAML::Node &node)
18{
19 init(world, node);
20} // DecoupledIBPMSolver
21
23{
24 PetscErrorCode ierr;
25 PetscBool finalized;
26
27 PetscFunctionBeginUser;
28
29 ierr = PetscFinalized(&finalized); CHKERRV(ierr);
30 if (finalized) return;
31
32 ierr = destroy(); CHKERRV(ierr);
33} // ~DecoupledIBPMSolver
34
35// destroy
37{
38 PetscErrorCode ierr;
39
40 PetscFunctionBeginUser;
41
42 fSolver.reset();
43 bodies.reset();
44 ierr = VecDestroy(&df); CHKERRQ(ierr);
45 ierr = VecDestroy(&f); CHKERRQ(ierr);
46 ierr = VecDestroy(&rhsf); CHKERRQ(ierr);
47 ierr = MatDestroy(&H); CHKERRQ(ierr);
48 ierr = MatDestroy(&E); CHKERRQ(ierr);
49 ierr = MatDestroy(&EBNH); CHKERRQ(ierr);
50 ierr = MatDestroy(&BNH); CHKERRQ(ierr);
51 ierr = PetscViewerDestroy(&forcesViewer); CHKERRQ(ierr);
52 ierr = NavierStokesSolver::destroy(); CHKERRQ(ierr);
53
54 PetscFunctionReturn(0);
55} // destroy
56
57PetscErrorCode DecoupledIBPMSolver::init(const MPI_Comm &world,
58 const YAML::Node &node)
59{
60 PetscErrorCode ierr;
61
62 PetscFunctionBeginUser;
63
64 ierr = NavierStokesSolver::init(world, node); CHKERRQ(ierr);
65
66 ierr = PetscLogStagePush(stageInitialize); CHKERRQ(ierr);
67
68 // create a pack of immersed bodies
70 comm, mesh->dim, config, bodies); CHKERRQ(ierr);
71 ierr = bodies->updateMeshIdx(mesh); CHKERRQ(ierr);
72
73 // create the linear solver object for the Lagrangian forces
75 "forces", config, fSolver); CHKERRQ(ierr);
76
77 // create additional operators required for the decoupled IBPM
78 ierr = createExtraOperators(); CHKERRQ(ierr);
79
80 // create additional vectors required for the decoupled IBPM
81 ierr = createExtraVectors(); CHKERRQ(ierr);
82
83 // set coefficient matrix to the linear solver for the forces
84 ierr = fSolver->setMatrix(EBNH); CHKERRQ(ierr);
85
86 // create an ASCII PetscViewer to output the body forces
88 config["output"].as<std::string>() +
89 "/forces-" + std::to_string(ite) + ".txt",
90 FILE_MODE_WRITE, forcesViewer); CHKERRQ(ierr);
91
92 // register additional logging stages
93 ierr = PetscLogStageRegister("rhsForces", &stageRHSForces); CHKERRQ(ierr);
94 ierr = PetscLogStageRegister(
95 "solveForces", &stageSolveForces); CHKERRQ(ierr);
96 ierr = PetscLogStageRegister(
97 "integrateForces", &stageIntegrateForces); CHKERRQ(ierr);
98
99 ierr = PetscLogStagePop(); CHKERRQ(ierr); // end of stageInitialize
100
101 PetscFunctionReturn(0);
102} // init
103
104// advance the decoupled IBPM solver by one time-step
106{
107 PetscErrorCode ierr;
108
109 PetscFunctionBeginUser;
110
111 t += dt;
112 ite++;
113
114 ierr = assembleRHSVelocity(); CHKERRQ(ierr);
115 ierr = solveVelocity(); CHKERRQ(ierr);
116
117 ierr = assembleRHSForces(); CHKERRQ(ierr);
118 ierr = solveForces(); CHKERRQ(ierr);
119 ierr = applyNoSlip(); CHKERRQ(ierr);
120
121 ierr = assembleRHSPoisson(); CHKERRQ(ierr);
122 ierr = solvePoisson(); CHKERRQ(ierr);
123 ierr = applyDivergenceFreeVelocity(); CHKERRQ(ierr);
124
125 ierr = updatePressure(); CHKERRQ(ierr);
126 ierr = updateForces(); CHKERRQ(ierr);
127
128 ierr = bc->updateGhostValues(solution); CHKERRQ(ierr);
129
130 PetscFunctionReturn(0);
131} // advance
132
133// write solution fields, linear solvers info, and body forces to files
135{
136 PetscErrorCode ierr;
137
138 PetscFunctionBeginUser;
139
140 ierr = NavierStokesSolver::write(); CHKERRQ(ierr);
141
142 // write body forces
143 ierr = writeForcesASCII(); CHKERRQ(ierr);
144
145 PetscFunctionReturn(0);
146} // write
147
148// create additional operators (PETSc Mat objects) for the decoupled IBPM
150{
151 PetscErrorCode ierr;
152
153 PetscFunctionBeginUser;
154
155 Mat R;
156 Mat MHat;
157 Mat BN;
158 Vec RDiag;
159 Vec MHatDiag;
160
161 // create diagonal matrix R and hold the diagonal in a PETSc Vec object
162 ierr = petibm::operators::createR(mesh, R); CHKERRQ(ierr);
163 ierr = MatCreateVecs(R, nullptr, &RDiag); CHKERRQ(ierr);
164 ierr = MatGetDiagonal(R, RDiag); CHKERRQ(ierr);
165
166 // create diagonal matrix MHat and hold the diagonal in a PETSc Vec object
167 ierr = petibm::operators::createMHead(mesh, MHat); CHKERRQ(ierr);
168 ierr = MatCreateVecs(MHat, nullptr, &MHatDiag); CHKERRQ(ierr);
169 ierr = MatGetDiagonal(MHat, MHatDiag); CHKERRQ(ierr);
170
171 // create a Delta operator and its transpose
172 const YAML::Node &node = config["parameters"];
173 std::string name = node["delta"].as<std::string>("ROMA_ET_AL_1999");
175 PetscInt kernelSize;
176 ierr = petibm::delta::getKernel(name, kernel, kernelSize); CHKERRQ(ierr);
178 mesh, bc, bodies, kernel, kernelSize, E); CHKERRQ(ierr);
179 ierr = MatTranspose(E, MAT_INITIAL_MATRIX, &H); CHKERRQ(ierr);
180
181 // create the regularization operator: E
182 ierr = MatDiagonalScale(E, nullptr, RDiag); CHKERRQ(ierr);
183 ierr = MatDiagonalScale(E, nullptr, MHatDiag); CHKERRQ(ierr);
184
185 // create the spreading operator: H
186 // Note: we do nothing here. Because if f is force (unit [m/s^2]), we need
187 // to convert it to pressure when using it in Eulerian momentum equations.
188 // That is, (H*R^{-1}*f). While H = R*Delta, This means the real scattering
189 // operator used in momentum equation is just a Delta operator. So we just
190 // let H be the Delta operator. One thing to remember is that this is based
191 // on the assumption that the size of Lagrangian element is equal to the
192 // size of the Eulerian grid near by.
193
194 // create the operator BN
195 PetscInt N; // order of the truncate Taylor series expansion
196 N = config["parameters"]["BN"].as<PetscInt>(1);
198 L, dt, diffCoeffs->implicitCoeff * nu, N, BN); CHKERRQ(ierr);
199
200 // create the operator BNH
201 ierr = MatMatMult(
202 BN, H, MAT_INITIAL_MATRIX, PETSC_DEFAULT, &BNH); CHKERRQ(ierr);
203
204 // create the operator EBNH
205 ierr = MatMatMult(
206 E, BNH, MAT_INITIAL_MATRIX, PETSC_DEFAULT, &EBNH); CHKERRQ(ierr);
207
208 // destroy temporary PETSc Vec and Mat objects
209 ierr = VecDestroy(&RDiag); CHKERRQ(ierr);
210 ierr = VecDestroy(&MHatDiag); CHKERRQ(ierr);
211 ierr = MatDestroy(&MHat); CHKERRQ(ierr);
212 ierr = MatDestroy(&R); CHKERRQ(ierr);
213 ierr = MatDestroy(&BN); CHKERRQ(ierr);
214
215 PetscFunctionReturn(0);
216} // createExtraOperators
217
218// create additional vectors (PETSc Vec objects) for the decoupled IBPM
220{
221 PetscErrorCode ierr;
222
223 PetscFunctionBeginUser;
224
225 ierr = DMCreateGlobalVector(bodies->dmPack, &f); CHKERRQ(ierr);
226 ierr = VecDuplicate(f, &df); CHKERRQ(ierr);
227 ierr = VecDuplicate(f, &rhsf); CHKERRQ(ierr);
228
229 PetscFunctionReturn(0);
230} // createExtraVectors
231
232// assemble the right-hand side vector of the forces system
234{
235 PetscErrorCode ierr;
236
237 PetscFunctionBeginUser;
238
239 // assemble the part coming from underlying Navier-Stokes solver
240 ierr = NavierStokesSolver::assembleRHSVelocity(); CHKERRQ(ierr);
241
242 ierr = PetscLogStagePush(stageRHSVelocity); CHKERRQ(ierr);
243
244 // add the Lagrangian forces spread to the Eulerian grid
245 ierr = MatMultAdd(H, f, rhs1, rhs1); CHKERRQ(ierr);
246
247 ierr = PetscLogStagePop(); CHKERRQ(ierr); // end of stageRHSVelocity
248
249 PetscFunctionReturn(0);
250} // assembleRHSVelocity
251
252// assemble the RHS vector of the system for the Lagrangian forces
254{
255 PetscErrorCode ierr;
256
257 PetscFunctionBeginUser;
258
259 ierr = PetscLogStagePush(stageRHSForces); CHKERRQ(ierr);
260
261 // rhsf is -E u^{**}
262 ierr = MatMult(E, solution->UGlobal, rhsf); CHKERRQ(ierr);
263 ierr = VecScale(rhsf, -1.0); CHKERRQ(ierr);
264
265 ierr = PetscLogStagePop(); CHKERRQ(ierr); // end of stageRHSForces
266
267 PetscFunctionReturn(0);
268} // assembleRHSForces
269
270// solve the system for the increment in the Lagrangian forces
272{
273 PetscErrorCode ierr;
274
275 PetscFunctionBeginUser;
276
277 ierr = PetscLogStagePush(stageSolveForces); CHKERRQ(ierr);
278
279 // solve for the increment in the Lagrangian forces
280 ierr = fSolver->solve(df, rhsf); CHKERRQ(ierr);
281
282 ierr = PetscLogStagePop(); CHKERRQ(ierr); // end of stageSolveForces
283
284 PetscFunctionReturn(0);
285} // solveForces
286
287// update the velocity field to satisfy the no-slip condition on the body interfaces
289{
290 PetscErrorCode ierr;
291
292 PetscFunctionBeginUser;
293
294 // u = u + BN H df
295 ierr = MatMultAdd(
296 BNH, df, solution->UGlobal, solution->UGlobal); CHKERRQ(ierr);
297
298 PetscFunctionReturn(0);
299} // applyNoSlip
300
301// update the vector forces
303{
304 PetscErrorCode ierr;
305
306 PetscFunctionBeginUser;
307
308 ierr = PetscLogStagePush(stageUpdate); CHKERRQ(ierr);
309
310 // f = f + df
311 ierr = VecAXPY(f, 1.0, df); CHKERRQ(ierr);
312
313 ierr = PetscLogStagePop(); CHKERRQ(ierr); // end of stageUpdate
314
315 PetscFunctionReturn(0);
316} // updateForces
317
318// write data required to restart a simulation into a HDF5 file
320 const std::string &filePath)
321{
322 PetscErrorCode ierr;
323
324 PetscFunctionBeginUser;
325
326 ierr = NavierStokesSolver::writeRestartDataHDF5(filePath); CHKERRQ(ierr);
327
328 ierr = PetscLogStagePush(stageWrite); CHKERRQ(ierr);
329
330 // create PetscViewer object with append mode
331 PetscViewer viewer;
332 ierr = PetscViewerCreate(comm, &viewer); CHKERRQ(ierr);
333 ierr = PetscViewerSetType(viewer, PETSCVIEWERHDF5); CHKERRQ(ierr);
334 ierr = PetscViewerFileSetMode(viewer, FILE_MODE_APPEND); CHKERRQ(ierr);
335 ierr = PetscViewerFileSetName(viewer, filePath.c_str()); CHKERRQ(ierr);
336
337 // go to the root node first (just in case, not necessary)
338 ierr = PetscViewerHDF5PushGroup(viewer, "/"); CHKERRQ(ierr);
339
340 // write the Lagrangian forces
341 ierr = PetscObjectSetName((PetscObject)f, "force"); CHKERRQ(ierr);
342 ierr = VecView(f, viewer); CHKERRQ(ierr);
343
344 // destroy viewer
345 ierr = PetscViewerDestroy(&viewer); CHKERRQ(ierr);
346
347 ierr = PetscLogStagePop(); CHKERRQ(ierr); // end of stageWrite
348
349 PetscFunctionReturn(0);
350} // writeRestartDataHDF5
351
352// read data required to restart a simulation from a HDF5 file
354 const std::string &filePath)
355{
356 PetscErrorCode ierr;
357
358 PetscFunctionBeginUser;
359
360 ierr = NavierStokesSolver::readRestartDataHDF5(filePath); CHKERRQ(ierr);
361
362 // create PetscViewer object with read-only mode
363 PetscViewer viewer;
364 ierr = PetscViewerCreate(comm, &viewer); CHKERRQ(ierr);
365 ierr = PetscViewerSetType(viewer, PETSCVIEWERHDF5); CHKERRQ(ierr);
366 ierr = PetscViewerFileSetMode(viewer, FILE_MODE_READ); CHKERRQ(ierr);
367 ierr = PetscViewerFileSetName(viewer, filePath.c_str()); CHKERRQ(ierr);
368
369 // go to the root node first (just in case, not necessary)
370 ierr = PetscViewerHDF5PushGroup(viewer, "/"); CHKERRQ(ierr);
371
372 // read the Lagrangian forces
373 ierr = PetscObjectSetName((PetscObject)f, "force"); CHKERRQ(ierr);
374 ierr = VecLoad(f, viewer); CHKERRQ(ierr);
375
376 // destroy viewer
377 ierr = PetscViewerDestroy(&viewer); CHKERRQ(ierr);
378
379 PetscFunctionReturn(0);
380} // readRestartDataHDF5
381
382// write numbers of iterations and residuals of linear solvers to an ASCII file
384{
385 PetscErrorCode ierr;
386 PetscInt nIters;
387 PetscReal res;
388
389 PetscFunctionBeginUser;
390
391 ierr = PetscLogStagePush(stageWrite); CHKERRQ(ierr);
392
393 // write the time value
394 ierr = PetscViewerASCIIPrintf(solversViewer, "%d\t", ite); CHKERRQ(ierr);
395
396 // write iterations number and residual for the velocity solver
397 ierr = vSolver->getIters(nIters); CHKERRQ(ierr);
398 ierr = vSolver->getResidual(res); CHKERRQ(ierr);
399 ierr = PetscViewerASCIIPrintf(
400 solversViewer, "%d\t%e\t", nIters, res); CHKERRQ(ierr);
401
402 // write iterations number and residual for the Poisson solver
403 ierr = pSolver->getIters(nIters); CHKERRQ(ierr);
404 ierr = pSolver->getResidual(res); CHKERRQ(ierr);
405 ierr = PetscViewerASCIIPrintf(
406 solversViewer, "%d\t%e\t", nIters, res); CHKERRQ(ierr);
407
408 // write iterations number and residual for the forces solver
409 ierr = fSolver->getIters(nIters); CHKERRQ(ierr);
410 ierr = fSolver->getResidual(res); CHKERRQ(ierr);
411 ierr = PetscViewerASCIIPrintf(
412 solversViewer, "%d\t%e\n", nIters, res); CHKERRQ(ierr);
413
414 ierr = PetscLogStagePop(); CHKERRQ(ierr); // end of stageWrite
415
416 PetscFunctionReturn(0);
417} // writeLinSolversInfo
418
419// integrate the forces and output to ASCII file
421{
422 PetscErrorCode ierr;
424
425 PetscFunctionBeginUser;
426
427 ierr = PetscLogStagePush(stageIntegrateForces); CHKERRQ(ierr);
428
429 // get averaged forces first
430 ierr = bodies->calculateAvgForces(f, fAvg); CHKERRQ(ierr);
431
432 ierr = PetscLogStagePop(); CHKERRQ(ierr);
433
434 ierr = PetscLogStagePush(stageWrite); CHKERRQ(ierr);
435
436 // write the time value
437 ierr = PetscViewerASCIIPrintf(forcesViewer, "%10.8e\t", t); CHKERRQ(ierr);
438
439 // write forces for each immersed body
440 for (int i = 0; i < bodies->nBodies; ++i)
441 {
442 for (int d = 0; d < mesh->dim; ++d)
443 {
444 ierr = PetscViewerASCIIPrintf(
445 forcesViewer, "%10.8e\t", fAvg[i][d]); CHKERRQ(ierr);
446 }
447 }
448 ierr = PetscViewerASCIIPrintf(forcesViewer, "\n"); CHKERRQ(ierr);
449
450 ierr = PetscLogStagePop(); CHKERRQ(ierr); // end of stageIntegrateForces
451
452 PetscFunctionReturn(0);
453} // writeForcesASCII
Mat E
Regularization operator.
Definition: decoupledibpm.h:69
PetscLogStage stageRHSForces
Log stage for assembling the RHS of the forces system.
Definition: decoupledibpm.h:87
Mat BNH
Projection operator for the forces.
Definition: decoupledibpm.h:75
petibm::type::BodyPack bodies
Pack of immersed bodies.
Definition: decoupledibpm.h:60
virtual PetscErrorCode writeLinSolversInfo()
Write numbers of iterations and residuals of solvers to file.
virtual PetscErrorCode applyNoSlip()
Update the velocity to satisfy the no-slip condition.
Mat H
Spreading operator.
Definition: decoupledibpm.h:66
PetscViewer forcesViewer
ASCII PetscViewer object to output the forces.
Definition: decoupledibpm.h:96
virtual PetscErrorCode writeRestartDataHDF5(const std::string &filePath)
Write data required to restart a simulation into a HDF5 file.
Vec f
Vector to hold the forces at time step n.
Definition: decoupledibpm.h:78
virtual PetscErrorCode readRestartDataHDF5(const std::string &filePath)
Read data required to restart a simulation from a HDF5 file.
PetscErrorCode init(const MPI_Comm &world, const YAML::Node &node)
Initialize the decoupled IBPM solver.
DecoupledIBPMSolver()=default
Default constructor.
virtual PetscErrorCode createExtraOperators()
Assemble additional operators.
PetscLogStage stageSolveForces
Log stage for solving the forces system.
Definition: decoupledibpm.h:90
virtual PetscErrorCode writeForcesASCII()
Write the forces acting on the bodies into an ASCII file.
virtual PetscErrorCode solveForces()
Solve the system for the boundary forces.
PetscErrorCode destroy()
Manually destroy data.
PetscLogStage stageIntegrateForces
Log stage for integrating the Lagrangian forces.
Definition: decoupledibpm.h:93
Vec rhsf
Right-hand side of the forces system.
Definition: decoupledibpm.h:84
~DecoupledIBPMSolver()
Default destructor.
Vec df
Force-increment vector.
Definition: decoupledibpm.h:81
petibm::type::LinSolver fSolver
Linear solver for the Lagrangian forces.
Definition: decoupledibpm.h:63
virtual PetscErrorCode createExtraVectors()
Create additional vectors.
virtual PetscErrorCode assembleRHSForces()
Assemble the RHS vector of the system for the Lagrangian forces.
PetscErrorCode advance()
Advance the solution by one time step.
PetscErrorCode write()
Write solution and solver info to files.
virtual PetscErrorCode assembleRHSVelocity()
Assemble the RHS vector of the velocity system.
virtual PetscErrorCode updateForces()
Update the Lagrangian forces.
Mat EBNH
Left-hand side operator of the system for the forces.
Definition: decoupledibpm.h:72
petibm::type::Solution solution
Data object holding the velocity and pressure fields.
Definition: navierstokes.h:95
petibm::type::LinSolver pSolver
Poisson linear solver.
Definition: navierstokes.h:107
PetscReal nu
Viscous diffusion coefficient.
Definition: navierstokes.h:134
Mat L
Laplacian operator.
Definition: navierstokes.h:137
PetscReal t
Time value.
Definition: navierstokes.h:119
YAML::Node config
YAML configuration settings.
Definition: navierstokes.h:86
petibm::type::Boundary bc
Information about the domain boundaries.
Definition: navierstokes.h:92
virtual PetscErrorCode updatePressure()
virtual PetscErrorCode assembleRHSVelocity()
Assemble the RHS vector of the velocity system.
virtual PetscErrorCode readRestartDataHDF5(const std::string &filePath)
Read data required to restart a simulation from a HDF5 file.
PetscLogStage stageInitialize
Log stage for the initialization phase.
Definition: navierstokes.h:185
Vec rhs1
Right-hand side vector of the velocity system.
Definition: navierstokes.h:170
petibm::type::LinSolver vSolver
Velocity linear solver.
Definition: navierstokes.h:104
PetscReal dt
Time-step size.
Definition: navierstokes.h:113
Mat N
Convective operator (matrix-free).
Definition: navierstokes.h:152
virtual PetscErrorCode assembleRHSPoisson()
Assemble the RHS vector of the Poisson system.
MPI_Comm comm
MPI communicator.
Definition: navierstokes.h:77
virtual PetscErrorCode solvePoisson()
Solve the Poisson system.
virtual PetscErrorCode writeRestartDataHDF5(const std::string &filePath)
Write data required to restart a simulation into a HDF5 file.
petibm::type::TimeIntegration diffCoeffs
Time scheme for the diffusion terms.
Definition: navierstokes.h:101
virtual PetscErrorCode applyDivergenceFreeVelocity()
PetscLogStage stageRHSVelocity
Log stage for assembling the RHS of the velocity system.
Definition: navierstokes.h:188
PetscErrorCode write()
Write solution and solver info to files.
PetscErrorCode init(const MPI_Comm &world, const YAML::Node &node)
Initialize the Navier-Stokes solver.
PetscLogStage stageWrite
Log stage when write the solution fields.
Definition: navierstokes.h:203
PetscLogStage stageUpdate
Log stage for updating field variables.
Definition: navierstokes.h:200
PetscInt ite
Time-step index.
Definition: navierstokes.h:116
petibm::type::Mesh mesh
Structured Cartesian mesh object.
Definition: navierstokes.h:89
virtual PetscErrorCode solveVelocity()
Solve the velocity system.
PetscErrorCode destroy()
Manually destroy data.
virtual PetscErrorCode createPetscViewerASCII(const std::string &filePath, const PetscFileMode &mode, PetscViewer &viewer)
Create an ASCII PetscViewer.
PetscViewer solversViewer
ASCII PetscViewer object to output solvers info.
Definition: navierstokes.h:209
Definition of the class DecoupledIBPMSolver.
Prototype of Delta functions.
PetscErrorCode createBodyPack(const MPI_Comm &comm, const PetscInt &dim, const YAML::Node &node, type::BodyPack &bodies)
Factory function to create a pack of bodies.
Definition: bodypack.cpp:326
PetscErrorCode createLinSolver(const std::string &solverName, const YAML::Node &node, type::LinSolver &solver)
A factory function for creating a LinSolver.
Definition: linsolver.cpp:57
PetscErrorCode createMHead(const type::Mesh &mesh, Mat &MHead)
Create a matrix of cell widths of velocity points, .
PetscErrorCode createBnHead(const Mat &Op, const PetscReal &dt, const PetscReal &coeff, const PetscInt &n, Mat &BnHead)
Create non-normalized matrix of approximated , .
Definition: createbn.cpp:19
PetscErrorCode createDelta(const type::Mesh &mesh, const type::Boundary &bc, const type::BodyPack &bodies, const delta::DeltaKernel &kernel, const PetscInt &kernelSize, Mat &Op)
Create a Delta operator, .
Definition: createdelta.cpp:34
PetscErrorCode createR(const type::Mesh &mesh, Mat &R)
Create a matrix of flux areas, .
std::vector< RealVec1D > RealVec2D
2D std::vector holding PetscReal.
Definition: type.h:142
PetscErrorCode getKernel(const std::string &name, DeltaKernel &kernel, PetscInt &size)
Get the delta kernel and size providing the name.
Definition: delta.cpp:42
std::function< PetscReal(const PetscReal &r, const PetscReal &dr)> DeltaKernel
Typedef to choose the regularized delta kernel to use.
Definition: delta.h:47