Mesh Smoothing in c++

I am trying to use the MeshSmoothing class in a c++ file, documented at

https://fenicsproject.org/olddocs/dolfin/latest/cpp/d6/dd7/classdolfin_1_1MeshSmoothing.html

However, if I use

MeshSmoothing::smooth(*mesh); then I get the error,

error: ‘MeshSmoothing’ has not been declared,

and if I try to include the header file with

#include <MeshSmoothing.h> then I get the error

error: MeshSmoothing.h: No such file or directory.

If I just write smooth(*mesh); I get the error

error: ‘smooth’ was not declared in this scope, and the suggestion to replace smooth with floorh.

I am running the latest stable version of FEniCS available on docker.

My apologies if I am missing something very obvious, but can anyone point out what I am doing wrong?

I have found that I can access the smooth function by including the line at the start,

#include </usr/local/include/dolfin/mesh/MeshSmoothing.h>

and then calling the function with

MeshSmoothing::smooth(*mesh);
1 Like