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
3f4037c8
Commit
3f4037c8
authored
16 years ago
by
Oliver Sander
Committed by
sander@PCPOOL.MI.FU-BERLIN.DE
16 years ago
Browse files
Options
Downloads
Patches
Plain Diff
add method getStress
[[Imported from SVN: r2303]]
parent
8c3b21ee
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/rodassembler.cc
+23
-1
23 additions, 1 deletion
src/rodassembler.cc
src/rodassembler.hh
+3
-0
3 additions, 0 deletions
src/rodassembler.hh
with
26 additions
and
1 deletion
src/rodassembler.cc
+
23
−
1
View file @
3f4037c8
...
...
@@ -1062,6 +1062,27 @@ getStrain(const std::vector<Configuration>& sol,
}
template
<
class
GridType
>
void
RodAssembler
<
GridType
>::
getStress
(
const
std
::
vector
<
Configuration
>&
sol
,
Dune
::
BlockVector
<
Dune
::
FieldVector
<
double
,
blocksize
>
>&
stress
)
const
{
// Get the strain
getStrain
(
sol
,
stress
);
// Get reference strain
Dune
::
BlockVector
<
Dune
::
FieldVector
<
double
,
blocksize
>
>
referenceStrain
;
getStrain
(
referenceConfiguration_
,
referenceStrain
);
// Linear diagonal constitutive law
for
(
size_t
i
=
0
;
i
<
stress
.
size
();
i
++
)
{
for
(
int
j
=
0
;
j
<
3
;
j
++
)
{
stress
[
i
][
j
]
=
(
stress
[
i
][
j
]
-
referenceStrain
[
i
][
j
])
*
A_
[
j
];
stress
[
i
][
j
+
3
]
=
(
stress
[
i
][
j
+
3
]
-
referenceStrain
[
i
][
j
+
3
])
*
K_
[
j
];
}
}
}
template
<
class
GridType
>
Dune
::
FieldVector
<
double
,
3
>
RodAssembler
<
GridType
>::
getResultantForce
(
const
BoundaryPatch
<
GridType
>&
boundary
,
...
...
@@ -1142,7 +1163,8 @@ getResultantForce(const BoundaryPatch<GridType>& boundary,
// assert( std::abs(localStress[2]-canonicalStress*sol[0].q.director(2)) < 1e-6 );
// Multiply force times boundary normal to get the transmitted force
// I am not quite sure why the -1 is there, but it has to be there.
/** \todo The minus sign comes from the coupling conditions. It
should really be in the Dirichlet-Neumann code. */
canonicalStress
*=
-
nIt
->
unitOuterNormal
(
FieldVector
<
double
,
0
>
(
0
))[
0
];
canonicalTorque
*=
-
nIt
->
unitOuterNormal
(
FieldVector
<
double
,
0
>
(
0
))[
0
];
...
...
This diff is collapsed.
Click to expand it.
src/rodassembler.hh
+
3
−
0
View file @
3f4037c8
...
...
@@ -259,6 +259,9 @@ public:
void
getStrain
(
const
std
::
vector
<
Configuration
>&
sol
,
Dune
::
BlockVector
<
Dune
::
FieldVector
<
double
,
blocksize
>
>&
strain
)
const
;
void
getStress
(
const
std
::
vector
<
Configuration
>&
sol
,
Dune
::
BlockVector
<
Dune
::
FieldVector
<
double
,
blocksize
>
>&
stress
)
const
;
/** \brief Return resultant force across boundary in canonical coordinates
\note Linear run-time in the size of the grid */
...
...
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