diff --git a/dune/gfe/CMakeLists.txt b/dune/gfe/CMakeLists.txt index e33e3ecd021aa5a259ab3fea28dc9fa8a1f213e2..aa159002d0f4c36a12e3a6cf581a5d78846ca02f 100644 --- a/dune/gfe/CMakeLists.txt +++ b/dune/gfe/CMakeLists.txt @@ -1,6 +1,44 @@ #install headers -install(FILES gfe.hh DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/dune/gfe) +install(FILES + averagedistanceassembler.hh + averageinterface.hh + cosseratstrain.hh + cosseratvtkreader.hh + cosseratvtkwriter.hh + embeddedglobalgfefunction.hh + filereader.hh + geodesicdifference.hh + geodesicfefunctionadaptor.hh + gfedifferencenormsquared.hh + globalgfefunction.hh + gramschmidtsolver.hh + linearalgebra.hh + localgeodesicfefunction.hh + localgfetestfunctionbasis.hh + localprojectedfefunction.hh + localquickanddirtyfefunction.hh + localtangentfefunction.hh + maxnormtrustregion.hh + mixedriemanniantrsolver.cc + mixedriemanniantrsolver.hh + neumannenergy.hh + polardecomposition.hh + riemannianpnsolver.cc + riemannianpnsolver.hh + riemanniantrsolver.cc + riemanniantrsolver.hh + rodfactory.hh + skewmatrix.hh + svd.hh + symmetricmatrix.hh + targetspacertrsolver.cc + targetspacertrsolver.hh + tensorssd.hh + tensor3.hh + trustregionmmgbasesolver.hh + vtkfile.hh + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/dune/gfe) add_subdirectory("spaces") add_subdirectory("assemblers") -add_subdirectory("densities") \ No newline at end of file +add_subdirectory("densities") diff --git a/dune/gfe/densities/bulkcosseratdensity.hh b/dune/gfe/densities/bulkcosseratdensity.hh index 17edd65f0e9f802a1b35fedc28ed8b789409c0c5..faa1fb80e79d783a19f9bc15b85a000bd2a58ff7 100644 --- a/dune/gfe/densities/bulkcosseratdensity.hh +++ b/dune/gfe/densities/bulkcosseratdensity.hh @@ -6,6 +6,8 @@ #include <dune/common/fmatrix.hh> +#include <dune/gfe/cosseratstrain.hh> +#include <dune/gfe/linearalgebra.hh> #include <dune/gfe/densities/localdensity.hh> namespace Dune::GFE { diff --git a/dune/gfe/spaces/rotation.hh b/dune/gfe/spaces/rotation.hh index 6217e04639b7b79a4fb9c41002784ed5ca0a3cdd..fce1ce789769deafffdbf9477c4d011bc4545ae8 100644 --- a/dune/gfe/spaces/rotation.hh +++ b/dune/gfe/spaces/rotation.hh @@ -1176,36 +1176,6 @@ public: return result; } - /** \brief Create three vectors which form an orthonormal basis of \mathbb{H} together - with this one. - - This is used to compute the strain in rod problems. - See: Dichmann, Li, Maddocks, 'Hamiltonian Formulations and Symmetries in - Rod Mechanics', page 83 - */ - Quaternion<T> B(int m) const { - assert(m>=0 && m<3); - Quaternion<T> r; - if (m==0) { - r[0] = (*this)[3]; - r[1] = (*this)[2]; - r[2] = -(*this)[1]; - r[3] = -(*this)[0]; - } else if (m==1) { - r[0] = -(*this)[2]; - r[1] = (*this)[3]; - r[2] = (*this)[0]; - r[3] = -(*this)[1]; - } else { - r[0] = (*this)[1]; - r[1] = -(*this)[0]; - r[2] = (*this)[3]; - r[3] = -(*this)[2]; - } - - return r; - } - /** \brief Project tangent vector of R^n onto the tangent space */ EmbeddedTangentVector projectOntoTangentSpace(const EmbeddedTangentVector& v) const { EmbeddedTangentVector result = v; @@ -1265,12 +1235,17 @@ public: return *this; } - /** \brief Compute an orthonormal basis of the tangent space of SO(3). */ + /** \brief Compute an orthonormal basis of the tangent space of the unit quaternions + * + * Since the unit quaternions are an odd-dimensional sphere, there exists a globally + * continuous orthonormal frame field. I took the expression here from + * "Dichmann, Li, Maddocks, 'Hamiltonian Formulations and Symmetries in Rod Mechanics', page 83" + */ Dune::FieldMatrix<T,3,4> orthonormalFrame() const { - Dune::FieldMatrix<T,3,4> result; - for (int i=0; i<3; i++) - result[i] = B(i); - return result; + return {{ (*this)[3], (*this)[2], -(*this)[1], -(*this)[0]}, + {-(*this)[2], (*this)[3], (*this)[0], -(*this)[1]}, + { (*this)[1], -(*this)[0], (*this)[3], -(*this)[2]}}; + } };