Free cookie consent management tool by TermsFeed Policy Generator

source: branches/2925_AutoDiffForDynamicalModels/HeuristicLab.Problems.DynamicalSystemsModelling/3.3/sundials/include/sunlinsol/sunlinsol_dense.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.9 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 dense implementation of the
20 * SUNLINSOL module.
21 *
22 * Part I contains declarations specific to the dense implementation
23 * of the supplied SUNLINSOL module.
24 *
25 * Part II contains the prototype for the constructor
26 * SUNDenseLinearSolver as well as implementation-specific
27 * prototypes for various useful matrix 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 *   - The definition of the type 'realtype' can be found in the
35 *     header file sundials_types.h, and it may be changed (at the
36 *     configuration stage) according to the user's needs.
37 *     The sundials_types.h file also contains the definition
38 *     for the type 'booleantype' and 'indextype'.
39 *
40 * -----------------------------------------------------------------
41 */
42
43#ifndef _SUNLINSOL_DENSE_H
44#define _SUNLINSOL_DENSE_H
45
46#include <sundials/sundials_linearsolver.h>
47#include <sundials/sundials_matrix.h>
48#include <sundials/sundials_nvector.h>
49#include <sundials/sundials_dense.h>
50#include <sunmatrix/sunmatrix_dense.h>
51
52#ifdef __cplusplus  /* wrapper to enable C++ usage */
53extern "C" {
54#endif
55
56/*
57 * -----------------------------------------------------------------
58 * PART I: Dense implementation of SUNLinearSolver
59 *
60 * The dense implementation of the SUNLinearSolver 'content'
61 * structure contains:
62 *       N -- size of the linear system
63 *   pivots -- index array for partial pivoting in LU factorization
64 *       last_flag -- last error return flag from internal setup/solve
65 * -----------------------------------------------------------------
66 */
67 
68struct _SUNLinearSolverContent_Dense {
69  sunindextype N;
70  sunindextype *pivots;
71  long int last_flag;
72};
73
74typedef struct _SUNLinearSolverContent_Dense *SUNLinearSolverContent_Dense;
75
76/*
77 * -----------------------------------------------------------------
78 * PART II: functions exported by sunlinsol_dense
79 *
80 * CONSTRUCTORS:
81 *    SUNDenseLinearSolver creates and allocates memory for a
82 *   dense matrix solver
83 * -----------------------------------------------------------------
84 */
85
86SUNDIALS_EXPORT SUNLinearSolver SUNDenseLinearSolver(N_Vector y,
87                                                     SUNMatrix A);
88
89/*
90 * -----------------------------------------------------------------
91 * dense implementations of various useful linear solver operations
92 * -----------------------------------------------------------------
93 */
94
95SUNDIALS_EXPORT SUNLinearSolver_Type SUNLinSolGetType_Dense(SUNLinearSolver S);
96SUNDIALS_EXPORT int SUNLinSolInitialize_Dense(SUNLinearSolver S);
97SUNDIALS_EXPORT int SUNLinSolSetup_Dense(SUNLinearSolver S, SUNMatrix A);
98SUNDIALS_EXPORT int SUNLinSolSolve_Dense(SUNLinearSolver S, SUNMatrix A,
99                                         N_Vector x, N_Vector b, realtype tol);
100SUNDIALS_EXPORT long int SUNLinSolLastFlag_Dense(SUNLinearSolver S);
101SUNDIALS_EXPORT int SUNLinSolSpace_Dense(SUNLinearSolver S,
102                                         long int *lenrwLS,
103                                         long int *leniwLS);
104SUNDIALS_EXPORT int SUNLinSolFree_Dense(SUNLinearSolver S);
105 
106#ifdef __cplusplus
107}
108#endif
109
110#endif
111
Note: See TracBrowser for help on using the repository browser.