Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F82396980
filter_interface.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
Wed, Sep 11, 04:25
Size
3 KB
Mime Type
text/x-c++
Expires
Fri, Sep 13, 04:25 (2 d)
Engine
blob
Format
Raw Data
Handle
20694160
Attached To
rLIBMULTISCALE LibMultiScale
filter_interface.hh
View Options
/**
* @file filter_interface.hh
*
*
* @date Mon Oct 28 19:23:14 2013
*
* @brief This is the interface to all filters
*
* @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_FILTER_INTERFACE_HH__
#define __LIBMULTISCALE_FILTER_INTERFACE_HH__
/* ---------------------------------------------------------------- */
#include "action_interface.hh"
#include "component_libmultiscale.hh"
/* ---------------------------------------------------------------- */
__BEGIN_LIBMULTISCALE__
/* ---------------------------------------------------------------- */
class
ActionInterface
;
template
<
typename
_Input
>
class
FilterCompatibility
;
/* ---------------------------------------------------------------- */
class
FilterInterface
:
public
ActionInterface
{
public
:
FilterInterface
(){};
virtual
~
FilterInterface
(){};
virtual
void
declareParams
()
override
;
protected
:
DOFType
dt
;
};
/* ---------------------------------------------------------------- */
/// standard output stream operator
inline
std
::
ostream
&
operator
<<
(
std
::
ostream
&
stream
,
const
FilterInterface
&
_this
)
{
_this
.
printself
(
stream
);
return
stream
;
}
__END_LIBMULTISCALE__
/* ---------------------------------------------------------------- */
#define DECLARE_FILTER(class_name, ...) \
class_name(const std::string &name); \
virtual ~class_name(); \
\
private: \
DECORATE_FUNCTION_DISPATCH(build, __VA_ARGS__) \
EIGEN_MAKE_ALIGNED_OPERATOR_NEW \
\
public: \
void declareParams() override; \
void compute_make_call() override
#define DECLARE_COMPUTE_MAKE_CALL(class_name) \
void class_name::compute_make_call() { \
try { \
DUMP(this->getID() << ": Compute", DBG_INFO); \
this->build<dispatch>(this->getInput()); \
} catch (Component::UnconnectedInput & e) { \
LM_FATAL("Unconnected input for component " << this->getID() \
<< std::endl \
<< e.what()); \
} \
}
#endif
/* __LIBMULTISCALE_FILTER_INTERFACE_HH__ */
Event Timeline
Log In to Comment