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
388d1909
Commit
388d1909
authored
7 years ago
by
Timo Koch
Browse files
Options
Downloads
Patches
Plain Diff
[gstat] Get the mapper from outside. Mappings have to be the same!
parent
b98b66c7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
Loading
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dumux/material/spatialparams/gstatrandomfield.hh
+15
-12
15 additions, 12 deletions
dumux/material/spatialparams/gstatrandomfield.hh
with
15 additions
and
12 deletions
dumux/material/spatialparams/gstatrandomfield.hh
+
15
−
12
View file @
388d1909
...
@@ -71,14 +71,11 @@ public:
...
@@ -71,14 +71,11 @@ public:
*
*
* \param gridView the used gridView
* \param gridView the used gridView
*/
*/
GstatRandomField
(
const
GridView
&
gridView
)
GstatRandomField
(
const
GridView
&
gridView
,
const
ElementMapper
&
elementMapper
)
:
gridView_
(
gridView
),
:
gridView_
(
gridView
)
#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6)
,
elementMapper_
(
elementMapper
)
elementMapper_
(
gridView
,
Dune
::
mcmgElementLayout
()),
,
data_
(
gridView
.
size
(
0
))
#else
{}
elementMapper_
(
gridView
),
#endif
data_
(
gridView
.
size
(
0
))
{}
/*!
/*!
* \brief Creates a new field with random variables, if desired.
* \brief Creates a new field with random variables, if desired.
...
@@ -171,11 +168,17 @@ public:
...
@@ -171,11 +168,17 @@ public:
}
}
//! \brief Return an entry of the data vector
//! \brief Return an entry of the data vector
Scalar
data
(
const
Element
&
e
)
Scalar
data
(
const
Element
&
e
)
const
{
{
return
data_
[
elementMapper_
.
index
(
e
)];
return
data_
[
elementMapper_
.
index
(
e
)];
}
}
//! \brief Return the data vector for analysis or external vtk output
const
DataVector
&
data
()
const
{
return
data_
;
}
//! \brief Write the data to a vtk file
//! \brief Write the data to a vtk file
void
writeVtk
(
const
std
::
string
&
vtkName
,
void
writeVtk
(
const
std
::
string
&
vtkName
,
const
std
::
string
&
dataName
=
"data"
)
const
const
std
::
string
&
dataName
=
"data"
)
const
...
@@ -195,12 +198,12 @@ public:
...
@@ -195,12 +198,12 @@ public:
}
}
private
:
private
:
GridView
gridView_
;
const
GridView
gridView_
;
ElementMapper
elementMapper_
;
const
ElementMapper
&
elementMapper_
;
DataVector
data_
;
DataVector
data_
;
FieldType
fieldType_
;
FieldType
fieldType_
;
};
};
}
}
// end namespace Dumux
#endif
#endif
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