Go to the source code of this file.
◆ formFunction()
| PetscErrorCode formFunction |
( |
SNES |
snes, |
|
|
Vec |
x, |
|
|
Vec |
f, |
|
|
void * |
ctx |
|
) |
| |
Definition at line 33 of file SubChannel1PhaseProblem.C.
34{
35 const PetscScalar * xx;
36 PetscScalar * ff;
37 PetscInt size;
38
42
45 for (PetscInt i = 0; i < size; i++)
46 solution_seed(i) = xx[i];
47
49
52
54 for (int i = 0; i < size; i++)
55 ff[i] = Wij_residual_vector(i);
56
59}
Real f(Real x)
Test function for Brents method.
const std::vector< double > x
libMesh::DenseVector< Real > residualFunction(int iblock, libMesh::DenseVector< Real > solution)
Computes Residual Vector based on the lateral momentum conservation equation for block iblock & updat...
PetscFunctionReturn(LIBMESH_PETSC_SUCCESS)
LibmeshPetscCallQ(DMShellGetContext(dm, &ctx))
SubChannel1PhaseProblem * schp