Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-tectonic
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
podlesny
dune-tectonic
Commits
98537fc8
Commit
98537fc8
authored
13 years ago
by
Elias Pipping
Committed by
Elias Pipping
13 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Remove obsolete copy of vtkgridfunction.hh
parent
9aaf8b39
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dune/vtkgridfunction.hh
+0
-77
0 additions, 77 deletions
dune/vtkgridfunction.hh
with
0 additions
and
77 deletions
dune/vtkgridfunction.hh
deleted
100644 → 0
+
0
−
77
View file @
9aaf8b39
// -*- c-basic-offset:4 tab-width:4 -*-
#ifndef VTK_BASIS_GRID_FUNCTION_HH
#define VTK_BASIS_GRID_FUNCTION_HH
#include
<dune/grid/io/file/vtk/function.hh>
/** \brief A VTK basis grid function.
*
* This function "evaluates" by evaluating the global basis and
*interpolating the function values.
* \tparam Basis The global basis.
* \tparam CoefficientType The vector type for the coefficients.
*/
template
<
class
Basis
,
class
CoefficientType
>
class
VTKBasisGridFunction
:
public
VTKFunction
<
typename
Basis
::
GridView
>
{
typedef
VTKFunction
<
typename
Basis
::
GridView
>
Base
;
typedef
typename
Basis
::
LocalFiniteElement
::
Traits
::
LocalBasisType
::
Traits
::
RangeType
RangeType
;
public:
typedef
typename
Base
::
Entity
Entity
;
typedef
typename
Base
::
ctype
ctype
;
using
Base
::
dim
;
/** \brief Construct from given global basis, coefficient vector and name.
*
* \param basis The global basis.
* \param v A corresponding vector of coefficients.
* \param s A name of the function.
*/
VTKBasisGridFunction
(
const
Basis
&
basis
,
const
CoefficientType
&
v
,
const
std
::
string
&
s
)
:
basis_
(
basis
),
coeffs_
(
v
),
s_
(
s
)
{
if
(
v
.
size
()
!=
basis_
.
size
())
DUNE_THROW
(
IOError
,
"VTKGridFunction: Coefficient vector is not matching the basis"
);
}
/** \brief Get the number of components the function has. */
virtual
int
ncomps
()
const
{
return
CoefficientType
::
block_type
::
dimension
;
}
/** \brief Locally evaluate a component of the function.
*
* \param comp The component to evaluate.
* \param e The element the local coordinates are taken from.
* \param xi The local coordinates where to evaluate the function.
*/
virtual
double
evaluate
(
int
comp
,
const
Entity
&
e
,
const
Dune
::
FieldVector
<
ctype
,
dim
>
&
xi
)
const
{
// evaluate the local shapefunctions
const
typename
Basis
::
LocalFiniteElement
&
localFE
=
basis_
.
getLocalFiniteElement
(
e
);
std
::
vector
<
RangeType
>
values
(
localFE
.
localBasis
().
size
());
localFE
.
localBasis
().
evaluateFunction
(
xi
,
values
);
// get the comp'th component
double
rt
=
0
;
for
(
int
i
=
0
;
i
<
localFE
.
localBasis
().
size
();
i
++
)
rt
+=
values
[
i
]
*
coeffs_
[
basis_
.
index
(
e
,
i
)][
comp
];
return
rt
;
}
/** \brief Stupid function to return the name. */
virtual
std
::
string
name
()
const
{
return
s_
;
}
/** \brief Destructor. */
virtual
~
VTKBasisGridFunction
()
{}
private
:
const
Basis
&
basis_
;
const
CoefficientType
&
coeffs_
;
std
::
string
s_
;
};
#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