Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F90684795
stimulation_impulse.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
Sun, Nov 3, 21:03
Size
2 KB
Mime Type
text/x-c++
Expires
Tue, Nov 5, 21:03 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
22119310
Attached To
rLIBMULTISCALE LibMultiScale
stimulation_impulse.cc
View Options
/**
* @file stimulation_impulse.cc
*
* @author Guillaume Anciaux <guillaume.anciaux@epfl.ch>
*
* @date Wed Jul 09 21:59:47 2014
*
* @brief This stimulator sets an initial impulse displacement field generating
* a wave
*
* @section LICENSE
*
* Copyright (©) 2010-2011 EPFL (Ecole Polytechnique Fédérale de Lausanne)
* Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
*
* LibMultiScale 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.
*
* LibMultiScale 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 LibMultiScale. If not, see <http://www.gnu.org/licenses/>.
*
*/
/* -------------------------------------------------------------------------- */
#include "stimulation_impulse.hh"
#include "filter.hh"
#include "lib_continuum.hh"
#include "lib_dd.hh"
#include "lib_md.hh"
#include "lm_common.hh"
#include "ref_point_data.hh"
/* -------------------------------------------------------------------------- */
__BEGIN_LIBMULTISCALE__
template
<
typename
Cont
>
void
StimulationImpulse
<
Cont
>::
stimulate
(
Cont
&
cont
,
UInt
stage
)
{
constexpr
UInt
Dim
=
Cont
::
Dim
;
compute
.
build
(
cont
);
UInt
index
=
0
;
for
(
auto
&&
at
:
cont
)
{
Vector
<
Dim
>
disp
;
for
(
UInt
i
=
0
;
i
<
Dim
;
++
i
)
disp
[
i
]
=
compute
[
index
*
Dim
+
i
];
at
.
displacement
()
=
disp
;
++
index
;
}
}
/* -------------------------------------------------------------------------- */
/* LMDESC IMPULSE
This stimulator sets an initial impulse displacement field that will generate
a wave. It uses the IMPULSE compute to generate a displacement field.
*/
/* LMHERITANCE compute_impulse */
/* LMEXAMPLE STIMULATION impulse IMPULSE INPUT central_md LWAVE WaveLength*r0
* DIRECTION 0 INTENSITY 1.1e-3 ONESHOT 0 */
template
<
typename
_Input
>
void
StimulationImpulse
<
_Input
>::
declareParams
()
{
Stimulation
<
_Input
>::
declareParams
();
this
->
addSubParsableObject
(
compute
);
}
/* -------------------------------------------------------------------------- */
DECLARE_STIMULATION
(
StimulationImpulse
,
LIST_ATOM_MODEL
);
DECLARE_STIMULATION
(
StimulationImpulse
,
LIST_CONTINUUM_MODEL
);
DECLARE_STIMULATION
(
StimulationImpulse
,
LIST_DD_MODEL
);
DECLARE_STIMULATION_REFPOINT
(
StimulationImpulse
);
DECLARE_STIMULATION_GENERIC_MESH
(
StimulationImpulse
);
/* -------------------------------------------------------------------------- */
__END_LIBMULTISCALE__
Event Timeline
Log In to Comment