Hello Madam or Sir,
I am the user of OpenMesh, and I want ask some questions about the parallel code with OpenMesh, exactly, the parallel code is based on OpenMP on the VS2013.
The first question: When I use the OpenMP on the VS2013 to speed up the program which write with OpenMesh, for example, I add the code: #pragma omp parallel for num_threads(7) , just like the following:
and the errors follow, and I do not know why.
and the second question: Could the code with iterator of OpenMesh be paralleled by OpenMP just like " for (TriMesh::FaceIter f_it = mesh.faces_begin(); f_it != mesh.faces_end(); f_it++) " in the above picture? or How can I parallel the code with iterator of OpenMesh?
Thank you for your time! And I am looking forward to your reply.
Sincerely
LuWang
Hello there,
I am not sure if this is the place to ask questions about Open Volume Mesh. But i couldn't find any other mailing list. Hence i am posting here.
I am trying to create a mesh of type OpenVolumeMesh::GeometricTetrahedralMeshV3d HalfFaceMesh;
To this, i am adding tetrahedrons as follows
OpenVolumeMesh::CellPropertyT< unsigned int > TetSphereAssociativeProperty = HalfFaceMesh.request_cell_property< unsigned int >("TET_SPHERE_ASSOCIATION_ID");
int num_vol_elements = nglib::Ng_GetNE(CurrentMesh);
unsigned int tetra_cnt = 1;
for(unsigned int tetra = 0; tetra < num_vol_elements; ++tetra)
{
int CoordinateArray[4];
nglib::Ng_GetVolumeElement(CurrentMesh, tetra + 1, CoordinateArray);
long v1 = CoordinateArray[0];
long v2 = CoordinateArray[1];
long v3 = CoordinateArray[2];
long v4 = CoordinateArray[3];
VertexHandle _v1 = HalfFaceMesh.add_vertex(meshPointToVector3D(v1));
VertexHandle _v2 = HalfFaceMesh.add_vertex(meshPointToVector3D(v2));
VertexHandle _v3 = HalfFaceMesh.add_vertex(meshPointToVector3D(v3));
VertexHandle _v4 = HalfFaceMesh.add_vertex(meshPointToVector3D(v4));
CellHandle current_cell = HalfFaceMesh.add_cell(_v1, _v2, _v3, _v4);
TetSphereAssociativeProperty[current_cell] = tetra_cnt;
++tetra_cnt;
}
The issue is when i try to get neighbors of a particular tetrahedron, i run into issues.
I have tried CellCellIterator and it gives me nothing. So i wrote the code to do it in the most naive way possible also (i know its quadratic).
std::set< CellHandle > getUniqueNeighbouringTetsForGivenTets(CellHandle input_tetrahedron)
{
std::set< CellHandle > matching_cells;
std::set< FaceHandle > matching_faces = getFacesForGivenCell(input_tetrahedron);
HalfFaceMesh.enable_bottom_up_incidences(true);
for(auto mf_iter = matching_faces.begin(); mf_iter != matching_faces.end(); ++mf_iter)
{
for(CellIterator c_it = HalfFaceMesh.cells_begin(); c_it != HalfFaceMesh.cells_end(); ++c_it)
{
if(*c_it != input_tetrahedron)
{
std::set< FaceHandle > intermediate_matching_faces = getFacesForGivenCell(*c_it);
for(auto mff_iter = intermediate_matching_faces.begin(); mff_iter != intermediate_matching_faces.end(); ++mff_iter)
{
if(*mff_iter == *mf_iter)
{
matching_cells.emplace(*c_it);
}
}
}
}
}
return matching_cells;
}
I still do not get any neighbours at all. It almost seems like the neighbors are not associated automatically and basically one of the half faces of every face is just some garbage with an id -1.
Should i manually establish the half face connectivity between adjacent cells while building a mesh in open volume mesh ?
This was not the case in OpenMesh where we simply add polygons and edges are automatically split into half edges.
I am stuck and any help would be appreciated. Thanks in advance.
Kind regards,
S Vijai Kumar
Sent with [ProtonMail](https://protonmail.com) Secure Email.
Hi all,
Is there any feature related to mesh parametrization in OpenMesh?
I'm thinking in conformal mapping, distortion analysis or most isometric
parametrization, related to texture coordinates generation.
Thanks in advance!
--
Jordi Torres