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
6e7f46a6
Commit
6e7f46a6
authored
12 years ago
by
Elias Pipping
Committed by
Elias Pipping
12 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Plot all data with their coordinates
parent
16e4d65d
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
src/one-body-sample.cc
+24
-19
24 additions, 19 deletions
src/one-body-sample.cc
with
24 additions
and
19 deletions
src/one-body-sample.cc
+
24
−
19
View file @
6e7f46a6
...
@@ -188,7 +188,6 @@ int main(int argc, char *argv[]) {
...
@@ -188,7 +188,6 @@ int main(int argc, char *argv[]) {
P1Basis
const
p1Basis
(
leafView
);
P1Basis
const
p1Basis
(
leafView
);
// Set up the boundary
// Set up the boundary
size_t
specialNode
=
finestSize
;
Dune
::
BitSetVector
<
dims
>
ignoreNodes
(
finestSize
,
false
);
Dune
::
BitSetVector
<
dims
>
ignoreNodes
(
finestSize
,
false
);
Dune
::
BitSetVector
<
1
>
neumannNodes
(
finestSize
,
false
);
Dune
::
BitSetVector
<
1
>
neumannNodes
(
finestSize
,
false
);
Dune
::
BitSetVector
<
1
>
frictionalNodes
(
finestSize
,
false
);
Dune
::
BitSetVector
<
1
>
frictionalNodes
(
finestSize
,
false
);
...
@@ -204,10 +203,6 @@ int main(int argc, char *argv[]) {
...
@@ -204,10 +203,6 @@ int main(int argc, char *argv[]) {
coordinates
[
id
]
=
it
->
geometry
().
corner
(
0
);
coordinates
[
id
]
=
it
->
geometry
().
corner
(
0
);
auto
const
&
localCoordinates
=
coordinates
[
id
];
auto
const
&
localCoordinates
=
coordinates
[
id
];
// Find the lower left corner
if
(
localCoordinates
==
lowerLeft
)
specialNode
=
id
;
// lower face
// lower face
if
(
localCoordinates
[
1
]
==
lowerLeft
[
1
])
{
if
(
localCoordinates
[
1
]
==
lowerLeft
[
1
])
{
frictionalNodes
[
id
]
=
true
;
frictionalNodes
[
id
]
=
true
;
...
@@ -226,9 +221,6 @@ int main(int argc, char *argv[]) {
...
@@ -226,9 +221,6 @@ int main(int argc, char *argv[]) {
else
if
(
localCoordinates
[
0
]
==
lowerLeft
[
0
])
else
if
(
localCoordinates
[
0
]
==
lowerLeft
[
0
])
;
;
}
}
// Make sure that specialNode was set and points to a frictional node
assert
(
specialNode
!=
finestSize
);
assert
(
frictionalNodes
[
specialNode
][
0
]);
};
};
// Set up functions for time-dependent boundary conditions
// Set up functions for time-dependent boundary conditions
...
@@ -320,10 +312,16 @@ int main(int argc, char *argv[]) {
...
@@ -320,10 +312,16 @@ int main(int argc, char *argv[]) {
Solver
::
VerbosityMode
const
verbosity
=
Solver
::
VerbosityMode
const
verbosity
=
parset
.
get
<
bool
>
(
"verbose"
)
?
Solver
::
FULL
:
Solver
::
QUIET
;
parset
.
get
<
bool
>
(
"verbose"
)
?
Solver
::
FULL
:
Solver
::
QUIET
;
std
::
fstream
state_writer
(
"state"
,
std
::
fstream
::
out
);
std
::
fstream
coordinate_writer
(
"coordinates"
,
std
::
fstream
::
out
);
std
::
fstream
displacement_writer
(
"displacement"
,
std
::
fstream
::
out
);
for
(
size_t
i
=
0
;
i
<
frictionalNodes
.
size
();
++
i
)
std
::
fstream
velocity_writer
(
"velocity"
,
std
::
fstream
::
out
);
if
(
frictionalNodes
[
i
][
0
])
std
::
fstream
coefficient_writer
(
"coefficient"
,
std
::
fstream
::
out
);
coordinate_writer
<<
coordinates
[
i
]
<<
std
::
endl
;
coordinate_writer
.
close
();
std
::
fstream
state_writer
(
"states"
,
std
::
fstream
::
out
);
std
::
fstream
displacement_writer
(
"displacements"
,
std
::
fstream
::
out
);
std
::
fstream
velocity_writer
(
"velocities"
,
std
::
fstream
::
out
);
std
::
fstream
coefficient_writer
(
"coefficients"
,
std
::
fstream
::
out
);
;
;
auto
timeSteppingScheme
=
auto
timeSteppingScheme
=
...
@@ -419,13 +417,20 @@ int main(int argc, char *argv[]) {
...
@@ -419,13 +417,20 @@ int main(int argc, char *argv[]) {
std
::
cerr
<<
std
::
endl
;
std
::
cerr
<<
std
::
endl
;
;
;
state_writer
<<
alpha
[
specialNode
][
0
]
<<
" "
<<
std
::
endl
;
for
(
size_t
i
=
0
;
i
<
frictionalNodes
.
size
();
++
i
)
displacement_writer
<<
u
[
specialNode
][
0
]
<<
" "
<<
std
::
endl
;
if
(
frictionalNodes
[
i
][
0
])
{
velocity_writer
<<
ud
[
specialNode
][
0
]
<<
" "
<<
std
::
endl
;
state_writer
<<
alpha
[
i
][
0
]
<<
" "
;
coefficient_writer
<<
mu
+
a
*
std
::
log
(
ud
[
specialNode
].
two_norm
()
/
V0
)
+
displacement_writer
<<
u
[
i
][
0
]
<<
" "
;
b
*
(
alpha
[
specialNode
]
+
std
::
log
(
V0
/
L
))
velocity_writer
<<
ud
[
i
][
0
]
<<
" "
;
<<
" "
<<
std
::
endl
;
coefficient_writer
<<
mu
+
a
*
std
::
log
(
ud
[
i
].
two_norm
()
/
V0
)
+
;
b
*
(
alpha
[
i
]
+
std
::
log
(
V0
/
L
))
<<
" "
;
}
state_writer
<<
std
::
endl
;
displacement_writer
<<
std
::
endl
;
velocity_writer
<<
std
::
endl
;
coefficient_writer
<<
std
::
endl
;
if
(
parset
.
get
<
bool
>
(
"writeVTK"
))
{
if
(
parset
.
get
<
bool
>
(
"writeVTK"
))
{
SingletonVectorType
vonMisesStress
;
SingletonVectorType
vonMisesStress
;
VonMisesStressAssembler
<
GridType
>
localStressAssembler
(
VonMisesStressAssembler
<
GridType
>
localStressAssembler
(
...
...
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