llg.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef LLG_H
00027 #define LLG_H
00028
00029 #include "griddata.h"
00030
00031 #ifdef SUNDIALS_VERSION
00032
00033 #if SUNDIALS_VERSION < 230
00034 #error "SUNDIALS versions lower/older than 2.3.0 are not supported"
00035 #endif
00036
00037 #ifdef UNIPROC
00038 #include "nvector/nvector_serial.h"
00039 #else
00040 #include "nvector/nvector_parallel.h"
00041 #endif
00042
00043 #include "sundials/sundials_types.h"
00044 #include "cvode/cvode.h"
00045 #include "sundials/sundials_spgmr.h"
00046 #include "sundials/sundials_dense.h"
00047 #include "sundials/sundials_math.h"
00048
00049 int RHSfunction(realtype t,N_Vector u,N_Vector udot,void *f_data);
00050 int PSolve(realtype t,N_Vector y,N_Vector fy,N_Vector r,N_Vector z,realtype gamma,realtype delta,int lr,void *P_data,N_Vector vtemp);
00051 int Precond(realtype t,N_Vector y,N_Vector fy,booleantype jok,booleantype *jcurPtr,realtype gamma,void *P_data,N_Vector vtemp1,N_Vector vtemp2,N_Vector vtemp3);
00052 int Jtimes(N_Vector v,N_Vector Jv,realtype t,N_Vector y,N_Vector fy,void *jac_data,N_Vector tmp);
00053
00054 int WriteLogPVodeInit(GridData *gdata);
00055 int WriteLogPVode(GridData *gdata);
00056
00057 int CheckIterationLLG(GridData *gdata);
00058 int EquilCheck(GridData *gdata);
00059 int myTSCreatePVode(GridData *gdata);
00060 int myTSStepPVode(GridData *gdata);
00061 int Precond_Init(GridData *gdata);
00062 int PVodeInit(GridData *gdata);
00063 int PVodeReInit(GridData *gdata);
00064
00065 #endif
00066
00067 int myLLGJacobian(TS ts,PetscReal t,Vec global_in,Mat *AA,Mat *BB,MatStructure *str,void *ctx);
00068 int calc_dMdt(TS ts,PetscReal dt,Vec invec,Vec outvec,void *ptr);
00069
00070 #endif