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
473b833b
Commit
473b833b
authored
4 years ago
by
podlesny
Browse files
Options
Downloads
Patches
Plain Diff
debug print
parent
6e860577
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/spatial-solving/tnnmg/linearization.hh
+12
-1
12 additions, 1 deletion
dune/tectonic/spatial-solving/tnnmg/linearization.hh
with
12 additions
and
1 deletion
dune/tectonic/spatial-solving/tnnmg/linearization.hh
+
12
−
1
View file @
473b833b
...
@@ -52,7 +52,7 @@ class Linearization {
...
@@ -52,7 +52,7 @@ class Linearization {
}
}
}
}
//
std::cout << "regularityTruncation: " << count << std::endl;
std
::
cout
<<
"regularityTruncation: "
<<
count
<<
std
::
endl
;
}
}
template
<
class
NV
,
class
NBV
,
class
T
>
template
<
class
NV
,
class
NBV
,
class
T
>
...
@@ -121,6 +121,7 @@ class Linearization {
...
@@ -121,6 +121,7 @@ class Linearization {
BitVector
obstacleTruncationFlags
=
ignore_
;
BitVector
obstacleTruncationFlags
=
ignore_
;
BitVector
regularityTruncationFlags
=
ignore_
;
BitVector
regularityTruncationFlags
=
ignore_
;
//regularityTruncationFlags.unsetAll();
//std::cout << "ignore truncation: " << truncationFlags_.count();
//std::cout << "ignore truncation: " << truncationFlags_.count();
determineTruncation
(
x
,
f_
.
lowerObstacle
(),
f_
.
upperObstacle
(),
obstacleTruncationFlags
,
obstacleTruncationTolerance_
);
// obstacle truncation
determineTruncation
(
x
,
f_
.
lowerObstacle
(),
f_
.
upperObstacle
(),
obstacleTruncationFlags
,
obstacleTruncationTolerance_
);
// obstacle truncation
...
@@ -177,11 +178,13 @@ class Linearization {
...
@@ -177,11 +178,13 @@ class Linearization {
// nonlinearity part
// nonlinearity part
phi
.
addHessian
(
x
,
hessian_
);
phi
.
addHessian
(
x
,
hessian_
);
//truncateMatrix(hessian_, regularityTruncationFlags, regularityTruncationFlags);
//truncateMatrix(hessian_, regularityTruncationFlags, regularityTruncationFlags);
//std::cout << x[0] << " " << hessian_[0][0] << std::endl;
//std::cout << x[0] << " " << hessian_[0][0] << std::endl;
B
-=
hessian_
;
B
-=
hessian_
;
//truncateMatrix(B, regularityTruncationFlags, regularityTruncationFlags);
//print(B, "phi hessian: ");
//print(B, "phi hessian: ");
// compute gradient
// compute gradient
...
@@ -198,6 +201,14 @@ class Linearization {
...
@@ -198,6 +201,14 @@ class Linearization {
phi
.
addGradient
(
x
,
negativeGradient_
);
phi
.
addGradient
(
x
,
negativeGradient_
);
C
-=
negativeGradient_
;
C
-=
negativeGradient_
;
//truncateVector(C, truncationFlags_);
/*for (size_t i=0; i<C.size(); i++) {
std::cout << "dof " << i << std::endl;
std::cout << "truncation: " << regularityTruncationFlags[i] << std::endl;
std::cout << "C[i]: " << C[i] << std::endl;
}*/
//print(truncationFlags_, "truncationFlags_: ");
//print(C, "phi gradient: ");
//print(C, "phi gradient: ");
// -grad is needed for Newton step
// -grad is needed for Newton step
...
...
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