Go to the documentation of this file.00001 #ifndef OPENTISSUE_DYNAMICS_FEM_FEM_UNIFORM_DENSITY_H
00002 #define OPENTISSUE_DYNAMICS_FEM_FEM_UNIFORM_DENSITY_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 real_type, typename tetrahedron_iterator>
00026 inline void uniform_density(tetrahedron_iterator const & begin, tetrahedron_iterator const & end,real_type const & density)
00027 {
00028 assert(density>0 || !"uniform_density(): density must be positive");
00029 for (tetrahedron_iterator T = begin;T!=end;++T)
00030 T->m_density = density;
00031 }
00032
00033 }
00034 }
00035 }
00036
00037
00038 #endif