Go to the documentation of this file.00001 #ifndef OPENTISSUE_DYNAMICS_FEM_FEM_POSITION_UPDATE_H
00002 #define OPENTISSUE_DYNAMICS_FEM_FEM_POSITION_UPDATE_H
00003
00004
00005
00006
00007
00008
00009
00010 #include <OpenTissue/configuration.h>
00011
00012 namespace OpenTissue
00013 {
00014 namespace fem
00015 {
00016 namespace detail
00017 {
00025 template < typename fem_mesh, typename real_type >
00026 inline void position_update(fem_mesh & mesh, real_type const & dt)
00027 {
00028 typedef typename fem_mesh::node_iterator node_iterator;
00029 typedef typename fem_mesh::tetrahedron_iterator tetrahedron_iterator;
00030
00031 node_iterator Nbegin = mesh.node_begin();
00032 node_iterator Nend = mesh.node_end();
00033 for (node_iterator N = Nbegin;N!=Nend;++N)
00034 {
00035 if(N->m_fixed)
00036 continue;
00037 N->m_coord += dt * N->m_velocity;
00038 }
00039 }
00040
00041 }
00042 }
00043 }
00044
00045
00046 #endif