Opened 9 years ago
Closed 6 years ago
#50687 closed enhancement (fixed)
netgen @5.3.1 Add nglib and occ variants
Reported by: | ian.rees@… | Owned by: | seanfarley (Sean Farley) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | haspatch | Cc: | mbrethen, MarcusCalhoun-Lopez (Marcus Calhoun-Lopez) |
Port: | netgen |
Description
I've added two variants, which are meant to enable features available in the netgen configure script. The nglib variant installs a shared library for netgen, and the occ variant builds in support for the opencascade CAD kernel.
The nglib variant is a little more complex than might be expected - this is because using nglib requires some headers, which aren't installed by netgen's makefile. Those headers are installed into ${prefix}/share/netgen/libsrc following the example used in Linux distributions.
The occ variant requires a small patch, also included.
Reason for this request is to enable the finite element workbench in FreeCAD, which uses nglib for meshing. Thanks! -Ian-
Attachments (4)
Change History (21)
Changed 9 years ago by ian.rees@…
Attachment: | patch-libsrc-occ-Partition_Loop2d.cxx.diff added |
---|
comment:1 Changed 9 years ago by ian.rees@…
Updated the portfile to use ${prefix}/include/netgen for the headers instead of ${prefix}/share/netgen/libsrc following discussion with another FreeCAD developer. Sorry about the quick change! -Ian-
comment:2 Changed 9 years ago by mf2k (Frank Schima)
Keywords: | haspatch added |
---|---|
Version: | 2.3.4 |
comment:3 follow-ups: 4 5 Changed 9 years ago by seanfarley (Sean Farley)
Is there any reason not to always enable shared libraries? I try to make sure those are always there in my ports. The rest of it looks ok to me. I should probably add mpi to it one day.
comment:4 Changed 9 years ago by ian.rees@…
Replying to sean@…:
Is there any reason not to always enable shared libraries?
Not sure - as far as I'm concerned it's fine to turn on that option by default.
comment:5 Changed 9 years ago by ian.rees@…
Replying to sean@…:
Is there any reason not to always enable shared libraries? I try to make sure those are always there in my ports. The rest of it looks ok to me.
Apologies for the double post - should I submit another patch to add "default_variants +nglib" ? -Ian-
comment:6 Changed 9 years ago by seanfarley (Sean Farley)
No worries, I can fix it in flight when I get back next week.
comment:7 Changed 9 years ago by seanfarley (Sean Farley)
Owner: | changed from macports-tickets@… to sean@… |
---|---|
Status: | new → assigned |
Changed 9 years ago by mbrethen
Attachment: | ng_vol.cpp.diff added |
---|
changes to ng_vol.cpp for calculix
comment:9 Changed 9 years ago by mbrethen
I have attached a diff file of the additions to ng_vol from the calculix distro. Note: this was NetGen 5.1. cgx uses “ng_vol“ to allow for tet meshing with a target element size.
Update: I finished Test C “mesh“ – Tet-Meshing With Netgen Binary “ng_vol” in the cgx install guide and passed all tests. So I conclude that the current build of netgen works with calculix -- no patch is necessary.
comment:10 Changed 9 years ago by ian.rees@…
Do we need to get this merged before the Calculix ccx and cgx Port then?
My personal goal is FEM working in FreeCAD for people who use MacPorts. For that use case, we need both ccx and nglib before we get FreeCAD FEM, but there's no dependency between ccx and nglib AFAICT.
comment:11 Changed 9 years ago by mbrethen
I tested ng_vol with calculix and it is working so the ng_vol.cpp.diff can be discarded. Netgen is a run dependency but you can also use gmsh with calculix. You wouldn't need to merge the nglib and occ variants before the calculix release.
Changed 9 years ago by mbrethen
Attachment: | patch-nglib-ng_vol.cpp.diff added |
---|
Patch is required for setting a target element size using ng_vol
comment:12 Changed 9 years ago by mbrethen
After further testing this afternoon I have determined that element target size wasn't working. Add patch-nglib-ng_vol.cpp.diff to files directory and revise portfile to include patch. This will need to be merged before the Calculix port, otherwise you will not be able to control element size when meshing with netgen.
comment:13 Changed 9 years ago by seanfarley (Sean Farley)
I've lost some context here but do we really need this as a variant? Why not just build it all the time?
Changed 9 years ago by ian.rees@…
Attachment: | netgen.Portfile.diff added |
---|
Add nglib installation by default, add occ variant, reference patch-nglib-ng_vol.cpp.diff
comment:15 Changed 9 years ago by ian.rees@…
Have updated the Portfile diff, I think the current state of attachments to this ticket is:
patch-libsrc-occ-Partition_Loop2d.cxx.diff - Added to netgen's files
ng_vol.cpp.diff - Discard this
patch-nglib-ng_vol.cpp.diff - Added to netgen's files
netgen.Portfile.diff - Patch to be applied against the Portfile
Thanks! -Ian-
comment:16 Changed 6 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Cc: | MarcusCalhoun-Lopez added |
---|
comment:17 Changed 6 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Patch for netgen required by updated Portfile