Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F65541774
mindlin.cpp
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 4, 13:17
Size
4 KB
Mime Type
text/x-c++
Expires
Thu, Jun 6, 13:17 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
18090822
Attached To
rTAMAAS tamaas
mindlin.cpp
View Options
/**
* @file
*
* @author Lucas Frérot <lucas.frerot@epfl.ch>
*
* @section LICENSE
*
* Copyright (©) 2017 EPFL (Ecole Polytechnique Fédérale de
* Lausanne) Laboratory (LSMS - Laboratoire de Simulation en Mécanique des
* Solides)
*
* Tamaas 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.
*
* Tamaas 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 Tamaas. If not, see <http://www.gnu.org/licenses/>.
*
*/
/* -------------------------------------------------------------------------- */
#include "mindlin.hh"
#include "boussinesq_helper.hh"
#include "elasto_plastic_model.hh"
#include "influence.hh"
#include "kelvin_helper.hh"
/* -------------------------------------------------------------------------- */
namespace
tamaas
{
/* -------------------------------------------------------------------------- */
template
<
model_type
type
,
UInt
derivative
>
Mindlin
<
type
,
derivative
>::
Mindlin
(
Model
*
model
)
:
parent
(
model
)
{
surface_tractions
.
setNbComponents
(
trait
::
components
);
surface_tractions
.
resize
(
this
->
source_buffer
.
front
().
sizes
());
}
/* -------------------------------------------------------------------------- */
template
<
model_type
type
,
UInt
derivative
>
void
Mindlin
<
type
,
derivative
>::
applyIf
(
GridBase
<
Real
>&
source
,
GridBase
<
Real
>&
out
,
filter_t
pred
)
const
{
Real
nu
=
this
->
model
->
getPoissonRatio
(),
mu
=
this
->
model
->
getShearModulus
();
influence
::
Kelvin
<
trait
::
dimension
,
derivative
>
kelvin
(
mu
,
nu
);
influence
::
Kelvin
<
trait
::
dimension
,
2
>
kelvin_strain
(
mu
,
nu
);
influence
::
Boussinesq
<
trait
::
dimension
,
derivative
-
1
>
boussinesq
(
mu
,
nu
);
influence
::
ElasticHelper
<
trait
::
dimension
>
elasticity
(
mu
,
nu
);
detail
::
KelvinHelper
<
type
,
decltype
(
kelvin
)
>
khelper
;
detail
::
SurfaceTractionHelper
<
type
>
thelper
;
detail
::
BoussinesqHelper
<
type
,
decltype
(
boussinesq
)
>
bhelper
;
const
Real
L
=
this
->
model
->
getSystemSize
().
front
();
auto
apply
=
[
&
](
decltype
(
this
->
source_buffer
)
&
source_buffers
,
decltype
(
this
->
disp_buffer
)
&
out_buffers
)
{
surface_tractions
=
0
;
// computing surface tractions (q power cancelled with
// boussinesq)
thelper
.
template
computeSurfaceTractions
<
true
>
(
source_buffers
,
surface_tractions
,
this
->
wavevectors
,
L
,
kelvin_strain
,
elasticity
);
surface_tractions
*=
-
1
;
// apply kelvin
khelper
.
applyIntegral
(
source_buffers
,
out_buffers
,
this
->
wavevectors
,
L
,
kelvin
);
khelper
.
applyFreeTerm
(
source_buffers
,
out_buffers
,
kelvin
);
// no need for fundamental correction
// apply boussinesq (q power cancelled with mindlin 2-grad)
bhelper
.
template
apply
<
true
>
(
surface_tractions
,
out_buffers
,
this
->
wavevectors
,
L
,
boussinesq
);
bhelper
.
makeFundamentalModeGreatAgain
(
surface_tractions
,
out_buffers
,
elasticity
);
// Correcting for fundamental mode
Vector
<
Real
,
trait
::
dimension
>
n
{{{
0
,
0
,
-
1
}}};
for
(
UInt
i
:
Loop
::
range
(
source_buffers
.
size
()))
{
typename
detail
::
KelvinTrait
<
decltype
(
kelvin
)
>::
source_t
w
(
source_buffers
[
i
](
0
));
typename
detail
::
KelvinTrait
<
decltype
(
kelvin
)
>::
out_t
u
(
out_buffers
[
i
](
0
));
auto
t
=
w
*
n
;
bhelper
.
makeFundamentalModeGreatAgain
(
t
,
u
,
elasticity
);
}
};
this
->
fourierApplyIf
(
apply
,
source
,
out
,
pred
);
}
/* -------------------------------------------------------------------------- */
/* Template instanciation */
/* -------------------------------------------------------------------------- */
template
class
Mindlin
<
model_type
::
volume_2d
,
1
>
;
template
class
Mindlin
<
model_type
::
volume_2d
,
2
>
;
}
// namespace tamaas
Event Timeline
Log In to Comment