Skip to content
Snippets Groups Projects
Commit e3f7808d authored by Lisa Julia Nebel's avatar Lisa Julia Nebel
Browse files

Add option to use the CosseratVTKWriter with a TupleVector

parent 1ce42282
No related branches found
No related tags found
1 merge request!72Cosserat-Continuum-Nonplanar
......@@ -109,6 +109,23 @@ class CosseratVTKWriter
}
public:
/** \brief Write a configuration given with respect to a scalar function space basis
*/
template <typename Basis>
static void write(const Basis& basis,
const Dune::TupleVector<std::vector<RealTuple<double,3> >,
std::vector<Rotation<double,3> > >& configuration,
const std::string& filename)
{
using namespace Dune::TypeTree::Indices;
std::vector<RigidBodyMotion<double,3>> xRBM(basis.size());
for (int i = 0; i < basis.size(); i++) {
for (int j = 0; j < 3; j ++) // Displacement part
xRBM[i].r[j] = configuration[_0][i][j];
xRBM[i].q = configuration[_1][i]; // Rotation part
}
write(basis,xRBM,filename);
}
/** \brief Write a configuration given with respect to a scalar function space basis
*/
......
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