Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-gfe
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
Sander, Oliver
dune-gfe
Commits
873fa08b
Commit
873fa08b
authored
17 years ago
by
Oliver Sander
Committed by
sander@PCPOOL.MI.FU-BERLIN.DE
17 years ago
Browse files
Options
Downloads
Patches
Plain Diff
make this work for interface which consist of more than a single segment
[[Imported from SVN: r1563]]
parent
22d62ce8
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/averageinterface.hh
+13
-5
13 additions, 5 deletions
src/averageinterface.hh
with
13 additions
and
5 deletions
src/averageinterface.hh
+
13
−
5
View file @
873fa08b
...
@@ -23,9 +23,13 @@ void computeAveragePressure(const Dune::FieldVector<double,GridType::dimension>&
...
@@ -23,9 +23,13 @@ void computeAveragePressure(const Dune::FieldVector<double,GridType::dimension>&
const
typename
GridType
::
Traits
::
LevelIndexSet
&
indexSet
=
grid
.
levelIndexSet
(
level
);
const
typename
GridType
::
Traits
::
LevelIndexSet
&
indexSet
=
grid
.
levelIndexSet
(
level
);
const
int
dim
=
GridType
::
dimension
;
const
int
dim
=
GridType
::
dimension
;
typedef
typename
GridType
::
ctype
ctype
;
typedef
typename
GridType
::
ctype
ctype
;
typedef
double
field_type
;
typedef
typename
GridType
::
template
Codim
<
dim
>
::
LevelIterator
VertexIterator
;
typedef
typename
GridType
::
template
Codim
<
dim
>
::
LevelIterator
VertexIterator
;
// Get total interface area
ctype
area
=
interface
.
area
();
// set up output array
// set up output array
DGIndexSet
<
GridType
>
dgIndexSet
(
grid
,
level
);
DGIndexSet
<
GridType
>
dgIndexSet
(
grid
,
level
);
dgIndexSet
.
setup
(
grid
,
level
);
dgIndexSet
.
setup
(
grid
,
level
);
...
@@ -45,8 +49,8 @@ void computeAveragePressure(const Dune::FieldVector<double,GridType::dimension>&
...
@@ -45,8 +49,8 @@ void computeAveragePressure(const Dune::FieldVector<double,GridType::dimension>&
if
(
!
interface
.
contains
(
*
eIt
,
nIt
))
if
(
!
interface
.
contains
(
*
eIt
,
nIt
))
continue
;
continue
;
const
Dune
::
LagrangeShapeFunctionSet
<
double
,
doubl
e
,
dim
-
1
>&
baseSet
const
Dune
::
LagrangeShapeFunctionSet
<
ctype
,
field_typ
e
,
dim
-
1
>&
baseSet
=
Dune
::
LagrangeShapeFunctions
<
double
,
doubl
e
,
dim
-
1
>::
general
(
nIt
.
intersectionGlobal
().
type
(),
1
);
=
Dune
::
LagrangeShapeFunctions
<
ctype
,
field_typ
e
,
dim
-
1
>::
general
(
nIt
.
intersectionGlobal
().
type
(),
1
);
if
(
baseSet
.
size
()
!=
4
)
if
(
baseSet
.
size
()
!=
4
)
DUNE_THROW
(
Dune
::
NotImplemented
,
"average interface only for quad faces"
);
DUNE_THROW
(
Dune
::
NotImplemented
,
"average interface only for quad faces"
);
...
@@ -113,9 +117,13 @@ void computeAveragePressure(const Dune::FieldVector<double,GridType::dimension>&
...
@@ -113,9 +117,13 @@ void computeAveragePressure(const Dune::FieldVector<double,GridType::dimension>&
Dune
::
FieldVector
<
double
,
12
>
u
;
Dune
::
FieldVector
<
double
,
12
>
u
;
Dune
::
FieldVector
<
double
,
6
>
b
;
Dune
::
FieldVector
<
double
,
6
>
b
;
// Scale the resultant force and torque with this segments area percentage.
// That way the resulting pressure gets distributed fairly uniformly.
ctype
segmentArea
=
nIt
.
intersectionGlobal
().
volume
()
/
area
;
for
(
int
i
=
0
;
i
<
3
;
i
++
)
{
for
(
int
i
=
0
;
i
<
3
;
i
++
)
{
b
[
i
]
=
resultantForce
[
i
];
b
[
i
]
=
resultantForce
[
i
]
*
segmentArea
;
b
[
i
+
3
]
=
resultantTorque
[
i
];
b
[
i
+
3
]
=
resultantTorque
[
i
]
*
segmentArea
;
}
}
// std::cout << b << std::endl;
// std::cout << b << std::endl;
...
@@ -333,7 +341,7 @@ void computeAverageInterface(const BoundaryPatch<GridType>& interface,
...
@@ -333,7 +341,7 @@ void computeAverageInterface(const BoundaryPatch<GridType>& interface,
// average deformation is the integral over the deformation gradient
// average deformation is the integral over the deformation gradient
// divided by its area
// divided by its area
deformationGradient
/=
interfaceArea
;
deformationGradient
/=
interfaceArea
;
std
::
cout
<<
"deformationGradient: "
<<
std
::
endl
<<
deformationGradient
<<
std
::
endl
;
//
std::cout << "deformationGradient: " << std::endl << deformationGradient << std::endl;
// Get the rotational part of the deformation gradient by performing a
// Get the rotational part of the deformation gradient by performing a
// polar composition.
// polar composition.
...
...
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