Coder Social home page Coder Social logo

ngsolve / netgen Goto Github PK

View Code? Open in Web Editor NEW
264.0 25.0 128.0 11.87 MB

Home Page: https://ngsolve.org

License: GNU Lesser General Public License v2.1

CMake 1.21% Shell 0.49% C++ 74.60% HTML 1.37% C 13.03% Tcl 4.46% M4 2.99% Makefile 0.24% Python 1.32% JavaScript 0.01% BlitzBasic 0.05% GLSL 0.22% PowerShell 0.01%
mesh-generator

netgen's Introduction

netgen's People

Contributors

alexschlueter avatar bkapidani avatar bschwb avatar chrlackner avatar cwintersteiger avatar francesco-ballarin avatar gkitzler avatar hvonwah avatar j-zimmermann avatar jschoeberl avatar kkremitzki avatar looooo avatar luzpaz avatar mhochsteger avatar michaelneunteufel avatar mneunteufel avatar mrambausek avatar nilswagner avatar schruste avatar shirnschall avatar stefanbruens avatar vgeza avatar xiaodaxia-2008 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

netgen's Issues

Unable to output mesh file

My system environment is as follows:
centos7.6
gcc7.5.0
python3.7

I successfully compiled and ran netgen,But I found that there was no way to output mesh files.
Error message is:
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Export mesh to file /home/dfm/netgen/example/s.mesh, format is Neutral Format (.mesh)
ERROR: Sorry, nothing known about file format Neutral Format (
.mesh)

errinfo: Sorry, nothing known about file format Neutral Format (*.mesh)

while executing

"Ng_ExportMesh $file $exportfiletype"
invoked from within
".#ngmenu.#ngmenu#file invoke active"
("uplevel" body line 1)
invoked from within
"uplevel #0 [list $w invoke active]"
(procedure "tk::MenuInvoke" line 50)
invoked from within
"tk::MenuInvoke .#ngmenu.#ngmenu#file 1"
(command bound to event)
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

I look forward to your help

6.2.2007 throws an error

netgen --version
terminate called after throwing an instance of 'std::invalid_argument'
  what():  stoi

the software stack is built with gcc 9.3.0.

The latest stable version is 6.2.2006 does not show this issue.

Several PRs needing attention

Hello netgen team,
Just wanted to check in and ask if there is an issue with the PRs that are pending? Would you mind reviewing them ?

Thanks!

Incremental meshing on existing tetrahedron meshes

Hi,

Is netgen capable of generating incremental meshes on existing tetrahedron meshes? I want to add some electrode patch on a cylinder (which is a simple binary, existing tetrahedron mesh).

Benyuan

bc and mat will be erroneous merged in netgen.csg

Hi, I want to merge/combine some cylinders in netgen.csg, where 1 big cylinder is the domain to be investigated and two small cylinders are electrodes (voltage/current boundaries). I specify the bcs on the top surface of a cylinder primitive. However, the bc will be erroneous merged. Here is a minimal example that recreates this problem. Moreover, the material properties of the small cylinders (electrodes) are also merged, which can be seen in mesh.GetMaterials().

Can I preserve the bc and mat of the small shapes when using + in netgen.csg?

https://github.com/liubenyuan/netgen-note/blob/master/examples/csg_issue_bc_cyl.py

At line 78, if you comment this line p0[0] += 0.01, the bc="e1" will be removed, if uncomment this line, bc="e1" will be visible. The material properties of electrodes (which should be 'agcl') is gone, where only 'g0' is preserved.

import numpy as np
from netgen import csg
from ngsolve.comp import Mesh


def cylinder(p0, p1, unit_vec, r, bc="bc"):
    """ a pointed cylinder (numpy interface) """
    # generate CSG primitives
    csg_p0 = csg.Pnt(p0[0], p0[1], p0[2])
    csg_p1 = csg.Pnt(p1[0], p1[1], p1[2])
    csg_vec = csg.Vec(unit_vec[0], unit_vec[1], unit_vec[2])

    # generate cylinder shape
    bot = csg.Plane(csg_p0, -csg_vec)
    top = csg.Plane(csg_p1, csg_vec)
    cy_surface = csg.Cylinder(csg_p0, csg_p1, r)
    
    # specify bc on top
    top.bc(bc)

    # geo
    cy = top * cy_surface * bot
    
    return cy


def unit_cylinder(h=1.0, r=0.5, bc="cyl"):
    """ scaled unit z-axis cylinder """
    p0 = [0, 0, 0]
    p1 = [0, 0, h]
    unit_vec = [0, 0, 1]
    return cylinder(p0, p1, unit_vec, r, bc)


def electrode_cylinder(p0=[0, 0, 0], unit_vec=[1, 0, 0], shape=[0.1, 0.1],
                       bc="e0"):
    """
    cylinder electrode (numpy interface)

    shape: NDArray
        [radius, thickness]
    """
    r, thick = shape
    # calculate the center of the other face
    p1 = np.asarray(p0) + thick * np.asarray(unit_vec)

    # generate cylinder electrode with annotation
    ele = cylinder(p0, p1, unit_vec, r, bc)
    ele.mat('agcl')

    return ele


def cylinder_with_electrodes():
    """ [test only, will be deleted] """
    h = 1.0
    r = 0.5
    g0 = unit_cylinder(h=h, r=r)
    g0.mat('g0')

    # generate cylinder electrode
    ele_shape = [0.1, 0.1]  # radius, thick
    thick = ele_shape[1]
    ele_pos = [30, h/2.0]  # angle (degree), z
    
    # infer locations
    rad = ele_pos[0] * 2 * np.pi / 360.0
    unit_vec = np.array([np.cos(rad), np.sin(rad), 0])
    # warning: a thin contact of electrode with domain will cause
    # netgen failed to generate proper mesh
    p0 = (r - thick/2.0)*unit_vec
    p0[2] = ele_pos[1]

    # place 1st electrode
    ele = electrode_cylinder(p0, unit_vec, shape=ele_shape, bc="e0")
    geo = g0 + ele
    
    # place 2nd electrode
    p0[2] += 0.25
    p0[0] += 0.01  # <-- https://github.com/NGSolve/netgen/issues/49
    ele2 = electrode_cylinder(p0, unit_vec, shape=ele_shape, bc="e1")
    geo = geo + ele2
    
    return geo


if __name__ == "__main__":
    g = cylinder_with_electrodes()
    geo = csg.CSGeometry()
    geo.Add(g)

    ngmesh = geo.GenerateMesh(maxh=0.1)

    mesh = Mesh(ngmesh)
    # mesh.Curve(3)
    
    print(mesh.GetBoundaries())
    print(mesh.GetMaterials())

Environment variable NGS_NUM_THREADS not respected

I currently have the problem that the environment variable NGS_NUM_THREADS is not respected when running netgen:

