diff --git a/src/rodassembler.cc b/src/rodassembler.cc index b1a86a94594c35a81bd3f180d8d5954edaf67201..34dc9d89acc12f9fb9b332938aaf20289cc061b6 100644 --- a/src/rodassembler.cc +++ b/src/rodassembler.cc @@ -12,7 +12,7 @@ template <class GridView> -void RodAssembler<GridView>:: +void RodAssembler<GridView,3>:: assembleGradient(const std::vector<RigidBodyMotion<3> >& sol, Dune::BlockVector<Dune::FieldVector<double, blocksize> >& grad) const { @@ -56,7 +56,7 @@ assembleGradient(const std::vector<RigidBodyMotion<3> >& sol, template <class GridView> -void RodAssembler<GridView>:: +void RodAssembler<GridView,3>:: getStrain(const std::vector<RigidBodyMotion<3> >& sol, Dune::BlockVector<Dune::FieldVector<double, blocksize> >& strain) const { @@ -119,7 +119,7 @@ getStrain(const std::vector<RigidBodyMotion<3> >& sol, } template <class GridView> -void RodAssembler<GridView>:: +void RodAssembler<GridView,3>:: getStress(const std::vector<RigidBodyMotion<3> >& sol, Dune::BlockVector<Dune::FieldVector<double, blocksize> >& stress) const { @@ -141,7 +141,7 @@ getStress(const std::vector<RigidBodyMotion<3> >& sol, template <class GridView> template <class PatchGridView> -Dune::FieldVector<double,3> RodAssembler<GridView>:: +Dune::FieldVector<double,3> RodAssembler<GridView,3>:: getResultantForce(const BoundaryPatchBase<PatchGridView>& boundary, const std::vector<RigidBodyMotion<3> >& sol, Dune::FieldVector<double,3>& canonicalTorque) const diff --git a/src/rodassembler.hh b/src/rodassembler.hh index f5c67235f2d4450c52e36573e7a6faf977ee5d16..cbf075bc3d990cdb445fc37083fb27498f70566e 100644 --- a/src/rodassembler.hh +++ b/src/rodassembler.hh @@ -12,10 +12,19 @@ #include "rodlocalstiffness.hh" #include "geodesicfeassembler.hh" -/** \brief The FEM operator for an extensible, shearable rod +/** \brief The FEM operator for an extensible, shearable rod in 3d + */ +template <class GridView, int spaceDim> +class RodAssembler +{ + dune_static_assert(spaceDim==2 || spaceDim==3, + "You can only instantiate the class RodAssembler for 2d and 3d spaces"); +}; + +/** \brief The FEM operator for an extensible, shearable rod in 3d */ template <class GridView> -class RodAssembler : public GeodesicFEAssembler<GridView, RigidBodyMotion<3> > +class RodAssembler<GridView,3> : public GeodesicFEAssembler<GridView, RigidBodyMotion<3> > { //typedef typename GridType::template Codim<0>::Entity EntityType;