Go to the documentation of this file.00001 #ifndef OPENTISSUE_DYNAMICS_FEM_FEM_INIT_H
00002 #define OPENTISSUE_DYNAMICS_FEM_FEM_INIT_H
00003
00004
00005
00006
00007
00008
00009
00010 #include <OpenTissue/configuration.h>
00011
00012 #include <OpenTissue/dynamics/fem/fem_uniform_young.h>
00013 #include <OpenTissue/dynamics/fem/fem_uniform_poisson.h>
00014 #include <OpenTissue/dynamics/fem/fem_uniform_density.h>
00015 #include <OpenTissue/dynamics/fem/fem_compute_mass.h>
00016 #include <OpenTissue/dynamics/fem/fem_initialize_stiffness_elements.h>
00017 #include <OpenTissue/dynamics/fem/fem_clear_stiffness_assembly.h>
00018 #include <OpenTissue/dynamics/fem/fem_initialize_plastic.h>
00019
00020 namespace OpenTissue
00021 {
00022 namespace fem
00023 {
00045 template < typename fem_mesh,typename real_type >
00046 inline void init(
00047 fem_mesh & mesh,
00048 real_type const & young,
00049 real_type const & poisson,
00050 real_type const & density,
00051 real_type const & c_yield,
00052 real_type const & c_creep,
00053 real_type const & c_max
00054 )
00055 {
00056
00057 detail::uniform_young( mesh.tetrahedron_begin(), mesh.tetrahedron_end(), young );
00058 detail::uniform_poisson( mesh.tetrahedron_begin(), mesh.tetrahedron_end(), poisson );
00059 detail::uniform_density(mesh.tetrahedron_begin(),mesh.tetrahedron_end(),density);
00060
00061 detail::initialize_stiffness_elements(mesh.tetrahedron_begin(),mesh.tetrahedron_end());
00062 detail::clear_stiffness_assembly(mesh.node_begin(),mesh.node_end());
00063 detail::compute_mass(mesh);
00064 detail::initialize_plastic(mesh.tetrahedron_begin(),mesh.tetrahedron_end(),c_yield,c_creep,c_max);
00065 }
00066
00067 }
00068 }
00069
00070
00071 #endif