Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-xt
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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-xt
Commits
6fcebf71
Commit
6fcebf71
authored
9 years ago
by
Dr. Felix Tobias Schindler
Browse files
Options
Downloads
Patches
Plain Diff
drop all references to old LA stuff
parent
1ef6b372
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/xt/functions/ESV2007.hh
+24
-22
24 additions, 22 deletions
dune/xt/functions/ESV2007.hh
with
24 additions
and
22 deletions
dune/xt/functions/ESV2007.hh
+
24
−
22
View file @
6fcebf71
...
...
@@ -23,7 +23,7 @@
#include
<dune/xt/common/configuration.hh>
#include
<dune/xt/common/debug.hh>
#include
<dune/xt/common/ranges.hh>
#include
<dune/xt/la/container/eigen.hh>
//
#include <dune/xt/la/container/eigen.hh>
#include
"interfaces.hh"
...
...
@@ -477,29 +477,31 @@ class Cutoff
{
static
RangeFieldType
min_eigenvalue_of
(
const
DT
&
diffusion_tensor
,
const
EntityType
&
ent
)
{
#if !HAVE_EIGEN
static_assert
(
AlwaysFalse
<
DT
>::
value
,
"You are missing eigen!"
);
#else
const
auto
local_diffusion_tensor
=
diffusion_tensor
.
local_function
(
ent
);
assert
(
local_diffusion_tensor
->
order
()
==
0
);
const
auto
&
reference_element
=
ReferenceElements
<
DomainFieldType
,
dimDomain
>::
general
(
ent
.
type
());
const
Stuff
::
LA
::
EigenDenseMatrix
<
RangeFieldType
>
tensor
=
local_diffusion_tensor
->
evaluate
(
reference_element
.
position
(
0
,
0
));
::
Eigen
::
EigenSolver
<
typename
Stuff
::
LA
::
EigenDenseMatrix
<
RangeFieldType
>::
BackendType
>
eigen_solver
(
tensor
.
backend
());
assert
(
eigen_solver
.
info
()
==
::
Eigen
::
Success
);
const
auto
eigenvalues
=
eigen_solver
.
eigenvalues
();
// <- this should be an Eigen vector of std::complex
//#if !HAVE_EIGEN
// static_assert(AlwaysFalse<DT>::value, "You are missing eigen!");
//#else
// const auto local_diffusion_tensor = diffusion_tensor.local_function(ent);
// assert(local_diffusion_tensor->order() == 0);
// const auto& reference_element = ReferenceElements<DomainFieldType, dimDomain>::general(ent.type());
// const LA::EigenDenseMatrix<RangeFieldType> tensor =
// local_diffusion_tensor->evaluate(reference_element.position(0, 0));
// ::Eigen::EigenSolver<typename LA::EigenDenseMatrix<RangeFieldType>::BackendType> eigen_solver(
// tensor.backend());
DUNE_THROW
(
NotImplemented
,
"missing LA"
);
// assert(eigen_solver.info() == ::Eigen::Success);
// const auto eigenvalues = eigen_solver.eigenvalues(); // <- this should be an Eigen vector of
// std::complex
RangeFieldType
min_ev
=
std
::
numeric_limits
<
RangeFieldType
>::
max
();
for
(
size_t
ii
=
0
;
ii
<
boost
::
numeric_cast
<
size_t
>
(
eigenvalues
.
size
());
++
ii
)
{
// assert this is real
assert
(
std
::
abs
(
eigenvalues
[
ii
].
imag
())
<
1e-15
);
// assert that this eigenvalue is positive
const
RangeFieldType
eigenvalue
=
eigenvalues
[
ii
].
real
();
assert
(
eigenvalue
>
1e-15
);
min_ev
=
std
::
min
(
min_ev
,
eigenvalue
);
}
//
for (size_t ii = 0; ii < boost::numeric_cast<size_t>(eigenvalues.size()); ++ii) {
//
// assert this is real
//
assert(std::abs(eigenvalues[ii].imag()) < 1e-15);
//
// assert that this eigenvalue is positive
//
const RangeFieldType eigenvalue = eigenvalues[ii].real();
//
assert(eigenvalue > 1e-15);
//
min_ev = std::min(min_ev, eigenvalue);
//
}
return
min_ev
;
#endif // HAVE_EIGEN
//
#endif
// HAVE_EIGEN
}
// ... min_eigenvalue_of_(...)
};
// class Compute< ..., d, d >
...
...
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