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
46852db0
Commit
46852db0
authored
7 years ago
by
Timo Koch
Browse files
Options
Downloads
Patches
Plain Diff
[privarswitch] Throw not implemented error until implemented. See
#432
.
parent
88e0a6a1
No related branches found
No related tags found
1 merge request
!725
Fix/compiler errors and warnings clang
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dumux/porousmediumflow/compositional/privarswitchnewtoncontroller.hh
+55
-52
55 additions, 52 deletions
...smediumflow/compositional/privarswitchnewtoncontroller.hh
with
55 additions
and
52 deletions
dumux/porousmediumflow/compositional/privarswitchnewtoncontroller.hh
+
55
−
52
View file @
46852db0
...
...
@@ -124,58 +124,61 @@ public:
problem
,
fvGridGeometry
);
Dune
::
Hybrid
::
ifElse
(
std
::
integral_constant
<
bool
,
GET_PROP_VALUE
(
TypeTag
,
EnableGridVolumeVariablesCache
)
>
(),
[
&
](
auto
IF
)
{
std
::
cout
<<
"blub"
;
// update the secondary variables if global caching is enabled
// \note we only updated if phase presence changed as the volume variables
// are already updated once by the switch
for
(
const
auto
&
element
:
elements
(
fvGridGeometry
.
gridView
()))
{
// make sure FVElementGeometry & vol vars are bound to the element
auto
fvGeometry
=
localView
(
fvGridGeometry
);
fvGeometry
.
bindElement
(
element
);
if
(
switchedInLastIteration_
)
{
for
(
auto
&&
scv
:
scvs
(
fvGeometry
))
{
const
auto
dofIdxGlobal
=
scv
.
dofIndex
();
if
(
priVarSwitch_
->
wasSwitched
(
dofIdxGlobal
))
{
const
auto
eIdx
=
fvGridGeometry
.
elementMapper
().
index
(
element
);
const
ElementSolution
elemSol
(
element
,
this
->
curSol
(),
fvGridGeometry
);
this
->
nonConstCurGridVolVars
().
volVars
(
eIdx
,
scv
.
indexInElement
()).
update
(
elemSol
,
problem
,
element
,
scv
);
}
}
}
// handle the boundary volume variables for cell-centered models
if
(
!
isBox
)
{
for
(
auto
&&
scvf
:
scvfs
(
fvGeometry
))
{
// if we are not on a boundary, skip the rest
if
(
!
scvf
.
boundary
())
continue
;
// check if boundary is a pure dirichlet boundary
const
auto
bcTypes
=
problem
.
boundaryTypes
(
element
,
scvf
);
if
(
bcTypes
.
hasOnlyDirichlet
())
{
const
auto
insideScvIdx
=
scvf
.
insideScvIdx
();
const
auto
&
insideScv
=
fvGeometry
.
scv
(
insideScvIdx
);
const
ElementSolution
elemSol
(
problem
.
dirichlet
(
element
,
scvf
));
this
->
nonConstCurGridVolVars
().
volVars
(
scvf
.
outsideScvIdx
(),
0
/*indexInElement*/
).
update
(
elemSol
,
problem
,
element
,
insideScv
);
}
}
}
}
[
&
](
auto
&&
_if
)
{
DUNE_THROW
(
Dune
::
NotImplemented
,
"Privar switch and volume varaible caching! Please implement!"
);
// TODO:
// std::cout << "blub";
//
// // update the secondary variables if global caching is enabled
// // \note we only updated if phase presence changed as the volume variables
// // are already updated once by the switch
// for (const auto& element : elements(fvGridGeometry.gridView()))
// {
// // make sure FVElementGeometry & vol vars are bound to the element
// auto fvGeometry = localView(fvGridGeometry);
// fvGeometry.bindElement(element);
//
// if (switchedInLastIteration_)
// {
// for (auto&& scv : scvs(fvGeometry))
// {
// const auto dofIdxGlobal = scv.dofIndex();
// if (priVarSwitch_->wasSwitched(dofIdxGlobal))
// {
// const auto eIdx = fvGridGeometry.elementMapper().index(element);
// const ElementSolution elemSol(element, this->curSol(), fvGridGeometry);
// this->nonConstCurGridVolVars().volVars(eIdx, scv.indexInElement()).update(elemSol,
// problem,
// element,
// scv);
// }
// }
// }
//
// // handle the boundary volume variables for cell-centered models
// if(!isBox)
// {
// for (auto&& scvf : scvfs(fvGeometry))
// {
// // if we are not on a boundary, skip the rest
// if (!scvf.boundary())
// continue;
//
// // check if boundary is a pure dirichlet boundary
// const auto bcTypes = problem.boundaryTypes(element, scvf);
// if (bcTypes.hasOnlyDirichlet())
// {
// const auto insideScvIdx = scvf.insideScvIdx();
// const auto& insideScv = fvGeometry.scv(insideScvIdx);
// const ElementSolution elemSol(problem.dirichlet(element, scvf));
//
// this->nonConstCurGridVolVars().volVars(scvf.outsideScvIdx(), 0/*indexInElement*/).update(elemSol, problem, element, insideScv);
// }
// }
// }
// }
});
}
...
...
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