Skip to content
Snippets Groups Projects
Commit 280918d7 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

more fixes for netgen
parent e60bf197
No related branches found
No related tags found
No related merge requests found
// $Id: 3D_Mesh.cpp,v 1.62 2004-06-26 21:34:50 geuzaine Exp $
// $Id: 3D_Mesh.cpp,v 1.63 2004-06-28 20:36:14 geuzaine Exp $
//
// Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle
//
......@@ -1024,6 +1024,7 @@ void Maillage_Volume(void *data, void *dum)
POINTS_TREE = THEM->Simplexes;
Tree_Action(v->Simplexes, add_points);
#if 0 // this is full of bugs :-)
if(CTX.mesh.quality) {
extern void SwapEdges3D(Mesh * M, Volume * v, double GammaPrescribed,
bool order);
......@@ -1034,8 +1035,9 @@ void Maillage_Volume(void *data, void *dum)
Msg(STATUS3, "Swapping edges (last pass)");
SwapEdges3D(THEM, v, CTX.mesh.quality, true);
}
#endif
#if 0 // this is wrong
#if 0 // this is full of bugs, too :-)
if(CTX.mesh.nb_smoothing) {
Msg(STATUS3, "Smoothing volume %d", v->Num);
tnxe = Tree_Create (sizeof (NXE), compareNXE);
......
// $Id: 3D_Mesh_Netgen.cpp,v 1.5 2004-06-28 19:00:22 geuzaine Exp $
// $Id: 3D_Mesh_Netgen.cpp,v 1.6 2004-06-28 20:36:14 geuzaine Exp $
//
// Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle
//
......@@ -168,8 +168,11 @@ void Netgen::MeshVolume()
Vertex **vtable = (Vertex **)Malloc(nbv * sizeof(Vertex*));
// Get existing vertices
for(int i = 0; i < List_Nbr(_vertices); i++)
for(int i = 0; i < List_Nbr(_vertices); i++){
List_Read(_vertices, i, &vtable[i]);
Tree_Insert(_vol->Vertices, &vtable[i]);
Tree_Insert(THEM->Vertices, &vtable[i]);
}
// Create new volume vertices
for(int i = List_Nbr(_vertices); i < nbv; i++) {
......
// $Id: Generator.cpp,v 1.55 2004-06-28 19:00:22 geuzaine Exp $
// $Id: Generator.cpp,v 1.56 2004-06-28 20:36:14 geuzaine Exp $
//
// Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle
//
......@@ -302,11 +302,12 @@ void Maillage_Dimension_3(Mesh * M)
Free_Volume_But_Not_Elements(&v, NULL);
// optimize quality
//if(CTX.mesh.quality) {
//for(int i = 0; i < List_Nbr(list); i++){
// List_Read(list, i, &v);
// Optimize_Netgen(v);
// }
if(CTX.mesh.quality) {
for(int i = 0; i < List_Nbr(list); i++){
List_Read(list, i, &v);
Optimize_Netgen(v);
}
}
List_Delete(list);
......
......@@ -13,6 +13,9 @@ Ng_Result NgAddOn_OptimizeVolumeMesh (Ng_Mesh * mesh, Ng_Meshing_Parameters * mp
mparam.maxh = mp->maxh;
mparam.meshsizefilename = mp->meshsize_filename;
m->CalcLocalH();
//MeshVolume (mparam, *m);
RemoveIllegalElements (*m);
OptimizeVolume (mparam, *m, NULL);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment