-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_sunlinsol.h
More file actions
61 lines (55 loc) · 2.42 KB
/
Copy pathtest_sunlinsol.h
File metadata and controls
61 lines (55 loc) · 2.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/*
* -----------------------------------------------------------------
* Programmer(s): Daniel R. Reynolds @ SMU
* -----------------------------------------------------------------
* SUNDIALS Copyright Start
* Copyright (c) 2002-2025, Lawrence Livermore National Security
* and Southern Methodist University.
* All rights reserved.
*
* See the top-level LICENSE and NOTICE files for details.
*
* SPDX-License-Identifier: BSD-3-Clause
* SUNDIALS Copyright End
* -----------------------------------------------------------------
* This is the header file contains the prototypes for functions to
* test SUNLinearSolver module implementations.
* -----------------------------------------------------------------
*/
#include <math.h>
#include <sundials/sundials_core.h>
/* define constants */
#define ZERO SUN_RCONST(0.0)
#define ONE SUN_RCONST(1.0)
#ifdef __cplusplus /* wrapper to enable C++ usage */
extern "C" {
#endif
/* Forward declarations for implementation specific utility functions */
int check_vector(N_Vector expected, N_Vector computed, sunrealtype tol);
void sync_device(void);
/* Test function declarations */
int Test_SUNLinSolGetType(SUNLinearSolver S, SUNLinearSolver_Type suntype,
int myid);
int Test_SUNLinSolGetID(SUNLinearSolver S, SUNLinearSolver_ID sunid, int myid);
int Test_SUNLinSolLastFlag(SUNLinearSolver S, int myid);
int Test_SUNLinSolSpace(SUNLinearSolver S, int myid);
int Test_SUNLinSolNumIters(SUNLinearSolver S, int myid);
int Test_SUNLinSolResNorm(SUNLinearSolver S, int myid);
int Test_SUNLinSolResid(SUNLinearSolver S, int myid);
int Test_SUNLinSolSetATimes(SUNLinearSolver S, void* ATdata, SUNATimesFn ATimes,
int myid);
int Test_SUNLinSolSetPreconditioner(SUNLinearSolver S, void* Pdata,
SUNPSetupFn PSetup, SUNPSolveFn PSolve,
int myid);
int Test_SUNLinSolSetScalingVectors(SUNLinearSolver S, N_Vector s1, N_Vector s2,
int myid);
int Test_SUNLinSolSetZeroGuess(SUNLinearSolver S, int myid);
int Test_SUNLinSolInitialize(SUNLinearSolver S, int myid);
int Test_SUNLinSolSetup(SUNLinearSolver S, SUNMatrix A, int myid);
int Test_SUNLinSolSolve(SUNLinearSolver S, SUNMatrix A, N_Vector x, N_Vector b,
sunrealtype tol, sunbooleantype zeroguess, int myid);
/* Timing function */
void SetTiming(int onoff);
#ifdef __cplusplus
}
#endif