Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
dumux
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dumux-repositories
dumux
Commits
dc21214b
Commit
dc21214b
authored
8 years ago
by
Dennis Gläser
Committed by
Timo Koch
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[implicit][localjac] specialize updateGlobalJacobian routine to box or cc
parent
504b8791
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!617
[WIP] Next
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dumux/implicit/localjacobian.hh
+32
-6
32 additions, 6 deletions
dumux/implicit/localjacobian.hh
with
32 additions
and
6 deletions
dumux/implicit/localjacobian.hh
+
32
−
6
View file @
dc21214b
...
@@ -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_
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment