xref: /honee/include/navierstokes.h (revision cb8a476cda62cb3d4c49be98bd55cb366864d7e3)
1 // SPDX-FileCopyrightText: Copyright (c) 2017-2024, HONEE contributors.
2 // SPDX-License-Identifier: Apache-2.0 OR BSD-2-Clause
3 #pragma once
4 
5 #include <ceed.h>
6 #include <bc_definition.h>
7 #include <dm-utils.h>
8 #include <honee-file.h>
9 #include <honee.h>
10 #include <log_events.h>
11 #include <mat-ceed.h>
12 #include <petsc-ceed-utils.h>
13 #include <petscts.h>
14 #include <stdbool.h>
15 #include <time.h>
16 
17 #include <nodal_projection.h>
18 
19 #include <petsc_ops.h>
20 #include "../qfunctions/newtonian_types.h"
21 
22 #if PETSC_VERSION_LT(3, 23, 0)
23 #error "PETSc v3.23 or later is required"
24 #endif
25 
26 // -----------------------------------------------------------------------------
27 // Enums
28 // -----------------------------------------------------------------------------
29 
30 // Euler - test cases
31 typedef enum {
32   EULER_TEST_ISENTROPIC_VORTEX = 0,
33   EULER_TEST_1                 = 1,
34   EULER_TEST_2                 = 2,
35   EULER_TEST_3                 = 3,
36   EULER_TEST_4                 = 4,
37   EULER_TEST_5                 = 5,
38 } EulerTestType;
39 static const char *const EulerTestTypes[] = {"ISENTROPIC_VORTEX", "1", "2", "3", "4", "5", "EulerTestType", "EULER_TEST_", NULL};
40 
41 // Test mode type
42 typedef enum {
43   TESTTYPE_NONE           = 0,
44   TESTTYPE_SOLVER         = 1,
45   TESTTYPE_TURB_SPANSTATS = 2,
46   TESTTYPE_DIFF_FILTER    = 3,
47 } TestType;
48 static const char *const TestTypes[] = {"NONE", "SOLVER", "TURB_SPANSTATS", "DIFF_FILTER", "TestType", "TESTTYPE_", NULL};
49 
50 // Subgrid-Stress mode type
51 typedef enum {
52   SGS_MODEL_NONE        = 0,
53   SGS_MODEL_DATA_DRIVEN = 1,
54 } SGSModelType;
55 static const char *const SGSModelTypes[] = {"NONE", "DATA_DRIVEN", "SGSModelType", "SGS_MODEL_", NULL};
56 
57 // Subgrid-Stress mode type
58 typedef enum {
59   SGS_MODEL_DD_FUSED           = 0,
60   SGS_MODEL_DD_SEQENTIAL_CEED  = 1,
61   SGS_MODEL_DD_SEQENTIAL_TORCH = 2,
62 } SGSModelDDImplementation;
63 static const char *const SGSModelDDImplementations[] = {"FUSED", "SEQUENTIAL_CEED", "SEQUENTIAL_TORCH", "SGSModelDDImplementation", "SGS_MODEL_DD_",
64                                                         NULL};
65 
66 // Mesh transformation type
67 typedef enum {
68   MESH_TRANSFORM_NONE      = 0,
69   MESH_TRANSFORM_PLATEMESH = 1,
70 } MeshTransformType;
71 static const char *const MeshTransformTypes[] = {"NONE", "PLATEMESH", "MeshTransformType", "MESH_TRANSFORM_", NULL};
72 
73 // -----------------------------------------------------------------------------
74 // Structs
75 // -----------------------------------------------------------------------------
76 // Structs declarations
77 typedef struct AppCtx_private      *AppCtx;
78 typedef struct Units_private       *Units;
79 typedef struct SimpleBC_private    *SimpleBC;
80 typedef struct Physics_private     *Physics;
81 typedef struct ProblemData_private *ProblemData;
82 
83 // Application context from user command line options
84 struct AppCtx_private {
85   // libCEED arguments
86   char     ceed_resource[PETSC_MAX_PATH_LEN];  // libCEED backend
87   PetscInt degree;
88   PetscInt q_extra;
89   // Solver arguments
90   MatType amat_type;
91   // Post-processing arguments
92   PetscInt  checkpoint_interval;
93   PetscInt  viz_refine;
94   PetscBool use_continue_file;
95   PetscInt  cont_steps;
96   PetscReal cont_time;
97   char      cont_file[PETSC_MAX_PATH_LEN];
98   char      output_dir[PETSC_MAX_PATH_LEN];
99   PetscBool add_stepnum2bin;
100   PetscBool checkpoint_vtk;
101   // Problem type arguments
102   PetscFunctionList problems;
103   char              problem_name[PETSC_MAX_PATH_LEN];
104   // Test mode arguments
105   TestType    test_type;
106   PetscScalar test_tol;
107   char        test_file_path[PETSC_MAX_PATH_LEN];
108   // Wall forces
109   struct {
110     PetscInt          num_wall;
111     PetscInt         *walls;
112     PetscViewer       viewer;
113     PetscViewerFormat viewer_format;
114     PetscBool         header_written;
115   } wall_forces;
116   // Subgrid Stress Model
117   SGSModelType sgs_model_type;
118   PetscBool    sgs_train_enable;
119 
120   MeshTransformType mesh_transform_type;
121   // Divergence of Diffusive Flux Projection
122   DivDiffFluxProjectionMethod divFdiffproj_method;
123 
124   PetscInt check_step_interval;
125 };
126 
127 typedef struct DivDiffFluxProjectionData_private *DivDiffFluxProjectionData;
128 
129 struct DivDiffFluxProjectionData_private {
130   PetscInt                    num_diff_flux_comps;
131   DivDiffFluxProjectionMethod method;
132   NodalProjectionData         projection;
133 
134   // CeedOperator Objects
135   CeedElemRestriction elem_restr_div_diff_flux;
136   CeedBasis           basis_div_diff_flux;
137   CeedEvalMode        eval_mode_div_diff_flux;
138   CeedVector          div_diff_flux_ceed;
139 
140   // Problem specific setup functions
141   PetscErrorCode (*CreateRHSOperator_Direct)(Honee, DivDiffFluxProjectionData, CeedOperator *);
142   PetscErrorCode (*CreateRHSOperator_Indirect)(Honee, DivDiffFluxProjectionData, CeedOperator *);
143 
144   // Only used for direct method:
145   Vec          DivDiffFlux_loc;
146   PetscMemType DivDiffFlux_memtype;
147   PetscBool    ceed_vec_has_array;
148 
149   // Only used for indirect method:
150   OperatorApplyContext calc_div_diff_flux;
151 };
152 
153 typedef struct {
154   DM                    dm_filter;
155   PetscInt              num_filtered_fields;
156   CeedInt              *num_field_components;
157   PetscInt              field_prim_state, field_velo_prod;
158   OperatorApplyContext  op_rhs_ctx;
159   KSP                   ksp;
160   PetscObjectState      X_loc_state;
161   PetscBool             do_mms_test;
162   CeedContextFieldLabel filter_width_scaling_label;
163 } *DiffFilterData;
164 
165 typedef struct {
166   void    *client;
167   char     rank_id_name[16];
168   PetscInt collocated_database_num_ranks;
169 } *SmartSimData;
170 
171 typedef struct _HoneeOps *HoneeOps;
172 struct _HoneeOps {};
173 
174 PetscErrorCode HoneeInit(MPI_Comm comm, Honee *honee);
175 PetscErrorCode HoneeDestroy(Honee *honee);
176 
177 // PETSc user data
178 struct Honee_private {
179   PETSCHEADER(struct _HoneeOps);
180   MPI_Comm                  comm;
181   DM                        dm;
182   DM                        dm_viz;
183   Mat                       interp_viz;
184   Ceed                      ceed;
185   Units                     units;
186   Vec                       Q_loc, Q_dot_loc;
187   Physics                   phys;
188   AppCtx                    app_ctx;
189   CeedVector                q_ceed, q_dot_ceed, g_ceed, x_ceed;
190   CeedOperator              op_ifunction;
191   Mat                       mat_ijacobian;
192   KSP                       mass_ksp;
193   OperatorApplyContext      op_rhs_ctx, op_strong_bc_ctx;
194   CeedScalar                time_bc_set;
195   SmartSimData              smartsim;
196   DivDiffFluxProjectionData diff_flux_proj;
197 
198   ProblemData problem_data;
199 
200   // old CeedData
201   CeedVector           x_coord;
202   CeedBasis            basis_x, basis_q;
203   CeedElemRestriction  elem_restr_x, elem_restr_q;
204   OperatorApplyContext op_ics_ctx;
205 
206   PetscBool set_poststep;
207   time_t    start_time;
208   time_t    max_wall_time;
209   PetscInt  max_wall_time_interval;
210 };
211 
212 // Units
213 struct Units_private {
214   // fundamental units
215   PetscScalar meter;
216   PetscScalar kilogram;
217   PetscScalar second;
218   PetscScalar Kelvin;
219   // derived units
220   PetscScalar Pascal;
221   PetscScalar J_per_kg_K;
222   PetscScalar m_per_squared_s;
223   PetscScalar W_per_m_K;
224   PetscScalar Joule;
225 };
226 
227 // Struct that contains all enums and structs used for the physics of all problems
228 struct Physics_private {
229   PetscBool             implicit;
230   StateVariable         state_var;
231   CeedContextFieldLabel solution_time_label;
232   CeedContextFieldLabel stg_solution_time_label;
233   CeedContextFieldLabel timestep_size_label;
234   CeedContextFieldLabel ics_time_label;
235 };
236 
237 typedef struct {
238   Honee                honee;
239   CeedInt              num_comps_jac_data;
240   CeedQFunctionContext qfctx;
241   void                *ctx;
242   PetscCtxDestroyFn   *DestroyCtx;
243 } *HoneeBCStruct;
244 
245 PetscErrorCode BoundaryConditionSetUp(Honee honee, ProblemData problem, AppCtx app_ctx);
246 PetscErrorCode HoneeBCDestroy(void **ctx);
247 PetscErrorCode HoneeBCCreateIFunctionQF(BCDefinition bc_def, CeedQFunctionUser qf_func_ptr, const char *qf_loc, CeedQFunctionContext qfctx,
248                                         CeedQFunction *qf_ifunc);
249 PetscErrorCode HoneeBCCreateIJacobianQF(BCDefinition bc_def, CeedQFunctionUser qf_func_ptr, const char *qf_loc, CeedQFunctionContext qfctx,
250                                         CeedQFunction *qf_ijac);
251 PetscErrorCode HoneeBCAddIFunctionOp(BCDefinition bc_def, DMLabel domain_label, PetscInt label_value, CeedQFunction qf_ifunc, CeedOperator op_ifunc,
252                                      CeedOperator *sub_op_ifunc);
253 PetscErrorCode HoneeBCAddIJacobianOp(BCDefinition bc_def, CeedOperator sub_op_ifunc, DMLabel domain_label, PetscInt label_value,
254                                      CeedQFunction qf_ijac, CeedOperator op_ijac);
255 
256 typedef struct {
257   CeedQFunctionUser    qf_func_ptr;  // !< QFunction function pointer
258   const char          *qf_loc;       // !< Absolute path to QFunction source file
259   CeedQFunctionContext qfctx;        // !< QFunctionContext to attach to QFunction
260 } ProblemQFunctionSpec;
261 
262 // Problem specific data
263 struct ProblemData_private {
264   CeedInt              num_comps_jac_data;
265   ProblemQFunctionSpec ics, apply_vol_rhs, apply_vol_ifunction, apply_vol_ijacobian;
266   bool                 compute_exact_solution_error;
267   PetscBool            set_bc_from_ics, use_strong_bc_ceed;
268   PetscCount           num_bc_defs;
269   BCDefinition        *bc_defs;
270   PetscErrorCode (*print_info)(Honee, ProblemData, AppCtx);
271   PetscErrorCode (*create_mass_operator)(Honee, CeedOperator *);
272 };
273 
274 extern int FreeContextPetsc(void *);
275 
276 // -----------------------------------------------------------------------------
277 // Set up problems
278 // -----------------------------------------------------------------------------
279 // Set up function for each problem
280 extern PetscErrorCode NS_TAYLOR_GREEN(ProblemData problem, DM dm, void *ctx);
281 extern PetscErrorCode NS_GAUSSIAN_WAVE(ProblemData problem, DM dm, void *ctx);
282 extern PetscErrorCode NS_CHANNEL(ProblemData problem, DM dm, void *ctx);
283 extern PetscErrorCode NS_BLASIUS(ProblemData problem, DM dm, void *ctx);
284 extern PetscErrorCode NS_NEWTONIAN_IG(ProblemData problem, DM dm, void *ctx);
285 extern PetscErrorCode NS_DENSITY_CURRENT(ProblemData problem, DM dm, void *ctx);
286 extern PetscErrorCode NS_EULER_VORTEX(ProblemData problem, DM dm, void *ctx);
287 extern PetscErrorCode NS_SHOCKTUBE(ProblemData problem, DM dm, void *ctx);
288 extern PetscErrorCode NS_ADVECTION(ProblemData problem, DM dm, void *ctx);
289 
290 // Print function for each problem
291 extern PetscErrorCode PRINT_NEWTONIAN(Honee honee, ProblemData problem, AppCtx app_ctx);
292 extern PetscErrorCode PRINT_EULER_VORTEX(Honee honee, ProblemData problem, AppCtx app_ctx);
293 extern PetscErrorCode PRINT_SHOCKTUBE(Honee honee, ProblemData problem, AppCtx app_ctx);
294 extern PetscErrorCode PRINT_ADVECTION(Honee honee, ProblemData problem, AppCtx app_ctx);
295 extern PetscErrorCode PRINT_ADVECTION2D(Honee honee, ProblemData problem, AppCtx app_ctx);
296 
297 PetscErrorCode PrintRunInfo(Honee honee, Physics phys_ctx, ProblemData problem, TS ts);
298 
299 // -----------------------------------------------------------------------------
300 // libCEED functions
301 // -----------------------------------------------------------------------------
302 PetscErrorCode SetupLibceed(Ceed ceed, DM dm, Honee honee, AppCtx app_ctx, ProblemData problem);
303 
304 PetscErrorCode QDataGet(Ceed ceed, DM dm, DMLabel domain_label, PetscInt label_value, CeedElemRestriction elem_restr_x, CeedBasis basis_x,
305                         CeedVector x_coord, CeedElemRestriction *elem_restr_qd, CeedVector *q_data, CeedInt *q_data_size);
306 PetscErrorCode QDataGetNumComponents(DM dm, CeedInt *q_data_size);
307 PetscErrorCode QDataBoundaryGet(Ceed ceed, DM dm, DMLabel domain_label, PetscInt label_value, CeedElemRestriction elem_restr_x, CeedBasis basis_x,
308                                 CeedVector x_coord, CeedElemRestriction *elem_restr_qd, CeedVector *q_data, CeedInt *q_data_size);
309 PetscErrorCode QDataBoundaryGetNumComponents(DM dm, CeedInt *q_data_size);
310 PetscErrorCode QDataBoundaryGradientGetNumComponents(DM dm, CeedInt *q_data_size);
311 PetscErrorCode QDataBoundaryGradientGet(Ceed ceed, DM dm, DMLabel domain_label, PetscInt label_value, CeedVector x_coord,
312                                         CeedElemRestriction *elem_restr_qd, CeedVector *q_data, CeedInt *q_data_size);
313 PetscErrorCode QDataClearStoredData();
314 // -----------------------------------------------------------------------------
315 // Time-stepping functions
316 // -----------------------------------------------------------------------------
317 PetscErrorCode RHS_NS(TS ts, PetscReal t, Vec Q, Vec G, void *user_data);
318 PetscErrorCode IFunction_NS(TS ts, PetscReal t, Vec Q, Vec Q_dot, Vec G, void *user_data);
319 PetscErrorCode TSMonitor_NS(TS ts, PetscInt step_no, PetscReal time, Vec Q, void *ctx);
320 PetscErrorCode TSSolve_NS(DM dm, Honee honee, AppCtx app_ctx, Physics phys, ProblemData problem, Vec Q, PetscScalar *f_time, TS *ts);
321 PetscErrorCode UpdateBoundaryValues(Honee honee, Vec Q_loc, PetscReal t);
322 
323 // -----------------------------------------------------------------------------
324 // Setup DM
325 // -----------------------------------------------------------------------------
326 PetscErrorCode CreateDM(MPI_Comm comm, ProblemData problem, MatType, VecType, DM *dm);
327 PetscErrorCode SetUpDM(DM dm, ProblemData problem, PetscInt degree, PetscInt q_extra, Physics phys);
328 PetscErrorCode VizRefineDM(DM dm, Honee honee, ProblemData problem, Physics phys);
329 
330 PetscErrorCode DMSetupByOrderBegin_FEM(PetscBool setup_faces, PetscBool setup_coords, PetscInt degree, PetscInt coord_order, PetscInt q_extra,
331                                        PetscInt num_fields, const PetscInt *field_sizes, DM dm);
332 PetscErrorCode DMSetupByOrderEnd_FEM(PetscBool setup_coords, DM dm);
333 PetscErrorCode DMSetupByOrder_FEM(PetscBool setup_faces, PetscBool setup_coords, PetscInt degree, PetscInt coord_order, PetscInt q_extra,
334                                   PetscInt num_fields, const PetscInt *field_sizes, DM dm);
335 
336 // -----------------------------------------------------------------------------
337 // Process command line options
338 // -----------------------------------------------------------------------------
339 PetscErrorCode ProcessCommandLineOptions(Honee honee);
340 PetscErrorCode HoneeOptionsSetValueDefault(PetscOptions options, const char name[], const char value[]);
341 
342 // -----------------------------------------------------------------------------
343 // Miscellaneous utility functions
344 // -----------------------------------------------------------------------------
345 PetscErrorCode GetInverseMultiplicity(Ceed ceed, DM dm, DMLabel domain_label, PetscInt label_value, PetscInt height, PetscInt dm_field,
346                                       PetscBool get_global_multiplicity, CeedElemRestriction *elem_restr_inv_multiplicity,
347                                       CeedVector *inv_multiplicity);
348 PetscErrorCode ICs_FixMultiplicity(DM dm, Honee honee, Vec Q_loc, Vec Q, CeedScalar time);
349 
350 PetscErrorCode DMPlexInsertBoundaryValues_FromICs(DM dm, PetscBool insert_essential, Vec Q_loc, PetscReal time, Vec face_geom_FVM, Vec cell_geom_FVM,
351                                                   Vec grad_FVM);
352 
353 PetscErrorCode RegressionTest(AppCtx app_ctx, Vec Q);
354 PetscErrorCode PrintError(DM dm, Honee honee, Vec Q, PetscScalar final_time);
355 PetscErrorCode PostProcess(TS ts, DM dm, ProblemData problem, Honee honee, Vec Q, PetscScalar final_time);
356 PetscErrorCode SetBCsFromICs(DM dm, Vec Q, Vec Q_loc);
357 PetscErrorCode HoneeMassQFunctionCreate(Ceed ceed, CeedInt N, CeedInt q_data_size, CeedQFunction *qf);
358 PetscErrorCode HoneeCalculateDomainSize(Honee honee, PetscScalar *volume);
359 
360 // -----------------------------------------------------------------------------
361 // Turbulence Statistics Collection Functions
362 // -----------------------------------------------------------------------------
363 PetscErrorCode SpanwiseStatisticsSetup_Turbulence(TS ts, PetscViewerAndFormat *ctx);
364 PetscErrorCode TSMonitor_TurbulenceSpanwiseStatistics(TS ts, PetscInt steps, PetscReal solution_time, Vec Q, PetscViewerAndFormat *ctx);
365 
366 // -----------------------------------------------------------------------------
367 // Data-Driven Subgrid Stress (DD-SGS) Modeling Functions
368 // -----------------------------------------------------------------------------
369 PetscErrorCode SgsDDSetup(Ceed ceed, Honee honee, ProblemData problem);
370 PetscErrorCode SgsDDApplyIFunction(Honee honee, const Vec Q_loc, Vec G_loc);
371 PetscErrorCode VelocityGradientProjectionSetup(Ceed ceed, Honee honee, ProblemData problem, StateVariable state_var_input,
372                                                CeedElemRestriction elem_restr_input, CeedBasis basis_input, NodalProjectionData *pgrad_velo_proj);
373 PetscErrorCode VelocityGradientProjectionApply(NodalProjectionData grad_velo_proj, Vec Q_loc, Vec VelocityGradient);
374 PetscErrorCode GridAnisotropyTensorProjectionSetupApply(Ceed ceed, Honee honee, CeedElemRestriction *elem_restr_grid_aniso,
375                                                         CeedVector *grid_aniso_vector);
376 PetscErrorCode GridAnisotropyTensorCalculateCollocatedVector(Ceed ceed, Honee honee, CeedElemRestriction *elem_restr_grid_aniso,
377                                                              CeedVector *aniso_colloc_ceed, PetscInt *num_comp_aniso);
378 
379 // -----------------------------------------------------------------------------
380 // Boundary Condition Related Functions
381 // -----------------------------------------------------------------------------
382 PetscErrorCode SetupStrongBC_Ceed(Ceed ceed, DM dm, Honee honee, ProblemData problem);
383 PetscErrorCode FreestreamBCSetup(BCDefinition bc_def, ProblemData problem, DM dm, void *ctx, NewtonianIdealGasContext newtonian_ig_ctx,
384                                  const StatePrimitive *reference);
385 PetscErrorCode OutflowBCSetup(BCDefinition bc_def, ProblemData problem, DM dm, void *ctx, NewtonianIdealGasContext newtonian_ig_ctx,
386                               const StatePrimitive *reference);
387 PetscErrorCode SlipBCSetup(BCDefinition bc_def, ProblemData problem, DM dm, void *ctx, CeedQFunctionContext newtonian_ig_qfctx);
388 
389 // -----------------------------------------------------------------------------
390 // Differential Filtering Functions
391 // -----------------------------------------------------------------------------
392 PetscErrorCode DifferentialFilterSetup(Honee honee, DiffFilterData *diff_filter);
393 PetscErrorCode DifferentialFilterDataDestroy(DiffFilterData *diff_filter);
394 PetscErrorCode TSMonitor_DifferentialFilterSetup(TS ts, PetscViewerAndFormat *ctx);
395 PetscErrorCode TSMonitor_DifferentialFilter(TS ts, PetscInt steps, PetscReal solution_time, Vec Q, PetscViewerAndFormat *ctx);
396 PetscErrorCode DifferentialFilterApply(Honee honee, DiffFilterData diff_filter, const PetscReal solution_time, const Vec Q, Vec Filtered_Solution);
397 PetscErrorCode DifferentialFilterMmsICSetup(ProblemData problem);
398 
399 // -----------------------------------------------------------------------------
400 // SGS Data-Driven Training via SmartSim
401 // -----------------------------------------------------------------------------
402 PetscErrorCode SmartSimSetup(Honee honee);
403 PetscErrorCode SmartSimDataDestroy(SmartSimData smartsim);
404 PetscErrorCode SGS_DD_TrainingSetup(Ceed ceed, Honee honee, ProblemData problem);
405 PetscErrorCode TSMonitor_SGS_DD_Training(TS ts, PetscInt step_num, PetscReal solution_time, Vec Q, void *ctx);
406 PetscErrorCode TSPostStep_SGS_DD_Training(TS ts);
407 
408 // -----------------------------------------------------------------------------
409 // Divergence of Diffusive Flux Projection
410 // -----------------------------------------------------------------------------
411 PetscErrorCode DivDiffFluxProjectionCreate(Honee honee, PetscInt num_diff_flux_comps, DivDiffFluxProjectionData *pdiff_flux_proj);
412 PetscErrorCode DivDiffFluxProjectionGetOperatorFieldData(DivDiffFluxProjectionData diff_flux_proj, CeedElemRestriction *elem_restr, CeedBasis *basis,
413                                                          CeedVector *vector, CeedEvalMode *eval_mode);
414 PetscErrorCode DivDiffFluxProjectionSetup(Honee honee, DivDiffFluxProjectionData diff_flux_proj);
415 PetscErrorCode DivDiffFluxProjectionApply(DivDiffFluxProjectionData diff_flux_proj, Vec Q_loc);
416 PetscErrorCode DivDiffFluxProjectionDataDestroy(DivDiffFluxProjectionData diff_flux_proj);
417 
418 PetscErrorCode SetupMontiorTotalKineticEnergy(TS ts, PetscViewerAndFormat *ctx);
419 PetscErrorCode TSMonitor_TotalKineticEnergy(TS ts, PetscInt steps, PetscReal solution_time, Vec Q, PetscViewerAndFormat *ctx);
420 
421 PetscErrorCode SetupMontiorCfl(TS ts, PetscViewerAndFormat *ctx);
422 PetscErrorCode TSMonitor_Cfl(TS ts, PetscInt step, PetscReal solution_time, Vec Q, PetscViewerAndFormat *ctx);
423 
424 PetscErrorCode KSPPostSolve_Honee(KSP ksp, Vec rhs, Vec x, void *ctx);
425