#include "petsc.h"
#include "petscmat.h"
#include "petscvec.h"
#include "omg.h"
#include "oda.h"
#include "omgJac.h"
#include "odaJac.h"
Go to the source code of this file.
Defines | |
#define | BUILD_FULL_JAC_TYPE2_BLOCK(B) |
#define | BUILD_FULL_JAC_TYPE3_BLOCK(B) |
#define | JAC_TYPE2_DIAG_BLOCK |
#define | JAC_TYPE2_ELEM_DIAG_BLOCK |
#define | JAC_TYPE2_ELEM_MULT_BLOCK |
#define | JAC_TYPE2_MULT_BLOCK |
#define | JAC_TYPE2_MULT_DEBUG_BLOCK |
#define | JAC_TYPE3_DIAG_BLOCK |
#define | JAC_TYPE3_MULT_BLOCK |
Functions | |
PetscErrorCode | ComputeDirichletJacobian (ot::DAMG damg, Mat J, Mat B) |
PetscErrorCode | ComputeDirichletLaplacian (ot::DAMG damg, Mat J, Mat B) |
PetscErrorCode | ComputeJacobian1 (ot::DAMG damg, Mat J, Mat B) |
PetscErrorCode | ComputeJacobian2 (ot::DAMG damg, Mat J, Mat B) |
PetscErrorCode | ComputeJacobian3 (ot::DAMG damg, Mat J, Mat B) |
PetscErrorCode | CreateAndComputeFullActiveJacobian1 (ot::DAMG damg, Mat *mat) |
PetscErrorCode | CreateAndComputeFullJacobian1 (ot::DAMG damg, Mat *mat) |
PetscErrorCode | CreateAndComputeMassMatrix (ot::DAMG damg, Mat *jac) |
PetscErrorCode | CreateDirichletJacobian (ot::DAMG damg, Mat *jac) |
PetscErrorCode | CreateDirichletLaplacian (ot::DAMG damg, Mat *jac) |
PetscErrorCode | CreateJacobian1 (ot::DAMG damg, Mat *jac) |
PetscErrorCode | CreateJacobian2 (ot::DAMG damg, Mat *jac) |
PetscErrorCode | CreateJacobian3 (ot::DAMG damg, Mat *jac) |
PetscErrorCode | CreateTmpDirichletJacobian (ot::DAMG damg, Mat *jac) |
PetscErrorCode | CreateTmpDirichletLaplacian (ot::DAMG damg, Mat *jac) |
void | DestroyDirichletJacContexts (ot::DAMG *damg) |
PetscErrorCode | DirichletJacobianMatDestroy (Mat J) |
PetscErrorCode | DirichletJacobianMatGetDiagonal (Mat J, Vec diag) |
PetscErrorCode | DirichletJacobianMatMult (Mat J, Vec in, Vec out) |
PetscErrorCode | DirichletJacobianShellMatMult (Mat J, Vec in, Vec out) |
PetscErrorCode | DirichletLaplacianMatDestroy (Mat J) |
PetscErrorCode | DirichletLaplacianMatGetDiagonal (Mat J, Vec diag) |
PetscErrorCode | DirichletLaplacianMatMult (Mat J, Vec in, Vec out) |
PetscErrorCode | DirichletLaplacianShellMatMult (Mat J, Vec in, Vec out) |
void | getActiveStateAndActiveCommForKSP_Shell_DirichletJac (Mat mat, bool &activeState, MPI_Comm &activeComm) |
void | getActiveStateAndActiveCommForKSP_Shell_Jac1 (Mat mat, bool &activeState, MPI_Comm &activeComm) |
void | getActiveStateAndActiveCommForKSP_Shell_Jac2or3 (Mat mat, bool &activeState, MPI_Comm &activeComm) |
void | getPrivateMatricesForKSP_Shell_DirichletJac (Mat mat, Mat *AmatPrivate, Mat *PmatPrivate, MatStructure *pFlag) |
void | getPrivateMatricesForKSP_Shell_Jac1 (Mat mat, Mat *AmatPrivate, Mat *PmatPrivate, MatStructure *pFlag) |
void | getPrivateMatricesForKSP_Shell_Jac2 (Mat mat, Mat *AmatPrivate, Mat *PmatPrivate, MatStructure *pFlag) |
void | getPrivateMatricesForKSP_Shell_Jac3 (Mat mat, Mat *AmatPrivate, Mat *PmatPrivate, MatStructure *pFlag) |
PetscErrorCode | Jacobian2MatDestroy (Mat J) |
PetscErrorCode | Jacobian2MatGetDiagonal (Mat J, Vec diag) |
PetscErrorCode | Jacobian2MatMult (Mat J, Vec in, Vec out) |
PetscErrorCode | Jacobian2ShellMatMult (Mat J, Vec in, Vec out) |
PetscErrorCode | Jacobian3MatDestroy (Mat J) |
PetscErrorCode | Jacobian3MatGetDiagonal (Mat J, Vec diag) |
PetscErrorCode | Jacobian3MatMult (Mat J, Vec in, Vec out) |
PetscErrorCode | Jacobian3ShellMatMult (Mat J, Vec in, Vec out) |
void | SetDirichletJacContexts (ot::DAMG *damg) |
PetscErrorCode | TmpDirichletJacobianMatMult (Mat J, Vec in, Vec out) |
PetscErrorCode | TmpDirichletLaplacianMatMult (Mat J, Vec in, Vec out) |
Variables | |
double ***** | LaplacianType1Stencil |
double **** | LaplacianType2Stencil |
double ***** | MassType1Stencil |
double **** | MassType2Stencil |
Definition in file omgJac.C.
|
Definition at line 1803 of file omgJac.C. Referenced by ComputeJacobian2(), and ComputeJacobian3(). |
|
Definition at line 2341 of file omgJac.C. Referenced by ComputeJacobian3(). |
|
Value: {\ ot::DA* da = damg->da;\ iC(VecZeroEntries(diag));\ double *matPropArr;\ /*Elem,Ghost,Read-only,1 dof*/\ da->vecGetBuffer<double>(*(data->matProp),matPropArr,true,true,true,2);\ PetscScalar *diagArr;\ /*Nodal,Non-Ghosted,Write,1 dof*/\ da->vecGetBuffer(diag,diagArr,false,false,false,1);\ unsigned int maxD;\ double hFac;\ if(da->iAmActive()) {\ maxD = (da->getMaxDepth());\ hFac = 1.0/((double)(1u << (maxD-1)));\ /*Loop through All Elements including ghosted*/\ for(da->init<ot::DA_FLAGS::ALL>();\ da->curr() < da->end<ot::DA_FLAGS::ALL>();\ da->next<ot::DA_FLAGS::ALL>()) {\ JAC_TYPE2_ELEM_DIAG_BLOCK\ } /*end i*/\ } /*end if active*/\ da->vecRestoreBuffer<double>(*(data->matProp),matPropArr,true,true,true,2);\ da->vecRestoreBuffer(diag,diagArr,false,false,false,1);\ PetscLogFlops(44*(da->getGhostedElementSize()));\ } Definition at line 1614 of file omgJac.C. Referenced by Jacobian2MatGetDiagonal(), and Jacobian3MatGetDiagonal(). |
|
Value: {\ unsigned int idx = da->curr();\ unsigned int lev = da->getLevel(idx);\ double h = hFac*(1u << (maxD - lev));\ double matP1 = matPropArr[2*idx];\ double matP2 = matPropArr[2*idx+1];\ double fac1 = matP1*h/2.0;\ double fac2 = matP2*h*h*h/8.0;\ unsigned int indices[8];\ da->getNodeIndices(indices);\ unsigned char childNum = da->getChildNumber();\ unsigned char hnMask = da->getHangingNodeIndex(idx);\ unsigned char elemType = 0;\ GET_ETYPE_BLOCK(elemType,hnMask,childNum)\ for(int k = 0; k < 8; k++) {\ diagArr[indices[k]] += ((fac1*(LaplacianType2Stencil[childNum][elemType][k][k])) +\ (fac2*(MassType2Stencil[childNum][elemType][k][k])));\ } /*end k*/\ } |
|
Value: {\ unsigned int idx = da->curr();\ unsigned int lev = da->getLevel(idx);\ double h = hFac*(1u << (maxD - lev));\ double matP1 = matPropArr[2*idx];\ double matP2 = matPropArr[2*idx+1];\ double fac1 = matP1*h/2.0;\ double fac2 = matP2*h*h*h/8.0;\ unsigned int indices[8];\ da->getNodeIndices(indices);\ unsigned char childNum = da->getChildNumber();\ unsigned char hnMask = da->getHangingNodeIndex(idx);\ unsigned char elemType = 0;\ GET_ETYPE_BLOCK(elemType,hnMask,childNum)\ for(int k = 0;k < 8;k++) {\ for(int j=0;j<8;j++) {\ outArr[indices[k]] += (((fac1*(LaplacianType2Stencil[childNum][elemType][k][j])) +\ (fac2*(MassType2Stencil[childNum][elemType][k][j])))*inArr[indices[j]]);\ }/*end for j*/\ }/*end for k*/\ } |
|
Definition at line 1687 of file omgJac.C. Referenced by Jacobian2MatMult(), and Jacobian3MatMult(). |
|
|
|
Definition at line 2010 of file omgJac.C. Referenced by Jacobian3MatGetDiagonal(). |
|
Definition at line 2139 of file omgJac.C. Referenced by Jacobian3MatMult(). |
|
|
|
Definition at line 1474 of file omgJac.C. References ot::DAMG. Referenced by main(). |
|
Definition at line 1860 of file omgJac.C. References BUILD_FULL_JAC_TYPE2_BLOCK, ot::DAMG, Jac2MFreeData::Jmat_private, and ot::_p_DAMG::user. |
|
Definition at line 2450 of file omgJac.C. References Jac3MFreeData::BmatThisLevel, BUILD_FULL_JAC_TYPE2_BLOCK, BUILD_FULL_JAC_TYPE3_BLOCK, ot::DAMG, Jac3MFreeData::isFinestLevel, Jac3MFreeData::Jmat_private, Jac3MFreeData::JmatThisLevel, and ot::_p_DAMG::user. |
|
Definition at line 1467 of file omgJac.C. References ot::_p_DAMG::da, and ot::DAMG. Referenced by CreateJacobian1(). |
|
Definition at line 1460 of file omgJac.C. References ot::_p_DAMG::da, and ot::DAMG. Referenced by CreateJacobian1(). |
|
Definition at line 1313 of file omgJac.C. References Jac1MFreeData::da, ot::_p_DAMG::da, ot::DAMG, ot::DA::getComm(), ot::DA::getNodeSize(), iC, Jac1MFreeData::inTmp, Jac1MFreeData::Jmat_private, MassMatDestroy(), MassMatGetDiagonal(), MassMatMult(), and Jac1MFreeData::outTmp. Referenced by ComputeRHS1(), ComputeRHS3(), and ComputeRHS5(). |
|
|
|
|
|
|
Definition at line 47 of file omgJac.C. References ot::_p_DAMG::comm, ot::_p_DAMG::da, ot::DAMG, DirichletJacobianMatDestroy(), ot::DA::getNodeSize(), and TmpDirichletJacobianMatMult(). Referenced by ComputeFBM_RHS(), and ComputeTestFBM_RHS(). |
|
Definition at line 33 of file omgJac.C. References ot::_p_DAMG::comm, ot::_p_DAMG::da, ot::DAMG, DirichletLaplacianMatDestroy(), ot::DA::getNodeSize(), and TmpDirichletLaplacianMatMult(). Referenced by ComputeFBM2_RHS(). |
|
Definition at line 588 of file omgJac.C. References DirichletJacData::bdyArr, ot::DAMG, DirichletJacData::inTmp, DirichletJacData::Jmat_private, ot::_p_DAMG::nlevels, DirichletJacData::outTmp, and ot::_p_DAMG::user. Referenced by main(). |
|
Definition at line 502 of file omgJac.C. Referenced by CreateDirichletJacobian(), and CreateTmpDirichletJacobian(). |
|
Definition at line 1110 of file omgJac.C. References DirichletJacData::bdyArr, ot::DA::curr(), ot::DAMG, ot::DA::end(), GET_ETYPE_BLOCK, ot::DA::getChildNumber(), ot::DA::getHangingNodeIndex(), ot::DA::getLevel(), ot::DA::getMaxDepth(), ot::DA::getNodeIndices(), ot::DA::iAmActive(), iC, ot::DA::init(), LaplacianType2Stencil, MassType2Stencil, ot::DA::next(), ot::DA::vecGetBuffer(), and ot::DA::vecRestoreBuffer(). Referenced by CreateDirichletJacobian(). |
|
|
Definition at line 644 of file omgJac.C. References ot::DAMG, DirichletJacData::inTmp, DirichletJacData::Jmat_private, and DirichletJacData::outTmp. Referenced by CreateDirichletJacobian(). |
|
Definition at line 496 of file omgJac.C. Referenced by CreateDirichletLaplacian(), and CreateTmpDirichletLaplacian(). |
|
Definition at line 1058 of file omgJac.C. References DirichletJacData::bdyArr, ot::DA::curr(), ot::DAMG, ot::DA::end(), GET_ETYPE_BLOCK, ot::DA::getChildNumber(), ot::DA::getHangingNodeIndex(), ot::DA::getLevel(), ot::DA::getMaxDepth(), ot::DA::getNodeIndices(), ot::DA::iAmActive(), iC, ot::DA::init(), LaplacianType2Stencil, ot::DA::next(), ot::DA::vecGetBuffer(), and ot::DA::vecRestoreBuffer(). Referenced by CreateDirichletLaplacian(). |
|
|
Definition at line 613 of file omgJac.C. References ot::DAMG, DirichletJacData::inTmp, DirichletJacData::Jmat_private, and DirichletJacData::outTmp. Referenced by CreateDirichletLaplacian(). |
|
Definition at line 1226 of file omgJac.C. References ot::DAMG, ot::DA::getCommActive(), and ot::DA::iAmActive(). |
|
Definition at line 1238 of file omgJac.C. References ot::DA::getCommActive(), and ot::DA::iAmActive(). |
|
Definition at line 1250 of file omgJac.C. References ot::DAMG, ot::DA::getCommActive(), and ot::DA::iAmActive(). |
|
Definition at line 1262 of file omgJac.C. References ot::DAMG, and DirichletJacData::Jmat_private. |
|
Definition at line 1275 of file omgJac.C. References DirichletJacData::Jmat_private. |
|
Definition at line 1287 of file omgJac.C. References ot::DAMG, and Jac2MFreeData::Jmat_private. |
|
Definition at line 1300 of file omgJac.C. References ot::DAMG, and Jac3MFreeData::Jmat_private. |
|
|
|
Definition at line 1640 of file omgJac.C. References ot::DAMG, iC, Jac2MFreeData::isFinestLevel, and JAC_TYPE2_DIAG_BLOCK. |
|
Definition at line 1775 of file omgJac.C. References ot::DAMG, iC, Jac2MFreeData::isFinestLevel, and JAC_TYPE2_MULT_BLOCK. |
|
Definition at line 1164 of file omgJac.C. References ot::DAMG, Jac2MFreeData::inTmp, Jac2MFreeData::Jmat_private, and Jac2MFreeData::outTmp. |
|
Definition at line 2002 of file omgJac.C. Referenced by CreateJacobian3(). |
|
|
|
Definition at line 1195 of file omgJac.C. References ot::DAMG, Jac3MFreeData::inTmp, Jac3MFreeData::Jmat_private, and Jac3MFreeData::outTmp. Referenced by CreateJacobian3(). |
|
Definition at line 508 of file omgJac.C. References ot::assignBoundaryFlags(), DirichletJacData::bdyArr, ot::DA::curr(), ot::_p_DAMG::da, ot::_p_DAMG::da_aux, ot::DAMG, ot::DA::end(), ot::DA::getNodeIndices(), ot::DA::iAmActive(), ot::DA::init(), DirichletJacData::inTmp, DirichletJacData::Jmat_private, ot::DA::next(), ot::_p_DAMG::nlevels, DirichletJacData::outTmp, ot::_p_DAMG::suppressedDOF, and ot::_p_DAMG::suppressedDOFaux. Referenced by main(). |
|
|
|
Definition at line 42 of file checkError.C. Referenced by main(). |
|
Definition at line 43 of file checkError.C. |
|
Definition at line 44 of file checkError.C. Referenced by main(). |
|
Definition at line 45 of file checkError.C. |