> export NGS_NUM_THREADS=1                                                                                
> netgen -geofile=/usr/share/netgen/torus.geo -meshfile=out.mesh -batchmode 
NETGEN-6.2-dev
Developed by Joachim Schoeberl at
2010-xxxx Vienna University of Technology
2006-2010 RWTH Aachen University
1996-2006 Johannes Kepler University Linz
Including OpenCascade geometry kernel
optfile ./ng.opt does not exist - using default values
togl-version : 2
no OpenGL
OCC module loaded
 Load CSG geometry file /usr/share/netgen/torus.geo
 Calc Triangle Approximation
 Object 0 has 882 triangles
[...]
task-based parallelization (C++11 threads) using 4 threads
[...]
task-based parallelization (C++11 threads) using 4 threads
[...]

Am I missing something out? Thanks!

netgen.csg adopt an numpy like input?

Hi, I found that writing the CSG using Pnt and Vec is combersome, especially the geometric arithmetic is done using numpy.

For example,

def cylinder(p0, p1, unit_vec, r):
    """ a pointed cylinder (numpy interface) """
    # generate CSG
    csg_p0 = csg.Pnt(p0[0], p0[1], p0[2])
    csg_p1 = csg.Pnt(p1[0], p1[1], p1[2])
    csg_vec = csg.Vec(unit_vec[0], unit_vec[1], unit_vec[2])
    
    # generate shape
    bot = csg.Plane(csg_p0, -csg_vec)
    top = csg.Plane(csg_p1, csg_vec)
    cy_surface = csg.Cylinder(csg_p0, csg_p1, r)
    cy = top * cy_surface * bot
    
    return cy

It would be much better if Pnt and Vec accept a numpy input, for example,

p0 = np.array([0, 0, 0])
v0 = np.array([0, 0, 1])
dist = 0.2
p1 = p0 + dist * v0

csg_p0 = csg.Pnt(p0)
csg_p1 = csg.Pnt(p1)
csg_vec = csg.Vec(v0)

BTW, will netgen support Pnt and Vec arithmetic? i.e., the following code yield an error.

p0 = csg.Pnt(0, 0, 0)
vec = csg.Vec(0, 0, 1)
p1 = p0 + vec*0.2

Unable to create temporary OpenGL window

Upon startup I get the following error:

NETGEN-6.2-dev
Developed by Joachim Schoeberl at
2010-xxxx Vienna University of Technology
2006-2010 RWTH Aachen University
1996-2006 Johannes Kepler University Linz
Including OpenCascade geometry kernel
optfile ./ng.opt does not exist - using default values
togl-version : 2
Unable to create temporary OpenGL window
no OpenGL
OCC module loaded

I have traced this error to the following code in Togl:

wnd = CreateWindow(ClassName, "test OpenGL capabilities",
        WS_OVERLAPPEDWINDOW | WS_CLIPSIBLINGS | WS_CLIPCHILDREN,
        0, 0, 1, 1, parent, NULL, instance, NULL);
if (wnd == NULL) {
    fprintf(stderr, "Unable to create temporary OpenGL window\n");
    return NULL;
}

All other OpenGL applications running fine (OCE, VTK, Python...) this is is specific to netgen package.

Compiled using latest MSYS2/MinGW64 on Windows 10 64 bit, GTX 1060 OpenGL Card.
Thank you.

Errors while running tests

I'm trying to run the tests while packaging this for Gentoo and ran into failing tests

Start testing: Oct 15 12:41 -00
----------------------------------------------------------
1/7 Testing: unit_tests_built
1/7 Test: unit_tests_built
Command: "/usr/bin/cmake" "--build" "." "--target" "unit_tests" "--config" "Gentoo"
Directory: /var/tmp/portage/sci-mathematics/netgen-6.2.2008/work/netgen-6.2.2008_build/tests/catch/../..
"unit_tests_built" start time: Oct 15 12:41 -00
Output:
----------------------------------------------------------
[1/1] cd /var/tmp/portage/sci-mathematics/netgen-6.2.2008/work/netgen-6.2.2008_build && /usr/bin/cmake -DBDIR=/var/tmp/portage/sci-mathematics/netgen-6.2.2008/work/netgen-6.2.2008_build -P /var/tmp/portage/sci-mathematics/netgen-6.2.2008/work/netgen-6.2.2008/cmake/generate_version_file.cmake
-- Found Git: /usr/bin/git (found version "2.28.0") 
CMake Warning at /var/tmp/portage/sci-mathematics/netgen-6.2.2008/work/netgen-6.2.2008/cmake/generate_version_file.cmake:18 (MESSAGE):
  Could not determine git-version from source code - assuming 6.2.0.0


<end of output>
Test time =   0.03 sec
----------------------------------------------------------
Test Passed.
"unit_tests_built" end time: Oct 15 12:41 -00
"unit_tests_built" time elapsed: 00:00:00
----------------------------------------------------------

2/7 Testing: unit_archive
2/7 Test: unit_archive
Command: "/var/tmp/portage/sci-mathematics/netgen-6.2.2008/work/netgen-6.2.2008_build/tests/catch/test_archive"
Directory: /var/tmp/portage/sci-mathematics/netgen-6.2.2008/work/netgen-6.2.2008_build/tests/catch
"unit_archive" start time: Oct 15 12:41 -00
Output:
----------------------------------------------------------
terminate called after throwing an instance of 'std::invalid_argument'
  what():  stoi
<end of output>
Test time =   0.00 sec
----------------------------------------------------------
Test Failed.
"unit_archive" end time: Oct 15 12:41 -00
"unit_archive" time elapsed: 00:00:00
----------------------------------------------------------

3/7 Testing: unit_array
3/7 Test: unit_array
Command: "/var/tmp/portage/sci-mathematics/netgen-6.2.2008/work/netgen-6.2.2008_build/tests/catch/test_array"
Directory: /var/tmp/portage/sci-mathematics/netgen-6.2.2008/work/netgen-6.2.2008_build/tests/catch
"unit_array" start time: Oct 15 12:41 -00
Output:
----------------------------------------------------------
===============================================================================
All tests passed (37 assertions in 1 test case)

<end of output>
Test time =   0.00 sec
----------------------------------------------------------
Test Passed.
"unit_array" end time: Oct 15 12:41 -00
"unit_array" time elapsed: 00:00:00
----------------------------------------------------------

4/7 Testing: unit_symboltable
4/7 Test: unit_symboltable
Command: "/var/tmp/portage/sci-mathematics/netgen-6.2.2008/work/netgen-6.2.2008_build/tests/catch/test_symboltable"
Directory: /var/tmp/portage/sci-mathematics/netgen-6.2.2008/work/netgen-6.2.2008_build/tests/catch
"unit_symboltable" start time: Oct 15 12:41 -00
Output:
----------------------------------------------------------
terminate called after throwing an instance of 'std::invalid_argument'
  what():  stoi
