Skip to content
Snippets Groups Projects
Commit 2f61206c authored by Oliver Sander's avatar Oliver Sander Committed by sander@FU-BERLIN.DE
Browse files

new Dirichlet value function that induces a torsion

[[Imported from SVN: r7545]]
parent 34b54a63
No related branches found
No related tags found
No related merge requests found
...@@ -39,7 +39,7 @@ const int blocksize = TargetSpace::TangentVector::size; ...@@ -39,7 +39,7 @@ const int blocksize = TargetSpace::TangentVector::size;
using namespace Dune; using namespace Dune;
#if 0
void dirichletValues(const FieldVector<double,dim>& in, FieldVector<double,3>& out) void dirichletValues(const FieldVector<double,dim>& in, FieldVector<double,3>& out)
{ {
out = 0; out = 0;
...@@ -48,7 +48,29 @@ void dirichletValues(const FieldVector<double,dim>& in, FieldVector<double,3>& o ...@@ -48,7 +48,29 @@ void dirichletValues(const FieldVector<double,dim>& in, FieldVector<double,3>& o
out[0] = 2.2; out[0] = 2.2;
} }
#endif
void dirichletValues(const FieldVector<double,dim>& in, FieldVector<double,3>& out)
{
double angle = M_PI/4;
FieldVector<double,3> center(0);
center[1] = 0.5;
FieldMatrix<double,3,3> rotation(0);
rotation[0][0] = 1;
rotation[1][1] = std::cos(angle);
rotation[1][2] = -std::sin(angle);
rotation[2][1] = std::sin(angle);
rotation[2][2] = std::cos(angle);
FieldVector<double,3> inEmbedded(0);
for (int i=0; i<dim; i++)
inEmbedded[i] = in[i];
inEmbedded -= center;
rotation.mv(inEmbedded, out);
out += center;
}
template <class HostGridView> template <class HostGridView>
class DeformationFunction class DeformationFunction
......
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