Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F87414173
stimulation_global_timestep.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, Oct 12, 13:47
Size
2 KB
Mime Type
text/x-c++
Expires
Mon, Oct 14, 13:47 (2 d)
Engine
blob
Format
Raw Data
Handle
21594208
Attached To
rLIBMULTISCALE LibMultiScale
stimulation_global_timestep.cc
View Options
/**
* @file stimulation_global_timestep.cc
*
* @author Guillaume Anciaux <guillaume.anciaux@epfl.ch>
*
* @date Wed Jul 09 21:59:47 2014
*
* @brief This stimulator allows to change the integration timestep of a model
*
* @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 "lm_common.hh"
#include "stimulation_global_timestep.hh"
#include "domain_interface.hh"
#include "null_compute.hh"
#include "lib_filter.hh"
#include "lib_md.hh"
#include "lib_continuum.hh"
#include "lib_dd.hh"
/* -------------------------------------------------------------------------- */
__BEGIN_LIBMULTISCALE__
template
<
typename
Cont
>
void
StimulationGlobalTimeStep
<
Cont
>::
stimulate
(
Cont
&
cont
,
UInt
stage
){
if
(
DomainInterface
*
ptr
=
dynamic_cast
<
DomainInterface
*>
(
this
->
input
)){
ptr
->
setTimeStep
(
globaltimestep
);
}
else
LM_FATAL
(
"invalid input"
);
}
/* -------------------------------------------------------------------------- */
/* LMDESC GLOBAL_TIMESTEP
This stimulator allows to
change the integration timestep of a model.
Thus the input can only be a model plugin
and cannot be a filter/compute.
*/
/* LMHERITATE action_interface */
/* LMEXAMPLE STIMULATION gts GLOBAL_TIMESTEP INPUT md TS 5 */
template
<
typename
Cont
>
void
StimulationGlobalTimeStep
<
Cont
>::
declareParams
(){
Stimulation
<
Cont
>::
declareParams
();
/* LMKEYWORD TS
This specifies the required timestep.
*/
this
->
parseKeyword
(
"TS"
,
globaltimestep
);
}
/* -------------------------------------------------------------------------- */
DECLARE_STIMULATION
(
StimulationGlobalTimeStep
,
LIST_ATOM_MODEL
)
DECLARE_STIMULATION
(
StimulationGlobalTimeStep
,
LIST_CONTINUUM_MODEL
)
DECLARE_STIMULATION
(
StimulationGlobalTimeStep
,
LIST_DD_MODEL
)
DECLARE_STIMULATION_REFPOINT
(
StimulationGlobalTimeStep
)
DECLARE_STIMULATION_GENERIC_MESH
(
StimulationGlobalTimeStep
)
//template class StimulationGlobalTimeStep<NullCompute>;
__END_LIBMULTISCALE__
Event Timeline
Log In to Comment