Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F66916165
material_anisotropic_damage.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
Tue, Jun 18, 20:56
Size
2 KB
Mime Type
text/x-c
Expires
Thu, Jun 20, 20:56 (2 d)
Engine
blob
Format
Raw Data
Handle
18315852
Attached To
rAKA akantu
material_anisotropic_damage.cc
View Options
/**
* Copyright (©) 2019-2023 EPFL (Ecole Polytechnique Fédérale de Lausanne)
* Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
*
* This file is part of Akantu
*
* 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_anisotropic_damage.hh"
/* -------------------------------------------------------------------------- */
namespace
akantu
{
/* -------------------------------------------------------------------------- */
const
bool
material_is_alocated_anisotropic_damage
[[
gnu
::
unused
]]
[[
maybe_unused
]]
=
MaterialFactory
::
getInstance
().
registerAllocator
(
"anisotropic_damage"
,
[](
Int
dim
,
const
ID
&
option
,
SolidMechanicsModel
&
model
,
const
ID
&
id
)
->
std
::
unique_ptr
<
Material
>
{
return
tuple_dispatch
<
AllSpatialDimensions
>
(
[
&
](
auto
&&
_
)
->
std
::
unique_ptr
<
Material
>
{
constexpr
auto
dim_
=
aka
::
decay_v
<
decltype
(
_
)
>
;
if
(
option
.
empty
()
or
option
==
"mazars"
)
{
return
std
::
make_unique
<
MaterialAnisotropicDamage
<
dim_
,
EquivalentStrainMazars
,
DamageThresholdTan
>>
(
model
,
id
);
}
if
(
option
==
"mazars-drucker-prager"
)
{
return
std
::
make_unique
<
MaterialAnisotropicDamage
<
dim_
,
EquivalentStrainMazarsDruckerPrager
,
DamageThresholdTan
>>
(
model
,
id
);
}
AKANTU_EXCEPTION
(
"The option "
<<
option
<<
" is not valid for the material "
<<
id
);
},
dim
);
});
}
// namespace akantu
Event Timeline
Log In to Comment