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
20e77595
Commit
20e77595
authored
4 years ago
by
podlesny
Browse files
Options
Downloads
Patches
Plain Diff
print regularity truncation info
parent
2c83d1c7
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/tectonic/utils/debugutils.hh
+28
-0
28 additions, 0 deletions
dune/tectonic/utils/debugutils.hh
with
28 additions
and
0 deletions
dune/tectonic/utils/debugutils.hh
+
28
−
0
View file @
20e77595
...
@@ -14,6 +14,34 @@
...
@@ -14,6 +14,34 @@
//using namespace std;
//using namespace std;
template
<
class
Friction
,
typename
VectorType
>
void
printRegularityTruncation
(
const
Friction
&
friction
,
const
VectorType
&
x
,
double
truncationTolerance
=
1e8
)
{
using
BitVector
=
Dune
::
BitSetVector
<
MY_DIM
>
;
BitVector
truncationFlags
(
x
.
size
());
truncationFlags
.
unsetAll
();
size_t
count
=
0
;
size_t
vsmall
=
0
;
for
(
size_t
i
=
0
;
i
<
x
.
size
();
++
i
)
{
//std::cout << f_.phi().regularity(i, x[i]) << " xnorm: " << x[i].two_norm() << std::endl;
auto
tangential_x
=
x
[
i
];
tangential_x
[
0
]
=
0.0
;
if
(
tangential_x
.
two_norm
()
<
1e-14
)
{
vsmall
++
;
}
if
(
friction
.
regularity
(
i
,
x
[
i
])
>
truncationTolerance
)
{
count
++
;
}
}
std
::
cout
<<
"V<1e-14: "
<<
vsmall
<<
" regularityTruncation: "
<<
count
<<
std
::
endl
;
}
template
<
typename
VectorType
>
template
<
typename
VectorType
>
auto
average
(
const
VectorType
&
vec
)
{
auto
average
(
const
VectorType
&
vec
)
{
using
BlockType
=
typename
VectorType
::
block_type
;
using
BlockType
=
typename
VectorType
::
block_type
;
...
...
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