ADOL-C: Automatic Differentiation in C/C++ 2.7.3
Loading...
Searching...
No Matches
psdrivers.h
Go to the documentation of this file.
1/*----------------------------------------------------------------------------
2 ADOL-C -- Automatic Differentiation by Overloading in C++
3 File: drivers/psdrivers.h
4 Revision: $Id$
5 Contents: Easy to use drivers for piecewise smooth functions
6 (with C and C++ callable interfaces including Fortran
7 callable versions).
8
9 Copyright (c) Andrea Walther, Sabrina Fiege
10
11 This file is part of ADOL-C. This software is provided as open source.
12 Any use, reproduction, or distribution of the software constitutes
13 recipient's acceptance of the terms of the accompanying license file.
14
15----------------------------------------------------------------------------*/
16#if !defined(ADOLC_DRIVERS_PSDRIVERS_H)
17#define ADOLC_DRIVERS_PSDRIVERS_H 1
18
19#include <adolc/adolcexport.h>
21#include <adolc/interfaces.h>
23#include <span>
24
25namespace ADOLC {
34enum class UpdateConsts {
35 True,
36 False,
37};
38
51template <UpdateConsts uc = UpdateConsts::True>
52ADOLC_API int abs_normal(short tapeId, std::span<const double> x,
53 AbsNormalForm &anf);
54
56template <>
58 std::span<const double> x,
59 AbsNormalForm &anf);
61template <>
63 std::span<const double> x,
64 AbsNormalForm &anf);
65
66} // namespace ADOLC
68
69/****************************************************************************/
70/* DRIVERS FOR PS FUNCTIONS */
71
72/*--------------------------------------------------------------------------*/
73/* directional_active_gradient_ */
74/* */
76 double *, double **, short *);
77/*--------------------------------------------------------------------------*/
78/* directional_active_gradient */
79/* */
80ADOLC_API int
81directional_active_gradient(short tag, /* trace identifier */
82 int n, /* number of independents */
83 const double *x, /* value of independents */
84 const double *d, /* direction */
85 double *g, /* directional active gradient */
86 short *sigma_g /* sigma of g */
87);
88
89/*--------------------------------------------------------------------------*/
90/* abs-normal form */
91ADOLC_API fint abs_normal_(fint *ftag, fint *fdepen, fint *findep, fint *fswchk,
92 fdouble *fx, fdouble *fy, fdouble *fz, fdouble *fcz,
93 fdouble *fcy, fdouble *fJ, fdouble *fY, fdouble *fZ,
94 fdouble *fL);
155ADOLC_API int abs_normal(short tag, int m, int n, int swchk, const double *x,
156 double *y, double *z, double **Y, double **J,
157 double **Z, double **L);
158
160
161/****************************************************************************/
162
163#endif
#define ADOLC_API
Definition adolcexport.h:16
#define BEGIN_C_DECLS
Definition common.h:115
#define END_C_DECLS
Definition common.h:116
Definition adtl_indo.h:46
ADOLC_API int abs_normal(short tapeId, std::span< const double > x, AbsNormalForm &anf)
Compute the abs-normal form of a taped function at a point.
UpdateConsts
Compile-time selector for constant-term updates in ADOLC::abs_normal.
Definition psdrivers.h:34
ADOLC_API int abs_normal< UpdateConsts::False >(short tapeId, std::span< const double > x, AbsNormalForm &anf)
Specialization that leaves cy and cz unchanged.
ADOLC_API int abs_normal< UpdateConsts::True >(short tapeId, std::span< const double > x, AbsNormalForm &anf)
Specialization that updates cy and cz after evaluation.
BEGIN_C_DECLS ADOLC_API fint directional_active_gradient_(fint, fint, double *, double *, double *, double **, short *)
ADOLC_API int abs_normal(short tag, int m, int n, int swchk, const double *x, double *y, double *z, double **Y, double **J, double **Z, double **L)
Compute the ABS-normal form of a taped function.
ADOLC_API int directional_active_gradient(short tag, int n, const double *x, const double *d, double *g, short *sigma_g)
ADOLC_API fint abs_normal_(fint *ftag, fint *fdepen, fint *findep, fint *fswchk, fdouble *fx, fdouble *fy, fdouble *fz, fdouble *fcz, fdouble *fcy, fdouble *fJ, fdouble *fY, fdouble *fZ, fdouble *fL)
Dense abs-normal form container backed by contiguous storage.
Definition absnormalform.h:39
#define fint
Definition usrparms.h:38
#define fdouble
Definition usrparms.h:39