METHOD
srmhd.h File Reference
#include "model.h"
Include dependency graph for srmhd.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  SRMHD
 
struct  Args
 
struct  Failed
 

Functions

int residual (void *p, int n, const double *x, double *fvec, int iflag)
 

Function Documentation

◆ residual()

int residual ( void *  p,
int  n,
const double *  x,
double *  fvec,
int  iflag 
)

Residual function for spectral analysis

SRMHD requires N=2 rootfind, therefore need to implement the hybrd cminpack multiD Newton solver. Things may get ugly.
Cant do anything about the arguments of this function, cminpack demands you not enjoy anything it offers...
Parameters
*pvoid pointer to the additional arguments struct, Args
nsize of system (n=2 for srmhd)
*xpointer to array containing initial estimate of solution, will also hold solution
*fvecpointer to array to hold residual values. These should be 0 +- tol
iflagCminpack error flag
Note
For more information regarding the form of this function and its parameters see the URL below
See also
Original source