Hello,
I am using a C++ HDG solver which interfaces Netgen. For a project, I would like to perturb the Netgen mesh by changing vertex coordinates.
I have a shared_ptr<MeshAccess> pointer to access the mesh nodes and I tried to perturb them this way:
Code:
Vec<D> vertex;
double eps = 1E-8;
for (int j = 0; j < VolumeVertices.size(); ++j) {
ma->GetPoint(VolumeVertices[j], vertex);
for (int dd = 0; dd < D; ++dd){
vertex(dd) = vertex(dd)+eps;
}
}
but that does not work because I am not updating the actual vertices inside Netgen.
What I would like is to have two pointers, one to the initial unperturbed mesh and one to the deformed mesh but I do not really know how to proceed.
Could you indicate me how to change user-defined vertex coordinates and update the mesh metrics in C++ while keeping an access to the initial mesh? I could not find how to do that when browsing the mesh classes of Netgen.
Thank you very much,
Joachim