-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
One possible signature of node_set_coordinates is
void node_set_coordinates(const Entity_ID nodeid, const double *ncoord) = 0;
but it picks up the garbage from ncoord+2 and sticks it into the MSTK data structures even if we are working with 2D meshes.
The solution is to copy the right number of coordinate values from ncoord within Mesh_MSTK::node_set_coordinates and set the rest to zero before passing it off to MSTK.
void Mesh_MSTK::node_set_coordinates(const Jali::Entity_ID nodeid,
const double *coords) {
MVertex_ptr v = vtx_id_to_handle[nodeid];
double coordarray[3] = {0.0, 0.0, 0.0};
for (int i = 0; i < Mesh::space_dimension(); i++)
coordarray[i] = coords[i];
MV_Set_Coords(v, (double *) coordarray);
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels