Free cookie consent management tool by TermsFeed Policy Generator

source: branches/2925_AutoDiffForDynamicalModels/HeuristicLab.Problems.DynamicalSystemsModelling/3.3/sundials/include/sunlinsol/sunlinsol_band.h @ 16222

Last change on this file since 16222 was 16222, checked in by gkronber, 6 years ago

#2925:

  • added comments about parameter identification for differential equation models
  • added source code of cvodes library (part of sundials) which provides functionality to calculate gradients for the parameters of partial differential equation models efficiently using the 'adjoint state method'.
  • added compiled version of cvodes
File size: 3.6 KB
Line 
1/*
2 * -----------------------------------------------------------------
3 * Programmer(s): Daniel Reynolds, Ashley Crawford @ SMU
4 * -----------------------------------------------------------------
5 * LLNS/SMU Copyright Start
6 * Copyright (c) 2017, Southern Methodist University and
7 * Lawrence Livermore National Security
8 *
9 * This work was performed under the auspices of the U.S. Department
10 * of Energy by Southern Methodist University and Lawrence Livermore
11 * National Laboratory under Contract DE-AC52-07NA27344.
12 * Produced at Southern Methodist University and the Lawrence
13 * Livermore National Laboratory.
14 *
15 * All rights reserved.
16 * For details, see the LICENSE file.
17 * LLNS/SMU Copyright End
18 * -----------------------------------------------------------------
19 * This is the header file for the band implementation of the
20 * SUNLINSOL module.
21 *
22 * Part I contains declarations specific to the band implementation
23 * of the supplied SUNLINSOL module.
24 *
25 * Part II contains the prototype for the constructor
26 * SUNBandLinearSolver as well as implementation-specific prototypes
27 * for various useful solver operations.
28 *
29 * Notes:
30 *
31 *   - The definition of the generic SUNLinearSolver structure can
32 *     be found in the header file sundials_linearsolver.h.
33 *
34 * -----------------------------------------------------------------
35 */
36
37#ifndef _SUNLINSOL_BAND_H
38#define _SUNLINSOL_BAND_H
39
40#include <sundials/sundials_linearsolver.h>
41#include <sundials/sundials_matrix.h>
42#include <sundials/sundials_nvector.h>
43#include <sundials/sundials_band.h>
44#include <sunmatrix/sunmatrix_band.h>
45
46#ifdef __cplusplus  /* wrapper to enable C++ usage */
47extern "C" {
48#endif
49
50/*
51 * -----------------------------------------------------------------
52 * PART I: Band implementation of SUNLinearSolver
53 *
54 * The band implementation of the SUNLinearSolver 'content'
55 * structure contains:
56 *     N -- size of the linear system
57 *     pivots -- index array for partial pivoting in LU factorization
58 *     last_flag -- last error return flag from internal setup/solve
59 * -----------------------------------------------------------------
60 */
61 
62struct _SUNLinearSolverContent_Band {
63  sunindextype  N;
64  sunindextype *pivots;
65  long int last_flag;
66};
67
68typedef struct _SUNLinearSolverContent_Band *SUNLinearSolverContent_Band;
69
70 
71/*
72 * -----------------------------------------------------------------
73 * PART II: functions exported by sunlinsol_band
74 *
75 * CONSTRUCTOR:
76 *    SUNBandLinearSolver creates and allocates memory for a banded
77 *    matrix solver
78 * -----------------------------------------------------------------
79 */
80
81SUNDIALS_EXPORT SUNLinearSolver SUNBandLinearSolver(N_Vector y,
82                                                    SUNMatrix A);
83
84/*
85 * -----------------------------------------------------------------
86 * band implementations of various useful linear solver operations
87 * -----------------------------------------------------------------
88 */
89
90SUNDIALS_EXPORT SUNLinearSolver_Type SUNLinSolGetType_Band(SUNLinearSolver S);
91SUNDIALS_EXPORT int SUNLinSolInitialize_Band(SUNLinearSolver S);
92SUNDIALS_EXPORT int SUNLinSolSetup_Band(SUNLinearSolver S, SUNMatrix A);
93SUNDIALS_EXPORT int SUNLinSolSolve_Band(SUNLinearSolver S, SUNMatrix A,
94                                        N_Vector x, N_Vector b, realtype tol);
95SUNDIALS_EXPORT long int SUNLinSolLastFlag_Band(SUNLinearSolver S);
96SUNDIALS_EXPORT int SUNLinSolSpace_Band(SUNLinearSolver S,
97                                        long int *lenrwLS,
98                                        long int *leniwLS);
99SUNDIALS_EXPORT int SUNLinSolFree_Band(SUNLinearSolver S);
100 
101#ifdef __cplusplus
102}
103#endif
104
105#endif
Note: See TracBrowser for help on using the repository browser.