<end of output>
Test time =   0.00 sec
----------------------------------------------------------
Test Failed.
"unit_symboltable" end time: Oct 15 12:41 -00
"unit_symboltable" time elapsed: 00:00:00
----------------------------------------------------------

5/7 Testing: unit_utils
5/7 Test: unit_utils
Command: "/var/tmp/portage/sci-mathematics/netgen-6.2.2008/work/netgen-6.2.2008_build/tests/catch/test_utils"
Directory: /var/tmp/portage/sci-mathematics/netgen-6.2.2008/work/netgen-6.2.2008_build/tests/catch
"unit_utils" start time: Oct 15 12:41 -00
Output:
----------------------------------------------------------
terminate called after throwing an instance of 'std::invalid_argument'
  what():  stoi
<end of output>
Test time =   0.00 sec
----------------------------------------------------------
Test Failed.
"unit_utils" end time: Oct 15 12:41 -00
"unit_utils" time elapsed: 00:00:00
----------------------------------------------------------

6/7 Testing: unit_version
6/7 Test: unit_version
Command: "/var/tmp/portage/sci-mathematics/netgen-6.2.2008/work/netgen-6.2.2008_build/tests/catch/test_version"
Directory: /var/tmp/portage/sci-mathematics/netgen-6.2.2008/work/netgen-6.2.2008_build/tests/catch
"unit_version" start time: Oct 15 12:41 -00
Output:
----------------------------------------------------------
===============================================================================
All tests passed (7 assertions in 1 test case)

<end of output>
Test time =   0.00 sec
----------------------------------------------------------
Test Passed.
"unit_version" end time: Oct 15 12:41 -00
"unit_version" time elapsed: 00:00:00
----------------------------------------------------------

I do have C++ catch installed so I am not sure what is going wrong here.

Thanks,
Aisha

6.2.1808 -> 6.2.2004 interface changes

Is there any documentation about interface changes between these versions. As you might know FreeCAD is relying on netgen via smesh and we currently see problems in updating to the latest available netgen version.
What happend to OCCRefinementSurfaces?

netgen -batchmode not passing filenames in -geofile

When calling netgen -batchmode -geofile=xyz.geo the xyz.geo was not passing out to ng.tcl. I guess the Tcl interpreter was swallowing the string before it got back out to the ng.tcl at line 156. It needs to be copied before being passed.

set geofilename [Ng_GetCommandLineParameter geofile]

Tcl version 8.6. Ubuntu 18.04. Latest git revision: commit 15e6802.

The fix:

