Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F82263146
compute_time_delta.hh
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, Sep 10, 11:22
Size
3 KB
Mime Type
text/x-c++
Expires
Thu, Sep 12, 11:22 (2 d)
Engine
blob
Format
Raw Data
Handle
20670563
Attached To
rLIBMULTISCALE LibMultiScale
compute_time_delta.hh
View Options
/**
* @file compute_time_delta.hh
*
* @author Guillaume Anciaux <guillaume.anciaux@epfl.ch>
*
* @date Tue Dec 10 16:00:49 2013
*
* @brief This compute maintains a time history in order to compute the time variation
*
* @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/>.
*
*/
#ifndef __LIBMULTISCALE_COMPUTE_TIME_DELTA_HH__
#define __LIBMULTISCALE_COMPUTE_TIME_DELTA_HH__
/* -------------------------------------------------------------------------- */
#include "compute.hh"
//#include "math_tools.hh"
/* -------------------------------------------------------------------------- */
__BEGIN_LIBMULTISCALE__
template
<
typename
_Input
>
class
ComputeTimeDelta
:
public
Compute
<
_Input
>
{
/* ------------------------------------------------------------------------ */
/* Typedefs */
/* ------------------------------------------------------------------------ */
typedef
typename
Compute
<
_Input
>::
Output
Output
;
/* ------------------------------------------------------------------------ */
/* Constructors/Destructors */
/* ------------------------------------------------------------------------ */
public
:
ComputeTimeDelta
(
const
std
::
string
&
name
,
UInt
dim
);
ComputeTimeDelta
(
const
std
::
string
&
name
,
ComponentLMInterface
&
d
);
virtual
~
ComputeTimeDelta
();
/* ------------------------------------------------------------------------ */
/* Methods */
/* ------------------------------------------------------------------------ */
public
:
virtual
void
build
();
void
build
(
_Input
&
cont
);
void
account
(
_Input
&
cont
);
void
action
();
virtual
void
visit
(
ComponentLMOut
<
_Input
>
&
obj
);
inline
void
declareParams
();
//! this function holds to possible restriction to action calls
virtual
bool
shouldMakeAction
();
protected
:
/* ------------------------------------------------------------------------ */
/* Accessors */
/* ------------------------------------------------------------------------ */
public
:
/* ------------------------------------------------------------------------ */
/* Class Members */
/* ------------------------------------------------------------------------ */
protected
:
//! the operator results
std
::
vector
<
Real
>
previous_data
;
//! Number of steps an action's activity starts ahead of the actual action.
UInt
delta_size
;
UInt
last_accounted_k
;
UInt
last_accounted_step
;
bool
build_phase
;
};
/* -------------------------------------------------------------------------- */
__END_LIBMULTISCALE__
#endif
/* __LIBMULTISCALE_COMPUTE_TIME_DELTA_HH__ */
Event Timeline
Log In to Comment