Actual source code: adintr_sinh.c

petsc-3.3-p7 2013-05-11
  1: /*
  2:   macro expansion:
  3:   function_driver -> adintr_sinh
  4:   exception number -> ADINTR_SINH
  5:   exceptional code -> 

  7:   */

  9: #include <stdarg.h>
 10: #include <adintrinsics.h>
 11: #include <knr-compat.h>
 12: #if defined(__cplusplus)
 13: extern "C" {
 14: #endif

 16: /* #include "report-once.h" */
 17: void reportonce_accumulate Proto((int,int,int));


 20: void
 21: adintr_sinh (int deriv_order, int file_number, int line_number,
 22:                  double*fx,...)
 23: {
 24:      /* Hack to make assignments to (*fxx) et alia OK, regardless */
 25:      double scratch;
 26:      double *fxx = &scratch;

 28:      const int exception = ADINTR_SINH;

 30:      va_list argptr;
 31:      va_start(argptr,fx);

 33:      if (deriv_order == 2)
 34:      {
 35:           fxx = va_arg(argptr, double *);
 36:      }

 38:      /* Here is where exceptional partials should be set. */
 39:      *fxx = ADIntr_Partials[ADINTR_SINH][ADINTR_FXX];


 42:      /* Here is where we perform the action appropriate to the current mode. */
 43:      if (ADIntr_Mode == ADINTR_REPORTONCE)
 44:      {
 45:           reportonce_accumulate(file_number, line_number, exception);
 46:      }
 47: 
 48:      va_end(argptr);
 49: }
 50: #if defined(__cplusplus)
 51: }
 52: #endif