Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 6d8ee342 authored by Martin Genet's avatar Martin Genet
Browse files

Generated image expression now contains the displacement field

parent e8d1275f
No related branches found
No related tags found
No related merge requests found
......@@ -46,6 +46,7 @@ public:
vtkSmartPointer<vtkImageInterpolator> interpolator; // MG20180913: pointer would be instantiated at class object construction, but would point toward nothing; object would not be instantiated
double static_scaling;
std::shared_ptr<dolfin::Mesh> mesh;
std::shared_ptr<dolfin::Function> U;
MyExpr():
Expression(),
......@@ -73,14 +74,20 @@ public:
}
void init_mesh(
const dolfin::Mesh* mesh)
const std::shared_ptr<dolfin::Mesh> mesh_)
{
mesh = mesh;
mesh = mesh_;
std::cout << mesh->num_vertices() << std::endl;
std::cout << mesh->num_cells() << std::endl;
}
void init_disp(
const std::shared_ptr<dolfin::Function> U_)
{
U = U_;
}
void eval(Array<double>& expr, const Array<double>& X) const
{'''+('''
std::cout << "X = " << X.str(1) << std::endl;''')*(verbose)+'''
......
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