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
ed72c55c
Commit
ed72c55c
authored
12 years ago
by
Elias Pipping
Committed by
Elias Pipping
12 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Do not hardcode the boundary
parent
e020f9ad
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
+10
-10
10 additions, 10 deletions
src/one-body-sample.cc
with
10 additions
and
10 deletions
src/one-body-sample.cc
+
10
−
10
View file @
ed72c55c
...
@@ -74,11 +74,12 @@
...
@@ -74,11 +74,12 @@
int
const
dim
=
DIM
;
int
const
dim
=
DIM
;
template
<
class
GridView
>
template
<
class
GridView
,
class
GridCorner
>
void
setup_boundary
(
GridView
const
&
gridView
,
void
setup_boundary
(
GridView
const
&
gridView
,
Dune
::
BitSetVector
<
dim
>
&
ignoreNodes
,
Dune
::
BitSetVector
<
dim
>
&
ignoreNodes
,
Dune
::
BitSetVector
<
1
>
&
neumannNodes
,
Dune
::
BitSetVector
<
1
>
&
neumannNodes
,
Dune
::
BitSetVector
<
1
>
&
frictionalNodes
)
{
Dune
::
BitSetVector
<
1
>
&
frictionalNodes
,
GridCorner
const
&
lowerLeft
,
GridCorner
const
&
upperRight
)
{
typedef
typename
GridView
::
template
Codim
<
dim
>
::
Iterator
VertexLeafIterator
;
typedef
typename
GridView
::
template
Codim
<
dim
>
::
Iterator
VertexLeafIterator
;
Dune
::
MultipleCodimMultipleGeomTypeMapper
<
Dune
::
MultipleCodimMultipleGeomTypeMapper
<
...
@@ -88,17 +89,15 @@ void setup_boundary(GridView const &gridView,
...
@@ -88,17 +89,15 @@ void setup_boundary(GridView const &gridView,
it
!=
gridView
.
template
end
<
dim
>();
++
it
)
{
it
!=
gridView
.
template
end
<
dim
>();
++
it
)
{
assert
(
it
->
geometry
().
corners
()
==
1
);
assert
(
it
->
geometry
().
corners
()
==
1
);
Dune
::
FieldVector
<
double
,
dim
>
const
coordinates
=
it
->
geometry
().
corner
(
0
);
Dune
::
FieldVector
<
double
,
dim
>
const
coordinates
=
it
->
geometry
().
corner
(
0
);
if
(
coordinates
[
1
]
==
1
)
{
size_t
const
id
=
myVertexMapper
.
map
(
*
it
);
size_t
const
id
=
myVertexMapper
.
map
(
*
it
);
if
(
coordinates
[
1
]
==
upperRight
[
1
])
ignoreNodes
[
id
]
=
true
;
ignoreNodes
[
id
]
=
true
;
}
else
if
(
coordinates
[
1
]
==
0
)
{
else
if
(
coordinates
[
1
]
==
lowerLeft
[
1
])
{
size_t
const
id
=
myVertexMapper
.
map
(
*
it
);
frictionalNodes
[
id
]
=
true
;
frictionalNodes
[
id
]
=
true
;
ignoreNodes
[
id
][
1
]
=
true
;
// Zero displacement in direction y
ignoreNodes
[
id
][
1
]
=
true
;
// Zero displacement in direction y
}
else
if
(
coordinates
[
0
]
==
0
||
coordinates
[
0
]
==
1
)
{
}
else
if
(
coordinates
[
0
]
==
lowerLeft
[
0
]
||
size_t
const
id
=
myVertexMapper
.
map
(
*
it
);
coordinates
[
0
]
==
upperRight
[
0
])
neumannNodes
[
id
]
=
true
;
neumannNodes
[
id
]
=
true
;
}
}
}
}
}
...
@@ -182,7 +181,8 @@ int main(int argc, char *argv[]) {
...
@@ -182,7 +181,8 @@ int main(int argc, char *argv[]) {
Dune
::
BitSetVector
<
dim
>
ignoreNodes
(
finestSize
,
false
);
Dune
::
BitSetVector
<
dim
>
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
);
setup_boundary
(
leafView
,
ignoreNodes
,
neumannNodes
,
frictionalNodes
);
setup_boundary
(
leafView
,
ignoreNodes
,
neumannNodes
,
frictionalNodes
,
lowerLeft
,
upperRight
);
auto
const
nodalIntegrals
=
auto
const
nodalIntegrals
=
assemble_frictional
<
GridType
,
GridView
,
SmallVector
,
P1Basis
>
(
assemble_frictional
<
GridType
,
GridView
,
SmallVector
,
P1Basis
>
(
...
...
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