#include <SparsityBasedContactConstraint.h>
◆ SparsityBasedContactConstraint()
SparsityBasedContactConstraint::SparsityBasedContactConstraint |
( |
const InputParameters & |
parameters | ) |
|
|
inline |
◆ ~SparsityBasedContactConstraint()
virtual SparsityBasedContactConstraint::~SparsityBasedContactConstraint |
( |
| ) |
|
|
inlinevirtual |
◆ computeQpJacobian()
virtual Real SparsityBasedContactConstraint::computeQpJacobian |
( |
Moose::ConstraintJacobianType |
| ) |
|
|
inlinevirtual |
◆ computeQpResidual()
virtual Real SparsityBasedContactConstraint::computeQpResidual |
( |
Moose::ConstraintType |
| ) |
|
|
inlinevirtual |
◆ computeQpSlaveValue()
virtual Real SparsityBasedContactConstraint::computeQpSlaveValue |
( |
| ) |
|
|
inlinevirtual |
◆ getConnectedDofIndices()
void SparsityBasedContactConstraint::getConnectedDofIndices |
( |
| ) |
|
|
virtual |
Gets the indices for all dofs conected to the constraint Get indices for all the slave Jacobian columns, not only those based on the mesh connectivity.
Definition at line 29 of file SparsityBasedContactConstraint.C.
31 #if defined(LIBMESH_HAVE_PETSC) && !PETSC_VERSION_LESS_THAN(3, 3, 0)
32 _connected_dof_indices.clear();
40 PetscMatrix<Number> * petsc_jacobian =
dynamic_cast<PetscMatrix<Number> *
>(_jacobian);
41 mooseAssert(petsc_jacobian,
"Expected a PETSc matrix");
42 Mat jac = petsc_jacobian->mat();
45 const PetscInt * cols;
46 ierr = MatGetRow(jac, static_cast<PetscInt>(_var.nodalDofIndex()), &ncols, &cols, PETSC_NULL);
47 CHKERRABORT(_communicator.get(), ierr);
51 libMesh::out <<
"_connected_dof_indices: adding " << ncols <<
" dofs from Jacobian row["
52 << _var.nodalDofIndex() <<
"] = [";
54 for (PetscInt i = 0; i < ncols; ++i)
58 libMesh::out << cols[i] <<
" ";
60 _connected_dof_indices.push_back(cols[i]);
64 libMesh::out <<
"]\n";
66 ierr = MatRestoreRow(jac, static_cast<PetscInt>(_var.nodalDofIndex()), &ncols, &cols, PETSC_NULL);
67 CHKERRABORT(_communicator.get(), ierr);
69 NodeFaceConstraint::getConnectedDofIndices();
The documentation for this class was generated from the following files: