16 #define __FUNCT__ "PetscIJacobian"
64 for (
int ns = 0; ns < context->
nsims; ns++) {
72 PetscFunctionReturn(0);
76 #define __FUNCT__ "PetscJacobianFunction_JFNK"
120 MatShellGetContext(Jacobian,&context);
122 int nsims = context->
nsims;
125 VecNorm(Y,NORM_2,&normY);
132 VecAXPBY(F,context->
shift,0,Y);
136 double epsilon = context->
jfnk_eps / normY;
137 double t = context->
waqt;
139 for (
int ns = 0; ns < nsims; ns++) {
147 double *u = solver->
u;
148 double *uref = solver->
uref;
149 double *rhsref = solver->
rhsref;
150 double *rhs = solver->
rhs;
180 VecAXPBY(F,context->
shift,(-1.0/epsilon),Y);
184 PetscFunctionReturn(0);
188 #define __FUNCT__ "PetscJacobianFunction_Linear"
245 MatShellGetContext(Jacobian,&context);
247 int nsims = context->
nsims;
250 VecNorm(Y,NORM_2,&normY);
257 VecAXPBY(F,context->
shift,0,Y);
261 double t = context->
waqt;
263 for (
int ns = 0; ns < nsims; ns++) {
271 double *u = solver->
u;
272 double *uref = solver->
uref;
273 double *rhsref = solver->
rhsref;
274 double *rhs = solver->
rhs;
304 VecAXPBY(F,context->
shift,-1.0,Y);
308 PetscFunctionReturn(0);
int npoints_local_wghosts
#define _ArraySetValue_(x, size, value)
int PetscComputePreconMatImpl(Mat, Vec, void *)
PetscErrorCode PetscJacobianFunction_JFNK(Mat, Vec, Vec)
int TransferVecFromPETSc(double *const, const Vec, void *, const int, const int)
int(* Upwind)(double *, double *, double *, double *, double *, double *, int, void *, double)
PetscErrorCode PetscJacobianFunction_Linear(Mat, Vec, Vec)
int(* FFunction)(double *, double *, int, void *, double)
PetscErrorCode PetscIJacobian(TS, PetscReal, Vec, Vec, PetscReal, Mat, Mat, void *)
int(* ParabolicFunction)(double *, double *, void *, void *, double)
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.
Some basic definitions and macros.
Contains macros and function definitions for common array operations.
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.