misc.c (0e0d204ce9129b91684a3e59ebcd49414302bfe0) misc.c (e3e3df415f43d87f4bb6b086c337ffc22456aaae)
1// Copyright (c) 2017, Lawrence Livermore National Security, LLC. Produced at
2// the Lawrence Livermore National Laboratory. LLNL-CODE-734707. All Rights
3// reserved. See files LICENSE and NOTICE for details.
4//
5// This file is part of CEED, a collection of benchmarks, miniapps, software
6// libraries and APIs for efficient high-order finite element and spectral
7// element discretizations for exascale applications. For more information and
8// source code availability see http://github.com/ceed.

--- 108 unchanged lines hidden (view full) ---

117
118 PetscFunctionBeginUser;
119
120 // Context data
121 FormJacobCtx formJacobCtx = (FormJacobCtx)ctx;
122 PetscInt numLevels = formJacobCtx->numLevels;
123 Mat *jacobMat = formJacobCtx->jacobMat;
124
1// Copyright (c) 2017, Lawrence Livermore National Security, LLC. Produced at
2// the Lawrence Livermore National Laboratory. LLNL-CODE-734707. All Rights
3// reserved. See files LICENSE and NOTICE for details.
4//
5// This file is part of CEED, a collection of benchmarks, miniapps, software
6// libraries and APIs for efficient high-order finite element and spectral
7// element discretizations for exascale applications. For more information and
8// source code availability see http://github.com/ceed.

--- 108 unchanged lines hidden (view full) ---

117
118 PetscFunctionBeginUser;
119
120 // Context data
121 FormJacobCtx formJacobCtx = (FormJacobCtx)ctx;
122 PetscInt numLevels = formJacobCtx->numLevels;
123 Mat *jacobMat = formJacobCtx->jacobMat;
124
125 // Update Jacobian PC smoother on each level
126 for (int level = 0; level < numLevels; level++) {
127 // -- Update diagonal state counter
125 // Update Jacobian on each level
126 for (PetscInt level = 0; level < numLevels; level++) {
128 ierr = MatAssemblyBegin(jacobMat[level], MAT_FINAL_ASSEMBLY); CHKERRQ(ierr);
129 ierr = MatAssemblyEnd(jacobMat[level], MAT_FINAL_ASSEMBLY); CHKERRQ(ierr);
130 }
131
132 // Form coarse assembled matrix
133 ierr = VecZeroEntries(formJacobCtx->Ucoarse); CHKERRQ(ierr);
134 ierr = SNESComputeJacobianDefaultColor(formJacobCtx->snesCoarse,
135 formJacobCtx->Ucoarse,

--- 42 unchanged lines hidden ---
127 ierr = MatAssemblyBegin(jacobMat[level], MAT_FINAL_ASSEMBLY); CHKERRQ(ierr);
128 ierr = MatAssemblyEnd(jacobMat[level], MAT_FINAL_ASSEMBLY); CHKERRQ(ierr);
129 }
130
131 // Form coarse assembled matrix
132 ierr = VecZeroEntries(formJacobCtx->Ucoarse); CHKERRQ(ierr);
133 ierr = SNESComputeJacobianDefaultColor(formJacobCtx->snesCoarse,
134 formJacobCtx->Ucoarse,

--- 42 unchanged lines hidden ---