Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
dumux-repositories
dumux
Commits
9a0ac613
Commit
9a0ac613
authored
Nov 28, 2018
by
Timo Koch
Browse files
[fvproblem] Resize the solution vector before applying initial solution
parent
f7b6f06d
Changes
2
Hide whitespace changes
Inline
Side-by-side
dumux/common/fvproblem.hh
View file @
9a0ac613
...
...
@@ -571,6 +571,7 @@ private:
{
const
auto
numDofs
=
fvGridGeometry_
->
vertexMapper
().
size
();
const
auto
numVert
=
fvGridGeometry_
->
gridView
().
size
(
dim
);
sol
.
resize
(
numDofs
);
// if there are more dofs than vertices (enriched nodal dofs), we have to
// call initial for all dofs at the nodes, coming from all neighboring elements.
...
...
@@ -609,6 +610,7 @@ private:
*/
void
applyInitialSolutionImpl_
(
SolutionVector
&
sol
,
/*isBox=*/
std
::
false_type
)
const
{
sol
.
resize
(
fvGridGeometry_
->
numDofs
());
for
(
const
auto
&
element
:
elements
(
fvGridGeometry_
->
gridView
()))
{
const
auto
dofIdxGlobal
=
fvGridGeometry_
->
elementMapper
().
index
(
element
);
...
...
dumux/common/staggeredfvproblem.hh
View file @
9a0ac613
...
...
@@ -164,6 +164,9 @@ public:
*/
void
applyInitialSolution
(
SolutionVector
&
sol
)
const
{
sol
[
cellCenterIdx
].
resize
(
this
->
fvGridGeometry
().
numCellCenterDofs
());
sol
[
faceIdx
].
resize
(
this
->
fvGridGeometry
().
numFaceDofs
());
for
(
const
auto
&
element
:
elements
(
this
->
fvGridGeometry
().
gridView
()))
{
auto
fvGeometry
=
localView
(
this
->
fvGridGeometry
());
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment