00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 #ifndef NEWMARKFUNCTOR_H
00014 #define NEWMARKFUNCTOR_H
00015 #include "../fem/definitions.h"
00016 
00017 #include <functional>
00018 
00019 
00020 namespace shells {
00021     class NewmarkPredictFunctor;
00022     class NewmarkCorrectFunctor;  
00023     struct SVertexS;
00024 } 
00025 
00026 
00027 class shells::NewmarkPredictFunctor : 
00028     public std::unary_function<shells::SVertexS *, void > {
00029 public:
00030     NewmarkPredictFunctor(const double& timeStep, const double& gamma=0.5);
00031     ~NewmarkPredictFunctor(){}
00032 
00033     void operator()(shells::SVertexS * const vtx);
00034     
00035 private:
00036     double     _timeStep;
00037     double     _coef1;
00038     double     _coef2;
00039 };
00040 
00041 
00042 
00043 class shells::NewmarkCorrectFunctor : 
00044     public std::unary_function<shells::SVertexS *, void > {
00045 public:
00046     NewmarkCorrectFunctor(const double& timeStep, 
00047                           const double& gamma=0.5, 
00048                           const double& damping=0.0);
00049     ~NewmarkCorrectFunctor(){}
00050 
00051     void operator()(shells::SVertexS * const vtx);
00052     
00053 private:
00054     double     _coef1;
00055     double     _damping;
00056 };
00057 
00058 #endif