Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-fufem
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
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
akbib
dune-fufem
Commits
7dc455a5
Commit
7dc455a5
authored
Feb 10, 2014
by
Elias Pipping
Committed by
pipping
Feb 10, 2014
Browse files
Options
Downloads
Patches
Plain Diff
Add viscosity assembler with variable coefficients
[[Imported from SVN: r12873]]
parent
88ace340
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
dune/fufem/assemblers/localassemblers/variablecoefficientviscosityassembler.hh
+55
-0
55 additions, 0 deletions
.../localassemblers/variablecoefficientviscosityassembler.hh
with
55 additions
and
0 deletions
dune/fufem/assemblers/localassemblers/variablecoefficientviscosityassembler.hh
0 → 100644
+
55
−
0
View file @
7dc455a5
#ifndef VARIABLE_COEFFICIENT_VISCOSITY_ASSEMBLER_HH
#define VARIABLE_COEFFICIENT_VISCOSITY_ASSEMBLER_HH
#include
"dune/fufem/assemblers/localassemblers/strainproductassembler.hh"
#include
"dune/fufem/functions/analyticgridfunction.hh"
#include
"dune/fufem/symmetrictensor.hh"
/** \brief Local assembler for the viscous part of the linear visco-elastic Kelvin-Voigt material. With variable coefficients. */
template
<
class
GridType
,
class
TrialLocalFE
,
class
AnsatzLocalFE
,
class
FunctionType
>
class
VariableCoefficientViscosityAssembler
:
public
StrainProductAssembler
<
GridType
,
TrialLocalFE
,
AnsatzLocalFE
,
VariableCoefficientViscosityAssembler
<
GridType
,
TrialLocalFE
,
AnsatzLocalFE
,
FunctionType
>
>
{
private:
typedef
StrainProductAssembler
<
GridType
,
TrialLocalFE
,
AnsatzLocalFE
,
VariableCoefficientViscosityAssembler
<
GridType
,
TrialLocalFE
,
AnsatzLocalFE
,
FunctionType
>
>
SPA
;
using
SPA
::
dim
;
using
typename
SPA
::
ctype
;
typedef
typename
FunctionType
::
RangeType
RangeType
;
typedef
VirtualGridFunction
<
GridType
,
RangeType
>
GridFunction
;
public:
using
typename
SPA
::
T
;
using
typename
SPA
::
BoolMatrix
;
using
typename
SPA
::
Element
;
using
typename
SPA
::
LocalMatrix
;
VariableCoefficientViscosityAssembler
(
const
GridType
&
grid
,
const
FunctionType
&
muShear
,
const
FunctionType
&
muBulk
,
const
QuadratureRuleKey
&
muShearKey
,
const
QuadratureRuleKey
&
muBulkKey
)
:
SPA
(
muShearKey
.
sum
(
muBulkKey
)),
muShearGridFunctionP_
(
makeGridFunction
(
grid
,
muShear
)),
muBulkGridFunctionP_
(
makeGridFunction
(
grid
,
muBulk
))
{}
SymmetricTensor
<
dim
>
strainToStress
(
const
SymmetricTensor
<
dim
>&
strain
,
const
Element
&
element
,
const
Dune
::
FieldVector
<
ctype
,
dim
>&
position
)
const
{
RangeType
muBulk
;
muBulkGridFunctionP_
->
evaluateLocal
(
element
,
position
,
muBulk
);
RangeType
muShear
;
muShearGridFunctionP_
->
evaluateLocal
(
element
,
position
,
muShear
);
SymmetricTensor
<
dim
>
stress
=
strain
;
stress
*=
2
*
muShear
;
stress
.
addToDiag
((
muBulk
-
(
2.0
/
3.0
)
*
muShear
)
*
strain
.
trace
());
return
stress
;
}
protected
:
Dune
::
shared_ptr
<
const
GridFunction
>
muShearGridFunctionP_
;
Dune
::
shared_ptr
<
const
GridFunction
>
muBulkGridFunctionP_
;
};
#endif
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