diff --git a/src/cosserat-continuum.cc b/src/cosserat-continuum.cc index 19473ec1cc615553240255c285cb8e5656217bb4..21e564b5da1eb025b12b202c6156e34e1b67260f 100644 --- a/src/cosserat-continuum.cc +++ b/src/cosserat-continuum.cc @@ -217,6 +217,14 @@ int main (int argc, char *argv[]) try lagrange<displacementOrder>() )); + auto orientationPowerBasis = makeBasis( + gridView, + power<3>( + power<3>( + lagrange<rotationOrder>() + ) + )); + typedef Dune::Functions::LagrangeBasis<GridView,displacementOrder> DeformationFEBasis; typedef Dune::Functions::LagrangeBasis<GridView,rotationOrder> OrientationFEBasis; @@ -428,7 +436,7 @@ int main (int argc, char *argv[]) try Dune::Functions::interpolate(deformationPowerBasis, ddV, deformationDirichletValues, deformationDirichletDofs); BlockVector<FieldMatrix<double,3,3> > dOV; - Dune::Functions::interpolate(orientationFEBasis, dOV, orientationDirichletValues, orientationDirichletDofs); + Dune::Functions::interpolate(orientationPowerBasis, dOV, orientationDirichletValues); for (int i = 0; i < compositeBasis.size({0}); i++) { if (deformationDirichletDofs[i][0]) diff --git a/src/film-on-substrate.cc b/src/film-on-substrate.cc index e52201554d6630a4c50dde4f5283c60bd5d9d592..dfef58c8317ab30f3b84d97e3726488f65bb7e51 100644 --- a/src/film-on-substrate.cc +++ b/src/film-on-substrate.cc @@ -230,10 +230,13 @@ int main (int argc, char *argv[]) try power<dim>( lagrange<displacementOrder>() )); + auto orientationPowerBasis = makeBasis( - gridView, - power<dim>( - lagrange<rotationOrder>() + gridView, + power<dim>( + power<dim>( + lagrange<rotationOrder>() + ) )); typedef Dune::Functions::LagrangeBasis<GridView,displacementOrder> DeformationFEBasis; @@ -521,14 +524,14 @@ int main (int argc, char *argv[]) try Dune::Functions::interpolate(deformationPowerBasis, ddV, deformationDirichletValues, deformationDirichletDofs); BlockVector<FieldMatrix<double,targetDim,targetDim> > dOV; - Dune::Functions::interpolate(orientationFEBasis, dOV, rotationalDirichletValues, orientationDirichletDofs); + Dune::Functions::interpolate(orientationPowerBasis, dOV, rotationalDirichletValues); for (int i = 0; i < compositeBasis.size({0}); i++) if (dirichletDofs[_0][i][0]) x[_0][i] = ddV[i]; -// for (int i = 0; i < compositeBasis.size({1}); i++) -// if (dirichletDofs[_1][i][0]) -// x[_1][i].set(dOV[i]); + for (int i = 0; i < compositeBasis.size({1}); i++) + if (dirichletDofs[_1][i][0]) + x[_1][i].set(dOV[i]); #if !MIXED_SPACE //The MixedRiemannianTrustRegionSolver can treat the Displacement and Orientation Space as separate ones @@ -664,7 +667,12 @@ int main (int argc, char *argv[]) try file.close(); BlockVector<FieldVector<double,dim> > identityRotation(orientationFEBasis.size()); - Dune::Functions::interpolate(orientationPowerBasis, identityRotation, [](FieldVector<double,dim> x){ return x; }); + auto identityRotationPowerBasis = makeBasis( + gridView, + power<dim>( + lagrange<rotationOrder>() + )); + Dune::Functions::interpolate(identityRotationPowerBasis, identityRotation, [](FieldVector<double,dim> x){ return x; }); file.open(rotationOutput + ending); for (int i = 0; i < identityRotation.size(); i++){