mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-24 04:50:34 +05:00
bug fix for surface-element lists
This commit is contained in:
parent
44ac64f85a
commit
dd50309393
@ -1381,12 +1381,13 @@ namespace netgen
|
||||
|
||||
if (!apoints.Size()) return;
|
||||
|
||||
|
||||
#define VERTSORT
|
||||
|
||||
#ifdef VERTSORT
|
||||
Vec<3> dir(1.2, 1.7, 0.9);
|
||||
for (int i = 0; i < apoints.Size(); i++)
|
||||
for (int j = 0; j < apoints.Size()-1; j++)
|
||||
if (apoints[j](2) > apoints[j+1](2))
|
||||
if ( (dir * Vec<3> (apoints[j])) > (dir * Vec<3> (apoints[j+1])))
|
||||
swap (apoints[j], apoints[j+1]);
|
||||
#endif
|
||||
|
||||
|
@ -3786,7 +3786,7 @@ namespace netgen
|
||||
|
||||
|
||||
mesh.ComputeNVertices();
|
||||
|
||||
mesh.RebuildSurfaceElementLists();
|
||||
|
||||
|
||||
// update identification tables
|
||||
|
@ -2297,6 +2297,8 @@ namespace netgen
|
||||
}
|
||||
}
|
||||
|
||||
RebuildSurfaceElementLists ();
|
||||
/*
|
||||
for (int i = 0; i < facedecoding.Size(); i++)
|
||||
facedecoding[i].firstelement = -1;
|
||||
for (int i = surfelements.Size()-1; i >= 0; i--)
|
||||
@ -2305,7 +2307,7 @@ namespace netgen
|
||||
surfelements[i].next = facedecoding[ind-1].firstelement;
|
||||
facedecoding[ind-1].firstelement = i;
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
timestamp = NextTimeStamp();
|
||||
// Compress();
|
||||
@ -4978,6 +4980,19 @@ namespace netgen
|
||||
}
|
||||
|
||||
|
||||
|
||||
void Mesh :: RebuildSurfaceElementLists ()
|
||||
{
|
||||
for (int i = 0; i < facedecoding.Size(); i++)
|
||||
facedecoding[i].firstelement = -1;
|
||||
for (int i = surfelements.Size()-1; i >= 0; i--)
|
||||
{
|
||||
int ind = surfelements[i].GetIndex();
|
||||
surfelements[i].next = facedecoding[ind-1].firstelement;
|
||||
facedecoding[ind-1].firstelement = i;
|
||||
}
|
||||
}
|
||||
|
||||
void Mesh :: GetSurfaceElementsOfFace (int facenr, Array<SurfaceElementIndex> & sei) const
|
||||
{
|
||||
static int timer = NgProfiler::CreateTimer ("GetSurfaceElementsOfFace");
|
||||
|
@ -290,6 +290,7 @@ public:
|
||||
{ return surfelements[ei]; }
|
||||
|
||||
|
||||
void RebuildSurfaceElementLists ();
|
||||
void GetSurfaceElementsOfFace (int facenr, Array<SurfaceElementIndex> & sei) const;
|
||||
|
||||
ElementIndex AddVolumeElement (const Element & el);
|
||||
|
@ -610,6 +610,7 @@ namespace netgen
|
||||
}
|
||||
|
||||
mesh.ComputeNVertices();
|
||||
mesh.RebuildSurfaceElementLists();
|
||||
return;
|
||||
|
||||
int cnttrials = 10;
|
||||
|
@ -287,7 +287,7 @@ namespace netgen
|
||||
}
|
||||
|
||||
mesh.ComputeNVertices();
|
||||
|
||||
mesh.RebuildSurfaceElementLists();
|
||||
// ValidateSecondOrder (mesh);
|
||||
}
|
||||
|
||||
|
@ -16,7 +16,7 @@ netgen_LDADD = $(top_builddir)/libsrc/visualization/libvisual.a \
|
||||
$(top_builddir)/libsrc/gprim/libgprim.la \
|
||||
$(top_builddir)/libsrc/linalg/libla.la \
|
||||
$(top_builddir)/libsrc/general/libgeneral.la \
|
||||
$(OCCLIBS) -L$(TK_BIN_DIR)/Togl1.7 $(TOGLLIBDIR) -lTogl1.7 $(LIBGLU) $(TK_LIB_SPEC) $(TCL_LIB_SPEC) $(MPI_LIBS) $(FFMPEG_LIBS) $(JPEGLIB_LIBS) $(PKG_LIBS)
|
||||
$(OCCLIBS) -L$(TK_BIN_DIR)/Togl1.7 $(TOGLLIBDIR) -lTogl1.7 $(LIBGLU) $(TK_LIB_SPEC) $(TCL_LIB_SPEC) $(MPI_LIBS) $(FFMPEG_LIBS) $(JPEGLIB_LIBS) $(PKG_LIBS)
|
||||
#
|
||||
# add for static linkage of ngsolve:
|
||||
# /opt/netgen/lib/libngsolve.a /opt/netgen/lib/libngcomp.a /opt/netgen/lib/libngcomp.a /opt/netgen/lib/libngfemng.a /opt/netgen/lib/libngmg.a /opt/netgen/lib/libngla.a /opt/netgen/lib/libngbla.a /opt/netgen/lib/libngstd.a -llapack
|
||||
|
@ -40,7 +40,6 @@ namespace netgen
|
||||
|
||||
|
||||
|
||||
|
||||
using netgen::parameters;
|
||||
using netgen::ngdir;
|
||||
using netgen::verbose;
|
||||
@ -348,7 +347,6 @@ extern "C" int Ng_Vis_Init (Tcl_Interp * interp);
|
||||
|
||||
// extern Tcl_PackageInitProc * Tk_SafeInit;
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
* Initialize packages
|
||||
|
Loading…
Reference in New Issue
Block a user