Skip to content
Snippets Groups Projects
Commit 27dc8563 authored by Sander, Oliver's avatar Sander, Oliver
Browse files

Merge branch 'fix/rotational-dirichlet-values' into 'master'

Fix/rotational dirichlet values

See merge request !79
parents 3bd99b20 f835378f
No related branches found
No related tags found
1 merge request!79Fix/rotational dirichlet values
Pipeline #6539 passed
......@@ -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])
......
......@@ -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++){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment