Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F91992678
stimulation_next_event.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, Nov 16, 11:04
Size
2 KB
Mime Type
text/x-c++
Expires
Mon, Nov 18, 11:04 (2 d)
Engine
blob
Format
Raw Data
Handle
22360110
Attached To
rLIBMULTISCALE LibMultiScale
stimulation_next_event.cc
View Options
/**
* @file stimulation_next_event.cc
*
* @author Jaehyun Cho <jaehyun.cho@epfl.ch>
*
* @date Thu Sep 18 16:13:19 2014
*
* @brief allows to explicitly set the global variable nb_step_next_event
*
* @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_next_event.hh"
#include "lib_md.hh"
#include "lib_continuum.hh"
#include "lib_dd.hh"
/* -------------------------------------------------------------------------- */
__BEGIN_LIBMULTISCALE__
/* LMDESC NEXT_EVENT
allows to explicitly set the global variable nb\_step\_next\_event
*/
/* LMHERITATE action_interface */
/* LMEXAMPLE STIMULATION gts NEXT_EVENT INPUT NULL FREQ 1200 */
template <typename Cont>
void StimulationNextEvent<Cont>::declareParams(){
Stimulation<Cont>::declareParams();
/* LMKEYWORD INCR
This specifies by how much to increment nb\_step\_next\_event
*/
this->parseKeyword("INCR",this->incr,lm_uint_max);
/* LMKEYWORD VAL
This specifies value to which nb\_step\_next\_event is to be set
*/
this->parseKeyword("VAL",this->val,lm_uint_max);
}
/* -------------------------------------------------------------------------- */
template <typename Cont>
void StimulationNextEvent<Cont>::stimulate(Cont & cont, UInt stage){
if (this->incr != lm_uint_max) {
nb_step_next_event += incr;
} else {
nb_step_next_event = val;
}
//DUMP("nb_step_next_event has been set to " << nb_step_next_event, DBG_MESSAGE);
}
/* -------------------------------------------------------------------------- */
DECLARE_STIMULATION(StimulationNextEvent,LIST_ATOM_MODEL);
DECLARE_STIMULATION(StimulationNextEvent,LIST_CONTINUUM_MODEL);
DECLARE_STIMULATION(StimulationNextEvent,LIST_DD_MODEL);
DECLARE_STIMULATION_REFPOINT(StimulationNextEvent);
DECLARE_STIMULATION_GENERIC_MESH(StimulationNextEvent);
/* -------------------------------------------------------------------------- */
__END_LIBMULTISCALE__
Event Timeline
Log In to Comment