Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-gdt
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
ag-ohlberger
dune-community
dune-gdt
Commits
14fe629d
Commit
14fe629d
authored
3 years ago
by
Dr. Felix Tobias Schindler
Browse files
Options
Downloads
Patches
Plain Diff
[discretefunction] allow to visualize(discrete_function) as in dune-xt
parent
fcce5e21
No related branches found
Branches containing commit
No related tags found
1 merge request
!10
Draft: consolidate refactoring work
Checking pipeline status
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dune/gdt/discretefunction/default.hh
+40
-9
40 additions, 9 deletions
dune/gdt/discretefunction/default.hh
with
40 additions
and
9 deletions
dune/gdt/discretefunction/default.hh
+
40
−
9
View file @
14fe629d
...
...
@@ -139,18 +139,16 @@ public:
* \}
*/
using
BaseType
::
visualize
;
using
BaseType
::
visualize_gradient
;
/**
* \brief Visualizes the function using Dune::XT::Functions::visualize on the grid view
* associated with the space.
* \sa Dune::XT::Functions::visualize
* \note Subsampling is enabled by default for functions of order greater than one.
*/
void
visualize
(
const
std
::
string
filename
,
const
VTK
::
OutputType
vtk_output_type
=
VTK
::
appendedraw
,
const
XT
::
Common
::
Parameter
&
param
=
{})
const
[[
deprecated
(
"Use visualize(discrete_function) instead (28.02.2022)!"
)]]
void
visualize
(
const
std
::
string
filename
,
const
VTK
::
OutputType
vtk_output_type
=
VTK
::
appendedraw
,
const
XT
::
Common
::
Parameter
&
param
=
{})
const
{
const
bool
subsampling
=
param
.
has_key
(
"subsampling"
)
?
static_cast
<
bool
>
(
param
.
get
(
"subsampling"
)[
0
])
:
(
space_
.
max_polorder
()
>
1
);
...
...
@@ -163,9 +161,10 @@ public:
* \sa Dune::XT::Functions::visualize_gradient
* \note Subsampling is enabled by default for functions of order greater than one.
*/
void
visualize_gradient
(
const
std
::
string
filename
,
const
VTK
::
OutputType
vtk_output_type
=
VTK
::
appendedraw
,
const
XT
::
Common
::
Parameter
&
param
=
{})
const
[[
deprecated
(
"Use visualize_gradient(discrete_function) instead (28.02.2022)!"
)]]
void
visualize_gradient
(
const
std
::
string
filename
,
const
VTK
::
OutputType
vtk_output_type
=
VTK
::
appendedraw
,
const
XT
::
Common
::
Parameter
&
param
=
{})
const
{
const
bool
subsampling
=
param
.
has_key
(
"subsampling"
)
?
static_cast
<
bool
>
(
param
.
get
(
"subsampling"
)[
0
])
:
(
space_
.
max_polorder
()
>
1
);
...
...
@@ -320,6 +319,38 @@ make_discrete_function(const SpaceInterface<GV, r, rC, R>& space, const std::str
}
using
XT
::
Functions
::
visualize
;
using
XT
::
Functions
::
visualize_gradient
;
template
<
class
V
,
class
GV
,
size_t
r
,
size_t
rC
,
class
R
>
void
visualize
(
const
ConstDiscreteFunction
<
V
,
GV
,
r
,
rC
,
R
>&
discrete_function
,
const
std
::
string
path
,
const
bool
subsampling
=
true
,
const
VTK
::
OutputType
vtk_output_type
=
VTK
::
appendedraw
,
const
XT
::
Common
::
Parameter
&
param
=
{},
const
XT
::
Functions
::
VisualizerInterface
<
r
,
rC
,
R
>&
visualizer
=
XT
::
Functions
::
default_visualizer
<
r
,
rC
,
R
>
())
{
XT
::
Functions
::
visualize
(
discrete_function
,
discrete_function
.
space
().
grid_view
(),
path
,
subsampling
,
vtk_output_type
,
param
,
visualizer
);
}
template
<
class
V
,
class
GV
,
class
R
>
void
visualize_gradient
(
const
ConstDiscreteFunction
<
V
,
GV
,
1
,
1
,
R
>&
discrete_function
,
const
std
::
string
path
,
const
bool
subsampling
=
true
,
const
VTK
::
OutputType
vtk_output_type
=
VTK
::
appendedraw
,
const
XT
::
Common
::
Parameter
&
param
=
{},
const
XT
::
Functions
::
VisualizerInterface
<
GV
::
dimension
,
1
,
R
>&
visualizer
=
XT
::
Functions
::
default_visualizer
<
GV
::
dimension
,
1
,
R
>
())
{
XT
::
Functions
::
visualize_gradient
(
discrete_function
,
discrete_function
.
space
().
grid_view
(),
path
,
subsampling
,
vtk_output_type
,
param
,
visualizer
);
}
// ... visualize_gradient(...)
}
// namespace GDT
}
// namespace Dune
...
...
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