Skip to content
Snippets Groups Projects
Commit dc21214b authored by Dennis Gläser's avatar Dennis Gläser Committed by Timo Koch
Browse files

[implicit][localjac] specialize updateGlobalJacobian routine to box or cc

parent 504b8791
No related branches found
No related tags found
1 merge request!617[WIP] Next
...@@ -226,13 +226,15 @@ protected: ...@@ -226,13 +226,15 @@ protected:
/*! /*!
* \brief Updates the current global Jacobian matrix with the * \brief Updates the current global Jacobian matrix with the
* partial derivatives of all equations in regard to the * partial derivatives of all equations in regard to the
* primary variable 'pvIdx' at dof 'col' . * primary variable 'pvIdx' at dof 'col'. Specialization for cc methods.
*/ */
void updateGlobalJacobian_(JacobianMatrix& matrix, template<class T = TypeTag>
const int globalI, typename std::enable_if<!GET_PROP_VALUE(T, ImplicitIsBox)>::type
const int globalJ, updateGlobalJacobian_(JacobianMatrix& matrix,
const int pvIdx, const int globalI,
const PrimaryVariables &partialDeriv) const int globalJ,
const int pvIdx,
const PrimaryVariables &partialDeriv)
{ {
for (int eqIdx = 0; eqIdx < numEq; eqIdx++) for (int eqIdx = 0; eqIdx < numEq; eqIdx++)
{ {
...@@ -245,6 +247,30 @@ protected: ...@@ -245,6 +247,30 @@ protected:
} }
} }
/*!
* \brief Updates the current global Jacobian matrix with the
* partial derivatives of all equations in regard to the
* primary variable 'pvIdx' at dof 'col'. Specialization for the box method.
*/
template<class T = TypeTag>
typename std::enable_if<GET_PROP_VALUE(T, ImplicitIsBox)>::type
updateGlobalJacobian_(JacobianMatrix& matrix,
const int globalI,
const int globalJ,
const int pvIdx,
const PrimaryVariables &partialDeriv)
{
for (int eqIdx = 0; eqIdx < numEq; eqIdx++)
{
// A[i][col][eqIdx][pvIdx] is the rate of change of
// the residual of equation 'eqIdx' at dof 'i'
// depending on the primary variable 'pvIdx' at dof
// 'col'.
matrix[globalI][globalJ][eqIdx][pvIdx] += partialDeriv[eqIdx];
Valgrind::CheckDefined(matrix[globalI][globalJ][eqIdx][pvIdx]);
}
}
// The problem we would like to solve // The problem we would like to solve
Problem *problemPtr_; Problem *problemPtr_;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment