00001 // -*- C++ -*- 00002 // 00003 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 00004 // 00005 // Fehmi Cirak 00006 // California Institute of Technology 00007 // (C) 2004 All Rights Reserved 00008 // 00009 // <LicenseText> 00010 // 00011 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 00012 // 00013 #ifndef INTERNALFORCEFUNCTOR_H 00014 #define INTERNALFORCEFUNCTOR_H 00015 #include "../fem/definitions.h" 00016 00017 #include "SVertexFunctors.h" 00018 00019 #include <functional> 00020 00021 00022 namespace shells { 00023 struct InitializeResidualFunctor; 00024 class ComputeInternalForceFunctor; 00025 struct SElementS; 00026 struct SVertexS; 00027 } 00028 00029 00030 struct shells::InitializeResidualFunctor : 00031 public std::unary_function<shells::SVertexS *, void > { 00032 00033 void operator()(shells::SVertexS * const vtx); 00034 }; 00035 00036 00037 00038 class shells::ComputeInternalForceFunctor : 00039 public std::unary_function<shells::SElementS *, void > { 00040 00041 public: 00042 ComputeInternalForceFunctor(const double& thick, const double& dtime) 00043 :_thick(thick), _dtime(dtime){} 00044 ~ComputeInternalForceFunctor(){} 00045 00046 void operator()(shells::SElementS * const element); 00047 00048 private: 00049 double _xref[SVertexCoordinate::numVar][MAXVAL]; 00050 double _xcur[SVertexCoordinate::numVar][MAXVAL]; 00051 double _intelem[SVertexResidual::numVar][MAXVAL]; 00052 00053 const double& _thick; 00054 const double& _dtime; 00055 }; 00056 00057 #endif