16 #define __FUNCT__ "PetscIJacobianIMEX"
73 for (
int ns = 0; ns < context->
nsims; ns++) {
81 PetscFunctionReturn(0);
85 #define __FUNCT__ "PetscJacobianFunctionIMEX_JFNK"
136 MatShellGetContext(Jacobian,&context);
138 int nsims = context->
nsims;
141 VecNorm(Y,NORM_2,&normY);
148 VecAXPBY(F,context->
shift,0,Y);
152 double epsilon = context->
jfnk_eps / normY;
153 double t = context->
waqt;
155 for (
int ns = 0; ns < nsims; ns++) {
163 double *u = solver->
u;
164 double *uref = solver->
uref;
165 double *rhsref = solver->
rhsref;
166 double *rhs = solver->
rhs;
229 VecAXPBY(F,context->
shift,(-1.0/epsilon),Y);
233 PetscFunctionReturn(0);
237 #define __FUNCT__ "PetscJacobianFunctionIMEX_Linear"
299 MatShellGetContext(Jacobian,&context);
301 int nsims = context->
nsims;
304 VecNorm(Y,NORM_2,&normY);
311 VecAXPBY(F,context->
shift,0,Y);
315 double t = context->
waqt;
317 for (
int ns = 0; ns < nsims; ns++) {
325 double *u = solver->
u;
326 double *uref = solver->
uref;
327 double *rhsref = solver->
rhsref;
328 double *rhs = solver->
rhs;
391 VecAXPBY(F,context->
shift,-1.0,Y);
395 PetscFunctionReturn(0);
int npoints_local_wghosts
#define _ArraySetValue_(x, size, value)
int(* dFFunction)(double *, double *, int, void *, double)
PetscErrorCode PetscIJacobianIMEX(TS, PetscReal, Vec, Vec, PetscReal, Mat, Mat, void *)
int TransferVecFromPETSc(double *const, const Vec, void *, const int, const int)
PetscErrorCode PetscJacobianFunctionIMEX_JFNK(Mat, Vec, Vec)
int(* Upwind)(double *, double *, double *, double *, double *, double *, int, void *, double)
int(* UpwinddF)(double *, double *, double *, double *, double *, double *, int, void *, double)
int(* UpwindFdF)(double *, double *, double *, double *, double *, double *, int, void *, double)
int(* FdFFunction)(double *, double *, int, void *, double)
int(* FFunction)(double *, double *, int, void *, double)
int(* ParabolicFunction)(double *, double *, void *, void *, double)
int PetscComputePreconMatIMEX(Mat, Vec, void *)
int(* SourceFunction)(double *, double *, void *, void *, double)
int TransferVecToPETSc(const double *const, Vec, void *, const int, const int)
int(* HyperbolicFunction)(double *, double *, void *, void *, double, int, int(*)(double *, double *, int, void *, double), int(*)(double *, double *, double *, double *, double *, double *, int, void *, double))
Structure containing the variables for time-integration with PETSc.
#define _ArrayAYPX_(x, a, y, size)
Structure defining a simulation.
char SplitHyperbolicFlux[_MAX_STRING_SIZE_]
Some basic definitions and macros.
Contains macros and function definitions for common array operations.
PetscErrorCode PetscJacobianFunctionIMEX_Linear(Mat, Vec, Vec)
int(* ApplyBoundaryConditions)(void *, void *, double *, double *, double)
int MPIExchangeBoundariesnD(int, int, int *, int, void *, double *)
Structure of MPI-related variables.
#define _ArrayAXPY_(x, a, y, size)
C++ declarations for MPI-related functions.
Structure containing all solver-specific variables and functions.