Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-microstructure
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
Klaus Böhnlein
dune-microstructure
Commits
838987bc
"dune/git@gitlab.mn.tu-dresden.de:osander/dune-gfe.git" did not exist on "8fd48a0224c66d80f7d9bb0bfc12dc62053e9563"
Commit
838987bc
authored
2 years ago
by
Klaus Böhnlein
Browse files
Options
Downloads
Patches
Plain Diff
Update EffectiveQuantitiesComputer
parent
3979c1bc
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dune/microstructure/EffectiveQuantitiesComputer.hh
+28
-15
28 additions, 15 deletions
dune/microstructure/EffectiveQuantitiesComputer.hh
src/Cell-Problem-New.cc
+2
-1
2 additions, 1 deletion
src/Cell-Problem-New.cc
with
30 additions
and
16 deletions
dune/microstructure/EffectiveQuantitiesComputer.hh
+
28
−
15
View file @
838987bc
...
...
@@ -28,28 +28,28 @@ class EffectiveQuantitiesComputer {
public:
static
const
int
dimworld
=
3
;
// static const int nCells = 4;
static
const
int
dim
=
Basis
::
GridView
::
dimension
;
using
Domain
=
typename
CorrectorComputer
<
Basis
,
Material
>::
Domain
;
using
Domain
=
typename
CorrectorComputer
<
Basis
,
Material
>::
Domain
;
using
VectorRT
=
typename
CorrectorComputer
<
Basis
,
Material
>::
VectorRT
;
using
MatrixRT
=
typename
CorrectorComputer
<
Basis
,
Material
>::
MatrixRT
;
using
Func2Tensor
=
typename
CorrectorComputer
<
Basis
,
Material
>::
Func2Tensor
;
using
FuncVector
=
typename
CorrectorComputer
<
Basis
,
Material
>::
FuncVector
;
using
VectorCT
=
typename
CorrectorComputer
<
Basis
,
Material
>::
VectorCT
;
using
HierarchicVectorView
=
typename
CorrectorComputer
<
Basis
,
Material
>::
HierarchicVectorView
;
using
Func2int
=
std
::
function
<
int
(
const
Domain
&
)
>
;
using
MatrixPhase
=
std
::
function
<
MatrixRT
(
const
int
&
)
>
;
protected:
CorrectorComputer
<
Basis
,
Material
>&
correctorComputer_
;
Func2Tensor
prestrain_
;
// Func2Tensor prestrain_;
MatrixPhase
prestrain_
;
const
Material
&
material_
;
// Func2int indicatorFunction_;
public:
VectorCT
B_load_TorusCV_
;
//<B, Chi>_L2
// FieldMatrix<double, dim, dim> Q_; //effective moduli <LF_i, F_j>_L2
...
...
@@ -96,14 +96,21 @@ public:
///////////////////////////////
// EffectiveQuantitiesComputer(CorrectorComputer<Basis,Material>& correctorComputer, Func2Tensor prestrain)
// : correctorComputer_(correctorComputer), prestrain_(prestrain)
// EffectiveQuantitiesComputer(CorrectorComputer<Basis,Material>& correctorComputer,
// Func2Tensor prestrain,
// const Material& material)
// : correctorComputer_(correctorComputer),
// prestrain_(prestrain),
// material_(material)
EffectiveQuantitiesComputer
(
CorrectorComputer
<
Basis
,
Material
>&
correctorComputer
,
Func2Tensor
prestrain
,
const
Material
&
material
)
:
correctorComputer_
(
correctorComputer
),
prestrain_
(
prestrain
),
material_
(
material
)
{
prestrain_
=
material_
.
getPrestrainFunction
();
// computePrestressLoadCV();
// computeEffectiveStrains();
// Q_ = 0;
...
...
@@ -156,8 +163,11 @@ public:
correctorComputer_
.
getCorr_phi3
()
};
auto
prestrainGVF
=
Dune
::
Functions
::
makeGridViewFunction
(
prestrain_
,
basis
.
gridView
());
auto
prestrainFunctional
=
localFunction
(
prestrainGVF
);
// auto prestrainGVF = Dune::Functions::makeGridViewFunction(prestrain_, basis.gridView());
// auto prestrainFunctional = localFunction(prestrainGVF);
auto
localIndicatorFunction
=
material_
.
getLocalIndicatorFunction
();
Q_
=
0
;
Bhat_
=
0
;
...
...
@@ -197,7 +207,8 @@ public:
// DerPhi2.bind(e);
mu
.
bind
(
e
);
lambda
.
bind
(
e
);
prestrainFunctional
.
bind
(
e
);
// prestrainFunctional.bind(e);
localIndicatorFunction
.
bind
(
e
);
double
elementEnergy
=
0.0
;
double
elementPrestrain
=
0.0
;
...
...
@@ -229,12 +240,14 @@ public:
auto
X1
=
G1
+
Chi1
;
// auto X2 = G2 + Chi2;
double
energyDensity
=
linearizedStVenantKirchhoffDensity
(
mu
(
quadPos
),
lambda
(
quadPos
),
X1
,
G2
);
double
energyDensity
=
scalarProduct
(
material_
.
ElasticityTensor
(
X1
,
localIndicatorFunction
(
quadPos
)),
sym
(
G2
));
//
double energyDensity = linearizedStVenantKirchhoffDensity(mu(quadPos), lambda(quadPos), X1, G2);
elementEnergy
+=
energyDensity
*
quadPoint
.
weight
()
*
integrationElement
;
// quad[quadPoint].weight() ???
if
(
b
==
0
)
{
elementPrestrain
+=
linearizedStVenantKirchhoffDensity
(
mu
(
quadPos
),
lambda
(
quadPos
),
X1
,
prestrainFunctional
(
quadPos
))
*
quadPoint
.
weight
()
*
integrationElement
;
auto
prestrainPhaseValue
=
prestrain_
(
localIndicatorFunction
(
quadPos
));
elementPrestrain
+=
scalarProduct
(
material_
.
ElasticityTensor
(
X1
,
localIndicatorFunction
(
quadPos
)),
sym
(
prestrainPhaseValue
));
// elementPrestrain += linearizedStVenantKirchhoffDensity(mu(quadPos), lambda(quadPos), X1, prestrainFunctional(quadPos)) * quadPoint.weight() * integrationElement;
}
}
energy
+=
elementEnergy
;
...
...
This diff is collapsed.
Click to expand it.
src/Cell-Problem-New.cc
+
2
−
1
View file @
838987bc
...
...
@@ -591,7 +591,8 @@ int main(int argc, char *argv[])
//--- compute effective quantities
auto
effectiveQuantitiesComputer
=
EffectiveQuantitiesComputer
(
correctorComputer
,
B_Term
,
material_
);
// auto effectiveQuantitiesComputer = EffectiveQuantitiesComputer(correctorComputer,B_Term,material_);
auto
effectiveQuantitiesComputer
=
EffectiveQuantitiesComputer
(
correctorComputer
,
material_
);
effectiveQuantitiesComputer
.
computeEffectiveQuantities
();
...
...
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