diff --git a/ng/ngpkg.cpp b/ng/ngpkg.cpp
index 102208c..e18db3c 100644
--- a/ng/ngpkg.cpp
+++ b/ng/ngpkg.cpp
@@ -1302,7 +1302,7 @@ namespace netgen
 
     if (parameters.StringFlagDefined (argv[1]))
       Tcl_SetResult (interp,
-                    (char*)parameters.GetStringFlag (argv[1], NULL).c_str(), TCL_STATIC);
+                    (char*)parameters.GetStringFlag (argv[1], NULL).c_str(), TCL_VOLATILE);
     else if (parameters.NumFlagDefined (argv[1]))
       {
        sprintf (buf, "%lf", parameters.GetNumFlag (argv[1], 0));

v6.2.2007: win: A dynamic link library (DLL) initialization routine failed.

Seeing this issue here:
https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=188298&view=logs&jobId=e5cdccbf-4751-5a24-7406-185c9d30d021&j=171a126d-c574-5c8c-1269-ff3b989e923d&t=1183ba29-a0b5-5324-8463-2a49ace9e213

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "D:\bld\netgen_1595537404202\_test_env\lib\site-packages\netgen\__init__.py", line 13, in <module>
    from . import libngpy
ImportError: DLL load failed: A dynamic link library (DLL) initialization routine failed.

IIRC there was a similar issue some times ago which was solved by disabling USE_NATIVE_ARCH. Not sure why this comes up again.

edit: no idea what is wrong here. We didn't run into this issue with v6.2.2006

Ng_DeleteMesh - crash

Hi,

I am using netgen to load a step file. (nglib::Ng_OCC_Load_STEP)

at the end of my function, I am deleting the existing netgen object using

nglib::Ng_OCC_DeleteGeometry(ng_geom);
nglib::Ng_DeleteMesh(mesh)

I am getting a crash during the following call Ng_DeleteMesh

        // Now delete the Mesh class itself
         delete (Mesh*)mesh;

error is happening during the delete

stacktrace

image

meshclass object is causing a problem during its destruction. https://github.com/NGSolve/netgen/blob/master/libsrc/meshing/meshclass.cpp#L82

system

ubuntu 18.04
clang 6.0
netgen v6.2.1910
oce-dev 0.18.2-2build1 from ubuntu packages

Edit Face Mesh Size broken

Hi, new user to netgen. I'm on up to date Arch Linux trying to run Netgen 6.2-dev as installed from the AUR. When I try to use Edit Face Mesh Size in the geometry menu I get the following error and the pop-up window is entirely empty.

ERROR: unknown option "-padx"
errinfo: unknown option "-padx"
    while executing
"ttk::label $w.face.ent -text 1 -padx 4"
    (procedure "surfacemeshsizedialog" line 11)
    invoked from within
"surfacemeshsizedialog "
    invoked from within
".#ngmenu.#ngmenu#geometry invoke active"
    ("uplevel" body line 1)
    invoked from within
"uplevel #0 [list $w invoke active]"
    (procedure "tk::MenuInvoke" line 50)
    invoked from within
"tk::MenuInvoke .#ngmenu.#ngmenu#geometry 1"
    (command bound to event)

Using Netgen to perform boolean between 3D volumetric mesh components

Hi,
Can i use Netgen to do boolean operators between 3D volumetric mesh?
For example, I want to take a mesh file of a full cube, and create a thin shell of the cube (subtract the inside of the cube).
Afterwards i want to add the inside of the cube but I want to change it's geometry, so it won't be a full solid but will have holes.
This boolean operation can be performed using STLs, i know, but I want to perform it on the volumetric mesh files.
Can Netgen do it?

Can netgen generate surface mesh on TopoDS_Face without meshing its boundary wire?

Currently if one wants to meshing a opencascade TopoDS_Face, the boudnary wires should be meshed firstly, and passing the mesh nodes into netgen::Mesh object which is what occgenmesh.cpp::OCCFindEdges() does exactly.

But I consider the meshing of boundary wire is not neccessary if the user provides a closed loop of meshed nodes, and then we can project the node on to the TopoDS_Face to form a closed edge loop on UV plane. This offers the same data as OCCFindEdges() do .

So my question is that will the second way above succeed in netgen?

Use MPI_DATATYPE_NULL instead of NULL, since MPI gives the freedom to implementors on how to represent it

kl-18448:netgen szampini$ git branch

/Users/szampini/Devel/ngsolve/external_dependencies/netgen/libsrc/meshing/meshtype.cpp:23:32: warning: implicit conversion of NULL constant to 'MPI_Datatype' (aka 'int') [-Wnull-conversion]
static MPI_Datatype type = NULL;
~~~~ ^~~~
0
/Users/szampini/Devel/ngsolve/external_dependencies/netgen/libsrc/meshing/meshtype.cpp:24:33: warning: implicit conversion of NULL constant to 'MPI_Datatype' (aka 'int') [-Wnull-conversion]
static MPI_Datatype htype = NULL;
~~~~~ ^~~~
0
2 warnings generated.

You should use MPI_DATATYPE_NULL, since MPICH uses integer variables for MPI null objects, see https://www.mpich.org/static/docs/latest/www3/Constants.html

Meshing a quad surface failed, What could the problem be?

I use nglib to mesh a opencascade TopoDS_Face(generated by BRepFill_Filling from a closed wire), but netgen gives out such a result:

bad_meshing_result

the four small cube are vertex of the TopoDS_Face, the surface is slightly curved. It seems that netgen cannot find the boundary.

Fails to build with PYTHON=OFF

I only want to build nglib without visualization and python support. So far, I was unable to build netgen with

Enabled functionality:

    OCC: ............... ON
    JPEGlib: ........... OFF
    FFMPEG: ............ OFF
    GUI: ............... OFF
    MPI: ............... OFF
    PYTHON: ............ OFF

because pybind is still included.

In file included from /Users/miho/software/netgen/libsrc/meshing/meshclass.cpp:4:
/Users/miho/software/netgen/libsrc/core/python_ngcore.hpp:5:10: fatal error: 'pybind11/pybind11.h' file not found

Two Free Solids volumic meshing produces two volumic meshes

Dear Netgen Community,

It seems there is a different behavior if you specify your geometry using CSG format (.geo) or if you use OpenCASCADE CAD format (.step with colors).

I have a .step geometry made of two solids - a sphere and a box. The sphere is fully contained within the box. It is similar to the trafo.geo example where 4 different solids are fully contain within one box: https://github.com/NGSolve/netgen/blob/master/tutorials/trafo.geo

As it is the case with the trafo.geo example, my goal is to have a single volume mesh where the surface boundary is respected by the volume mesh and where all Tet elements are connected to each others.

However, what is obtain is a simple append of two unconnected volume mesh, one for the sphere and one for the box.

The .step file is include in the sphere_in_cube.zip file here attached:
sphere_in_cube.zip

Result of a connectivity filter in Paraview shows two distinct unconnected volume mesh:
image

Linking issues

Hi Team NETGEN
I've been trying to build the library for a while, in vain.
I installed/uninstall/reinstall the required libraries but still get some linking errors:
/*
In function Ng_Init': /fem/netgen/ng/ngpkg.cpp:3440: undefined reference to Togl_CreateFunc'
/fem/netgen/ng/ngpkg.cpp:3441: undefined reference to Togl_DestroyFunc' /fem/netgen/ng/ngpkg.cpp:3442: undefined reference to Togl_DisplayFunc'
/fem/netgen/ng/ngpkg.cpp:3443: undefined reference to Togl_ReshapeFunc' /fem/netgen/ng/ngpkg.cpp:3445: undefined reference to Togl_CreateCommand'
/fem/netgen/ng/ngpkg.cpp:3446: undefined reference to `Togl_CreateCommand'
*/
Please, can someone tell me what i am missing here.
Ps: Also, I'd like to build the library without Python if possible.
Mysystem= ubuntu LTS18.04

All the best,
zaq

Running ng_occ throws uncaught exception and crashes

running the ng_occ example in nglib/ng_occ.cpp results in the following exception:

ngcore::Exception: ProjectPointGI not overloaded in classnetgen::NetgenGeometry

The throw is located in libsrc/meshing/basegeom.hpp:111

Full output:

Netgen NgLib - OpenCascade Test Case
 Number of colours in STEP File: 0
Highest entry in topology hierarchy:
1 solid(s)
Successfully loaded STEP File: cyl.stp
ng_res = 0
Successfully extracted the Face Map....:3
Index: 1 :: Area: 1260.01 :: Hash: 48081
Index: 2 :: Area: 313.655 :: Hash: 61793
Index: 3 :: Area: 313.655 :: Hash: 64785
Setting Local Mesh size.....
OCC Mesh Pointer before call = 0x7fd1f2800600
Local Mesh size successfully set.....
OCC Mesh Pointer after call = 0x7fd1f2800600
Creating Edge Mesh.....
Edge Mesh successfully created.....
Number of points = 27
Creating Surface Mesh.....
 load internal triangle rules
 Face 1 / 3 (plane space projection)
 Surface meshing done
 0 illegal triangles
 Face 2 / 3 (plane space projection)
 Surface meshing done
 0 illegal triangles
 Face 3 / 3 (plane space projection)
 Surface meshing done
 0 illegal triangles
 Optimize Surface 1
 Edgeswapping, topological
 Smoothing
libc++abi.dylib: terminating with uncaught exception of type ngcore::Exception: ProjectPointGI not overloaded in classnetgen::NetgenGeometry

Looks like the implementation of ProjectPointGI() is missing.

Shared library version/SONAME not properly set

Netgen provides several shared libraries, e.g. nglib. However, the resultant libnglib.so does not have its SONAME set properly, which is problematic for packaging Netgen and for other applications depending on it.

There is additional CMake configuration needed to fix this. For example, there should be something that functionally does this:

set_target_properties(nglib PROPERTIES VERSION 6.2.1804 SOVERSION 6.2)

The actual implementation should replace nglib something that targets all the shared libraries, and use things like ${NETGEN_VERSION_MAJOR} as well in replacement of the concrete example above.

Cell count estimation from meshing parameters

There are few meshing parameters to control the mesh generated. Is there any parameter or parameter computation logic to predict/set the number of cells to be generated?
It would be suffice to approximately predict number of cells for given parameters.

Thanks
Vishnu C

osx: smesh: error: 'auto' return without trailing return type; deduced return types are a C++14 extension

I can't compile smesh on osx, because of these kind of errors. The errors are caused by header files in netgen. Somehow it's working on linux (no idea why). Also compiling netgen works on osx. So I wonder if there is the need to set some flags to get this working...

The build can be found here: https://circleci.com/gh/conda-forge/smesh-feedstock/86?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link

Why do you define several Point types?

I think a Point3D object, and a Point2D object is enough.

you defined Point template, and Point3d object, seems a little redundant.

And, why some array objects' index start from 1, and some start from 0? can they both start from 0? It's a little confusing.

Question: what is the C++ equivalent of `mesh.Export()`

What is the C++ equivalent to

mesh.Export("export.stl")

or

mesh.Export("export.msh","Gmsh Format")

For me, the python binding is not self explanatory. Is there documentation on how to convert between the supported volume/surface formats?

Thanks!

redefinition of DLL_HEADER

I try to build a version of FreeCAD with netgen enabled for FEM meshing. But it looks like that something does not work and the meshes are broken (OT but if someone has some idea in this direction, please follow the thread in the FC forum: https://forum.freecadweb.org/viewtopic.php?f=4&t=37249)

I saw repeatedly, that there are some warnings in the compiler log, usually like this:

00:29:35 O: In file included from /usr/include/netgen/include/../general/myadt.hpp:17,
00:29:35 O:                  from /usr/include/netgen/include/../meshing/../include/myadt.hpp:1,
00:29:35 O:                  from /usr/include/netgen/include/../meshing/meshing.hpp:6,
00:29:35 O:                  from /usr/include/netgen/include/meshing.hpp:1,
00:29:35 O:                  from /usr/include/netgen/include/../occ/occgeom.hpp:12,
00:29:35 O:                  from /usr/include/netgen/include/occgeom.hpp:1,
00:29:35 O:                  from /build/freecad-daily-0.19+git201907030013~daily/src/3rdParty/salomesmesh/src/NETGENPlugin/NETGENPlugin_NETGEN_3D.cpp:73:
00:29:35 O: /usr/include/netgen/include/../general/../include/mydefs.hpp:26: warning: "DLL_HEADER" redefined
00:29:35 O:        #define DLL_HEADER __attribute__ ((visibility ("default")))
00:29:35 O:
00:29:35 O: In file included from /build/freecad-daily-0.19+git201907030013~daily/src/3rdParty/salomesmesh/inc/NETGENPlugin_Mesher.hxx:42,
00:29:35 O:                  from /build/freecad-daily-0.19+git201907030013~daily/src/3rdParty/salomesmesh/inc/NETGENPlugin_NETGEN_3D.hxx:35,
00:29:35 O:                  from /build/freecad-daily-0.19+git201907030013~daily/src/3rdParty/salomesmesh/src/NETGENPlugin/NETGENPlugin_NETGEN_3D.cpp:31:
00:29:35 O: /usr/include/netgen/nglib.h:33: note: this is the location of the previous definition
00:29:35 O:     #define DLL_HEADER

The problem is, this piece of code:

netgen/nglib/nglib.h

Lines 24 to 34 in 95efdd2

// Philippose - 14.02.2009
// Modifications for creating a DLL in Windows
#ifdef WIN32
#ifdef NGLIB_EXPORTS || nglib_EXPORTS
#define DLL_HEADER __declspec(dllexport)
#else
#define DLL_HEADER __declspec(dllimport)
#endif
#else
#define DLL_HEADER
#endif

if nglib.h is used together with some other header which includes mydefs.hpp it will come to this redefintion:
#ifdef WIN32
#if NGINTERFACE_EXPORTS || NGLIB_EXPORTS || nglib_EXPORTS
#define DLL_HEADER __declspec(dllexport)
#else
#define DLL_HEADER __declspec(dllimport)
#endif
#else
#if __GNUC__ >= 4
#define DLL_HEADER __attribute__ ((visibility ("default")))
#else
#define DLL_HEADER
#endif
#endif

Now, the bad thing is, both codes are different - the one in mydefs.hpp was changed more recently.
I guess there should be some include guard or the DLL_HEADER should be put into a separate header file.
There is also nginterface.hpp which defines DLL_HEADER.
As far as I can see, the project builds just fine otherwise.

I also do not fully understand the structure of the header files. At least on debian, there are several files duplicated: https://packages.debian.org/sid/amd64/netgen-headers/filelist
For example /usr/include/netgen/include/{mydefs.hpp,nginterface.h} are the same as /usr/include/netgen/{mydefs.hpp,nginterface.h}.
Other files in the /usr/include/netgen/include folder simply include just one file with the same name in another subfolder of /usr/include/netgen/, others define own stuff. Is all this duplication necessary or just backwards compatability?

Thanks in advance!

valgrind errors

During porting of NETGEN-plugin of SALOME to NETGEN-6 I faced an error like SIGSEGV. I applied valgrind to my program and it showed me two errors in netgen

  1. Invalid read at meshing2.cpp:679
      const auto& pout3d = locpoints.Get(pouti);
      locpoints.Append (pout3d);             // <<--- error occures here.

pout3d is deleted when locpoints resizes in Append(). To fix, remove & as follows

  auto pout3d = locpoints.Get(pouti);
  1. Conditional jump or move depends on uninitialised value at meshing2.cpp:1404
     if(maxarea > 0 && meshedarea-meshedarea_before > maxarea)

The uninitialised value here is meshedarea whose uninitialised value is set at line 361

meshedarea = mesh.SurfaceArea();

because Mesh::CSurfaceArea::area is not initialized in CSurfaceArea constructor

gcc7: some conda builds are failing

please have a look at:
conda-forge/netgen-feedstock#14

For linux we build for gcc (4.8 / 7.3) x py (2.7 / 3.6 / 3.7). So this is alread a quite big build-matrix. Maybe someone can have a look and give some hints for the problems. Maybe some modifications in the source could make netgen more solid for compiling on different system / distros.

Compile Question

Can netgen compile on Win7 Operation? Is python3.5 required?
When I cancel the gui and python option, Errors happend in compiling.

error info as followings:
NGSolveBin\netgen\CMakeFiles\CMakeTmp\CheckIncludeFiles.c(2): fatal error C1083: 无法打开包括文件: “dlfcn.h”: No such file or directory

v6.2.1909 - Windows build, MeshVolume, Heap Corruption (C0000374)

I was trying to volume mesh the attached file (file.zip, contains heap_corruption.stl) without surface meshing.
Function used: MESHING3_RESULT MeshVolume (const MeshingParameters & c_mp, Mesh& mesh3d)
The input stl file has a bad surface mesh so I was excepting netgen to throw an exception, but the program exited with exit code -1073740940 (C0000374), which refers to Heap Corruption.

Is there a version of Netgen that is handling the Heap Corruption issue and throws an exception before this happens?

The following are the print statements:

 number of triangles = 876
 topology_ok = 1
 orientation_ok = 1
 topology found
 Check overlapping geometry ... 0 triangles overlap
 CalcLocalH: 438 Points 0 Elements 876 Surface Elements
 Check subdomain 1 / 1

 Meshing subdomain 1 of 1
 Use internal rules
 Delaunay meshing
 number of points: 438
 blockfill local h
 number of points: 477
 Points: 477
 Elements: 2858
 Tree data entries per element: 1.57453
 Tree nodes per element: 0.0311407
 SwapImprove
 SwapImprove
 SwapImprove
 SwapImprove
 0 degenerated elements removed
 Remove intersecting
 Remove outer
 445 points, 233 elements
 start tetmeshing
 Use internal rules
 ImproveMesh
 CombineImprove
 ImproveMesh
 SwapImprove
 SwapImprove2
 ImproveMesh
 CombineImprove
 ImproveMesh
 SwapImprove
 SwapImprove2
 ImproveMesh
 CombineImprove
 ImproveMesh
 SwapImprove

Get rid of global static variables (meshing parameters, logging, 'multithread', etc)

Netgen uses global static instances to store the meshing parameters, and process information, e.g. to terminate the task (netgen::multithread.terminate).

This design makes it dangerous/error prone to use Netgen functionality simultaneously from a single process.
I usually just patch 'mycout' and 'mycerr' etc. to a nullstream (see below). But this only prevents crashes, and does not solve the issue.

class NullStreambuf : public std::streambuf
   {
      char dummyBuffer[64];
   protected:
      virtual int overflow(int c)
      {
         setp(dummyBuffer, dummyBuffer + sizeof(dummyBuffer));
         return (c == traits_type::eof()) ? '\0' : c;
      }
   };

void Ng_Init () {
  static ostream* null_stream = new ostream(new NullStreambuf);
  mycerr = null_stream;
  ...
}

Surface meshing for sheets

I want to perform surface meshing on sheets. But in the netgen GUI, when a sheet file is loaded, it doesn't load because in a sheet the boundary triangles have only 2 neighbours. I looked into the C++ API and found the following functions:

  • Ng_AddPoint_2D
  • Ng_AddBoundarySeg_2D

But they create 2D mesh with only x and y coordinates.

There is Ng_Geometry_2D which is used to expose SplineGeometry2d, but I wasn't sure if this is the data structure for what I wanted to do.

Could you please let me know which data structure and meshing function could be used to perform surface meshing on sheets?

netgen build fails in archlinux and anaconda

Hi, I have anaconda and archlinux installed, and using netgen-git from the AUR of archlinux. However I failed to build netgen, and the error logs are,

[ 99%] Linking CXX executable netgen
/usr/bin/ld: /usr/lib/libSM.so.6: undefined reference to `uuid_generate@UUID_1.0'
/usr/bin/ld: /usr/lib/libSM.so.6: undefined reference to `uuid_unparse_lower@UUID_1.0'
collect2: error: ld returned 1 exit status
make[5]: *** [ng/CMakeFiles/netgen.dir/build.make:157: ng/netgen] Error 1
make[4]: *** [CMakeFiles/Makefile2:1732: ng/CMakeFiles/netgen.dir/all] Error 2
make[3]: *** [Makefile:163: all] Error 2
make[2]: *** [CMakeFiles/netgen.dir/build.make:116: dependencies/src/netgen-stamp/netgen-build] Error 2
make[1]: *** [CMakeFiles/Makefile2:105: CMakeFiles/netgen.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

Any suggestion?

Issue with TK internal representations (tkInt.h, TkWindow)

Hello, I'm trying to compile netgen on my gentoo linux box. I have tcl and tk version 8.6.6 installed, as well as tix-8.4.3 and togl-2.0.

When build target togl I get the an error that cmake is not finding tkInt.h in togl.c. As this is an tk internal header file, which I have not seen installed for a very long time together with tk, I tried to commenting out the #include statement but now I'm getting an error about TkWindow, which, to my knowledge is also the internal representation of Tk_Window and usually not available in the system include files.

These are the errors as noted above:

[ 90%] Building C object ng/Togl2.1/CMakeFiles/togl.dir/togl.c.o
cd /var/tmp/portage/sci-mathematics/netgen-6.2.1804/work/netgen-6.2.1804_build/ng/Togl2.1 && /usr/bin/mpicc -DFFMPEG -DHAVE_DLFCN_H -DINTERNAL_TCL_DEFAULT=1 -DJPEGLIB -DMETIS -DNETGEN_VERSION=\"6.2-dev\" -DNG_PYTHON -DOPENGL -DPACKAGE_NAME="\"Togl\" -DPACKAGE_TARNAME=\"togl\" -DPACKAGE_VERSION=\"2.1\" -DPACKAGE_STRING=\"Togl 2.1\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=0 -DHAVE_LIMITS_H=1 -DHAVE_SYS_PARAM_H=1 -DUSE_THREAD_ALLOC=1 -D_REENTRANT=1 -D_THREAD_SAFE=1 -DTCL_THREADS=1 -DMODULE_SCOPE=extern __attribute__((__visibility__(\"hidden\"))) -D_LARGEFILE64_SOURCE=1 -DTCL_WIDE_INT_IS_LONG=1 -DUSE_TCL_STUBS=1 -DUSE_TK_STUBS=1 -DAUTOSTEREOD=\"\"" -DPARALLEL -DTCL -DTOGL_X11 -DUSE_TOGL_2 -D__STDC_CONSTANT_MACROS -I/var/tmp/portage/sci-mathematics/netgen-6.2.1804/work/netgen-6.2.1804_build/ng/Togl2.1 -I/var/tmp/portage/sci-mathematics/netgen-6.2.1804/work/netgen-6.2.1804/ng/Togl2.1 -I/usr/include/../PrivateHeaders -I/usr/include/tk-private/generic/ttk -I/usr/include/tk-private -I/usr/include/tk-private/unix -I/usr/include/tk-private/generic -I/usr/include/tcl-private/unix -I/usr/include/tcl-private/generic -I/var/tmp/portage/sci-mathematics/netgen-6.2.1804/work/netgen-6.2.1804_build -I/var/tmp/portage/sci-mathematics/netgen-6.2.1804/work/netgen-6.2.1804/include -I/var/tmp/portage/sci-mathematics/netgen-6.2.1804/work/netgen-6.2.1804/libsrc/include -I/usr/include/python3.6m   -DNDEBUG -O2 -pipe -march=bdver2 -mprefer-avx128 -mvzeroupper -fomit-frame-pointer -Wno-implicit-int -fPIC   -o CMakeFiles/togl.dir/togl.c.o -c /var/tmp/portage/sci-mathematics/netgen-6.2.1804/work/netgen-6.2.1804/ng/Togl2.1/togl.c
/var/tmp/portage/sci-mathematics/netgen-6.2.1804/work/netgen-6.2.1804/ng/Togl2.1/togl.c:19:10: fatal error: tkInt.h: No such file or directory
 #include <tkInt.h>   // don't need it on osx ???
          ^~~~~~~~~
compilation terminated.

and

cd /var/tmp/portage/sci-mathematics/netgen-6.2.1804/work/netgen-6.2.1804_build/ng/Togl2.1 && /usr/bin/mpicc -DFFMPEG -DHAVE_DLFCN_H -DINTERNAL_TCL_DEFAULT=1 -DJPEGLIB -DMETIS -DNETGEN_VERSION=\"6.2-dev\" -DNG_PYTHON -DOPENGL -DPACKAGE_NAME="\"Togl\" -DPACKAGE_TARNAME=\"togl\" -DPACKAGE_VERSION=\"2.1\" -DPACKAGE_STRING=\"Togl 2.1\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=0 -DHAVE_LIMITS_H=1 -DHAVE_SYS_PARAM_H=1 -DUSE_THREAD_ALLOC=1 -D_REENTRANT=1 -D_THREAD_SAFE=1 -DTCL_THREADS=1 -DMODULE_SCOPE=extern __attribute__((__visibility__(\"hidden\"))) -D_LARGEFILE64_SOURCE=1 -DTCL_WIDE_INT_IS_LONG=1 -DUSE_TCL_STUBS=1 -DUSE_TK_STUBS=1 -DAUTOSTEREOD=\"\"" -DPARALLEL -DTCL -DTOGL_X11 -DUSE_TOGL_2 -D__STDC_CONSTANT_MACROS -I/var/tmp/portage/sci-mathematics/netgen-6.2.1804/work/netgen-6.2.1804_build/ng/Togl2.1 -I/var/tmp/portage/sci-mathematics/netgen-6.2.1804/work/netgen-6.2.1804/ng/Togl2.1 -I/usr/include/../PrivateHeaders -I/usr/include/tk-private/generic/ttk -I/usr/include/tk-private -I/usr/include/tk-private/unix -I/usr/include/tk-private/generic -I/usr/include/tcl-private/unix -I/usr/include/tcl-private/generic -I/var/tmp/portage/sci-mathematics/netgen-6.2.1804/work/netgen-6.2.1804_build -I/var/tmp/portage/sci-mathematics/netgen-6.2.1804/work/netgen-6.2.1804/include -I/var/tmp/portage/sci-mathematics/netgen-6.2.1804/work/netgen-6.2.1804/libsrc/include -I/usr/include/python3.6m   -DNDEBUG -O2 -pipe -march=bdver2 -mprefer-avx128 -mvzeroupper -fomit-frame-pointer -Wno-implicit-int -fPIC   -o CMakeFiles/togl.dir/togl.c.o -c /var/tmp/portage/sci-mathematics/netgen-6.2.1804/work/netgen-6.2.1804/ng/Togl2.1/togl.c
/var/tmp/portage/sci-mathematics/netgen-6.2.1804/work/netgen-6.2.1804/ng/Togl2.1/togl.c: In function ‘SetupOverlay’:
/var/tmp/portage/sci-mathematics/netgen-6.2.1804/work/netgen-6.2.1804/ng/Togl2.1/togl.c:2829:5: error: unknown type name ‘TkWindow’; did you mean ‘Tk_Window’?
     TkWindow *winPtr = (TkWindow *) togl->TkWin;
     ^~~~~~~~
     Tk_Window
/var/tmp/portage/sci-mathematics/netgen-6.2.1804/work/netgen-6.2.1804/ng/Togl2.1/togl.c:2829:25: error: ‘TkWindow’ undeclared (first use in this function); did you mean ‘Tk_Window’?
     TkWindow *winPtr = (TkWindow *) togl->TkWin;
                         ^~~~~~~~
                         Tk_Window

[windows, conda] FindNetgen invalid escape sequence

CMake Error at C:/Users/hans_/Miniconda3/conda-bld/smesh_1522265382286/_b_env/Library/cmake/NetgenConfig.cmake:62 (set):
  Syntax error in cmake code at

    C:/Users/hans_/Miniconda3/conda-bld/smesh_1522265382286/_b_env/Library/cmake/NetgenConfig.cmake:62

  when parsing string

    C:\Users\hans_\Miniconda3\conda-bld\netgen_1522263755358\_b_env\Library\include\netgen

  Invalid escape sequence \U
Call Stack (most recent call first):
  CMakeLists.txt:118 (find_package)

type_traits.hpp(46) Internal Compiler error for Visual Studio 14 2015 Win64

I am trying to build v.6.2.1909 in Windows 10 Win64...
cmake .. -G "Visual Studio 14 2015 Win64" -DUSE_GUI=OFF

and while building from Visual Studio I get the error code C1001 four times for file type_traits.hpp, line 46.

  • compiling source file E:\Repository\netgen\libsrc\core\localheap.cpp
  • compiling source file E:\Repository\netgen\libsrc\core\table.cpp
  • compiling source file E:\Repository\netgen\libsrc\core\taskmanager.cpp
  • compiling source file E:\Repository\netgen\libsrc\core\python_ngcore.cpp

the following is the detailed error message:

3>------ Rebuild All started: Project: netgen, Configuration: Release x64 ------
3>  Creating directories for 'netgen'
3>  Performing check_submodules step for 'netgen'
3>  Building Custom Rule E:/Repository/netgen/CMakeLists.txt
3>  No download step for 'netgen'
3>  No update step for 'netgen'
3>  No patch step for 'netgen'
3>  Performing configure step for 'netgen'
3>  -- Selecting Windows SDK version 10.0.14393.0 to target Windows 10.0.17763.
3>  -- pybind11 v2.4.dev4
3>  -- Found Pybind11: E:/Repository/netgen/external_dependencies/pybind11/include
3>  CMake Warning at python/CMakeLists.txt:18 (message):
3>    pybind11-stubgen not found, if you want to create stub files
3>
3>    for better autocompletion support install it with pip.
3>
3>
3>
3>  ------------------------------------------------------------------------
3>    Netgen 6.2-20021:  Automatic configuration OK.
3>
3>    Build type: RelWithDebInfo
3>    Flags: /MD /Zi /O2 /Ob1 /DNDEBUG /DWIN32 /D_WINDOWS /W0 /GR /EHsc /MP
3>
3>    Enabled functionality:
3>
3>      OCC: ............... OFF
3>      JPEGlib: ........... OFF
3>      FFMPEG: ............ OFF
3>      GUI: ............... OFF
3>      MPI: ............... OFF
3>      PYTHON: ............ ON
3>
3>
3>    Building:
3>
3>      Open E:/Repository/netgen/build/netgen/Netgen.sln and build solution to compile Netgen.
3>
3>      Build "INSTALL" to install Netgen.
3>
3>
3>    Install directory:
3>
3>      C:/netgen
3>
3>    Please set the following environment variables:
3>
3>      NETGENDIR=C:/netgen/bin
3>      PYTHONPATH=.:C:/netgen/Lib/site-packages
3>
3>  ------------------------------------------------------------------------
3>
3>  -- Configuring done
3>  -- Generating done
3>  -- Build files have been written to: E:/Repository/netgen/build/netgen
3>  Performing check_submodules1 step for 'netgen'
3>  Performing build step for 'netgen'
3>  Microsoft (R) Build Engine version 14.0.25420.1
3>  Copyright (C) Microsoft Corporation. All rights reserved.
3>
3>    localheap.cpp
3>    table.cpp
3>    taskmanager.cpp
3>    python_ngcore.cpp
3>e:\repository\netgen\libsrc\core\type_traits.hpp(46): fatal error C1001: An internal error has occurred in the compiler. [E:\Repository\netgen\build\netgen\libsrc\core\ngcore.vcxproj]
3>    (compiler file 'f:\dd\vctools\compiler\cxxfe\sl\p1\c\template.cpp', line 13166)
3>     To work around this problem, try simplifying or changing the program near the locations listed above.
3>    Please choose the Technical Support command on the Visual C++
3>     Help menu, or open the Technical Support help file for more information (compiling source file E:\Repository\netgen\libsrc\core\localheap.cpp)
3>    e:\repository\netgen\libsrc\core\type_traits.hpp(52): note: see reference to class template instantiation 'ngcore::detail::has_Range<std::T>' being compiled
3>            with
3>            [
3>                T=std::size_t
3>            ] (compiling source file E:\Repository\netgen\libsrc\core\localheap.cpp)
3>    e:\repository\netgen\libsrc\core\type_traits.hpp(46): note: see reference to variable template 'const bool has_range<unsigned __int64>' being compiled (compiling source file E:\Repository\netgen\libsrc\core\localheap.cpp)
3>    e:\repository\netgen\libsrc\core\array.hpp(333): note: see reference to class template instantiation 'ngcore::T_Range<std::size_t>' being compiled (compiling source file E:\Repository\netgen\libsrc\core\localheap.cpp)
3>e:\repository\netgen\libsrc\core\type_traits.hpp(46): fatal error C1001: An internal error has occurred in the compiler. [E:\Repository\netgen\build\netgen\libsrc\core\ngcore.vcxproj]
3>    (compiler file 'f:\dd\vctools\compiler\cxxfe\sl\p1\c\template.cpp', line 13166)
3>     To work around this problem, try simplifying or changing the program near the locations listed above.
3>    Please choose the Technical Support command on the Visual C++
3>     Help menu, or open the Technical Support help file for more information (compiling source file E:\Repository\netgen\libsrc\core\table.cpp)
3>    e:\repository\netgen\libsrc\core\type_traits.hpp(52): note: see reference to class template instantiation 'ngcore::detail::has_Range<std::T>' being compiled
3>            with
3>            [
3>                T=std::size_t
3>            ] (compiling source file E:\Repository\netgen\libsrc\core\table.cpp)
3>    e:\repository\netgen\libsrc\core\type_traits.hpp(46): note: see reference to variable template 'const bool has_range<unsigned __int64>' being compiled (compiling source file E:\Repository\netgen\libsrc\core\table.cpp)
3>    e:\repository\netgen\libsrc\core\array.hpp(333): note: see reference to class template instantiation 'ngcore::T_Range<std::size_t>' being compiled (compiling source file E:\Repository\netgen\libsrc\core\table.cpp)
3>e:\repository\netgen\libsrc\core\type_traits.hpp(46): fatal error C1001: An internal error has occurred in the compiler. [E:\Repository\netgen\build\netgen\libsrc\core\ngcore.vcxproj]
3>    (compiler file 'f:\dd\vctools\compiler\cxxfe\sl\p1\c\template.cpp', line 13166)
3>     To work around this problem, try simplifying or changing the program near the locations listed above.
3>    Please choose the Technical Support command on the Visual C++
3>     Help menu, or open the Technical Support help file for more information (compiling source file E:\Repository\netgen\libsrc\core\taskmanager.cpp)
3>    e:\repository\netgen\libsrc\core\type_traits.hpp(52): note: see reference to class template instantiation 'ngcore::detail::has_Range<std::T>' being compiled
3>            with
3>            [
3>                T=std::size_t
3>            ] (compiling source file E:\Repository\netgen\libsrc\core\taskmanager.cpp)
3>    e:\repository\netgen\libsrc\core\type_traits.hpp(46): note: see reference to variable template 'const bool has_range<unsigned __int64>' being compiled (compiling source file E:\Repository\netgen\libsrc\core\taskmanager.cpp)
3>    e:\repository\netgen\libsrc\core\array.hpp(333): note: see reference to class template instantiation 'ngcore::T_Range<std::size_t>' being compiled (compiling source file E:\Repository\netgen\libsrc\core\taskmanager.cpp)
3>e:\repository\netgen\libsrc\core\type_traits.hpp(46): fatal error C1001: An internal error has occurred in the compiler. [E:\Repository\netgen\build\netgen\libsrc\core\ngcore.vcxproj]
3>    (compiler file 'f:\dd\vctools\compiler\cxxfe\sl\p1\c\template.cpp', line 13166)
3>     To work around this problem, try simplifying or changing the program near the locations listed above.
3>    Please choose the Technical Support command on the Visual C++
3>     Help menu, or open the Technical Support help file for more information (compiling source file E:\Repository\netgen\libsrc\core\python_ngcore.cpp)
3>    e:\repository\netgen\libsrc\core\type_traits.hpp(52): note: see reference to class template instantiation 'ngcore::detail::has_Range<T>' being compiled
3>            with
3>            [
3>                T=int
3>            ] (compiling source file E:\Repository\netgen\libsrc\core\python_ngcore.cpp)
3>    e:\repository\netgen\libsrc\core\type_traits.hpp(46): note: see reference to variable template 'const bool has_range<int>' being compiled (compiling source file E:\Repository\netgen\libsrc\core\python_ngcore.cpp)
3>    e:\repository\netgen\external_dependencies\pybind11\include\pybind11\cast.h(1587): note: see reference to class template instantiation 'pybind11::detail::descr<8>' being compiled (compiling source file E:\Repository\netgen\libsrc\core\python_ngcore.cpp)
3>    e:\repository\netgen\external_dependencies\pybind11\include\pybind11\cast.h(1585): note: see reference to class template instantiation 'pybind11::detail::descr<5>' being compiled (compiling source file E:\Repository\netgen\libsrc\core\python_ngcore.cpp)
3>    e:\repository\netgen\external_dependencies\pybind11\include\pybind11\cast.h(1138): note: see reference to class template instantiation 'pybind11::detail::descr<7>' being compiled (compiling source file E:\Repository\netgen\libsrc\core\python_ngcore.cpp)
========== Rebuild All: 2 succeeded, 1 failed, 0 skipped ==========

Is there any workaround for this issue?

Build netgen static libraries

Procedure to build static libraries are not clear, I don't see them in cmake options. A brief description on the steps would be helpful.

Monthly release tags missing

According to the Releases page on the homepage, the monthly releases should be available as tags in the git repo:

Additionally you can check out the monthly versions on git by checking out the tag of the version (e.g v6.2.1704)

However git tag -l only shows v6.2-dev, and trying e.g. git checkout v6.2.1704 doesn't work (as you'd expect based on git tag -l.) I am wanting to package netgen for Debian (and ultimately the FreeCAD project which depends on netgen) and it would be helpful if these tags were available.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.