Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F82949140
material_phasefield.cc
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Sep 14, 09:30
Size
3 KB
Mime Type
text/x-c++
Expires
Mon, Sep 16, 09:30 (2 d)
Engine
blob
Format
Raw Data
Handle
20778740
Attached To
rAKA akantu
material_phasefield.cc
View Options
/**
* @file material_phasefield.cc
*
* @author Mohit Pundir <mohit.pundir@epfl.ch>
*
* @date creation: Mon Dec 13 2010
* @date last modification: Fri Apr 02 2021
*
* @brief Specialization of the material class for the phasefield material
*
*
* @section LICENSE
*
* Copyright (©) 2010-2021 EPFL (Ecole Polytechnique Fédérale de Lausanne)
* Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
*
* Akantu is free software: you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free
* Software Foundation, either version 3 of the License, or (at your option) any
* later version.
*
* Akantu is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
* A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Akantu. If not, see <http://www.gnu.org/licenses/>.
*
*/
/* -------------------------------------------------------------------------- */
#include "material_phasefield.hh"
#include "aka_common.hh"
#include "solid_mechanics_model.hh"
namespace
akantu
{
/* -------------------------------------------------------------------------- */
template
<
Int
dim
>
MaterialPhaseField
<
dim
>::
MaterialPhaseField
(
SolidMechanicsModel
&
model
,
const
ID
&
id
)
:
Parent
(
model
,
id
),
effective_damage
(
"effective_damage"
,
*
this
)
{
this
->
registerParam
(
"eta"
,
eta
,
Real
(
0.
),
_pat_parsable
,
"eta"
);
this
->
damage
.
initialize
(
0
);
this
->
effective_damage
.
initialize
(
1
);
}
template
<
Int
dim
>
void
MaterialPhaseField
<
dim
>::
computeStress
(
ElementType
el_type
,
GhostType
ghost_type
)
{
computeEffectiveDamage
(
el_type
,
ghost_type
);
for
(
auto
&&
args
:
getArguments
(
el_type
,
ghost_type
))
{
computeStressOnQuad
(
args
);
}
}
/* -------------------------------------------------------------------------- */
template
<
Int
dim
>
void
MaterialPhaseField
<
dim
>::
computeTangentModuli
(
ElementType
el_type
,
Array
<
Real
>
&
tangent_matrix
,
GhostType
ghost_type
)
{
computeEffectiveDamage
(
el_type
,
ghost_type
);
for
(
auto
&&
args
:
getArgumentsTangent
(
tangent_matrix
,
el_type
,
ghost_type
))
{
computeTangentModuliOnQuad
(
args
);
}
}
/* -------------------------------------------------------------------------- */
template
<
Int
dim
>
void
MaterialPhaseField
<
dim
>::
computeEffectiveDamage
(
ElementType
el_type
,
GhostType
ghost_type
)
{
for
(
auto
&&
args
:
getArguments
(
el_type
,
ghost_type
))
{
computeEffectiveDamageOnQuad
(
args
);
}
}
/* -------------------------------------------------------------------------- */
template
class
MaterialPhaseField
<
1
>
;
template
class
MaterialPhaseField
<
2
>
;
template
class
MaterialPhaseField
<
3
>
;
static
bool
material_is_allocated_phasefield
=
instantiateMaterial
<
MaterialPhaseField
>
(
"phasefield"
);
}
// namespace akantu
Event Timeline
Log In to Comment