Help on Elliptic cone primitive and build instructions from source on ubuntu

Hi there,

I’m trying to include a primitive for an elliptic cone in netgen. I have generated appropriate cxx, cyy, czz, cxy, cyz, cx cy, c1 coefficients for the elliptic cone.

I believe one of the files to include this info is algprim.cpp in the source code.

I’m getting ideas from the cone primitive on how to proceed but I’m stuck. Can someone help me please.

I’ve also been trying to install netgen without modifications from source on a 32 bit machine. However, I’m failing to proceed. The compiler seems to complain on these two lines.

INLINE size_t * TablePrefixSum (FlatArray entrysize)

INLINE size_t * TablePrefixSum (FlatArray<size_t> entrysize)

I’d appreciate a helpful reply.

Below is a detailed error mesage when building:

[ 0%] Building CXX object ngstd/CMakeFiles/ngstd.dir/exception.cpp.o
In file included from /home/myubuntu/Documents/ngsuite/ngsolve-src/ngstd/ngstd.hpp:147:0,
from /home/myubuntu/Documents/ngsuite/ngsolve-src/ngstd/exception.cpp:7:
/home/myubuntu/Documents/ngsuite/ngsolve-src/ngstd/table.hpp: In function ‘size_t* ngstd::TablePrefixSum(ngstd::FlatArray)’:
/home/myubuntu/Documents/ngsuite/ngsolve-src/ngstd/table.hpp:82:19: error: redefinition of ‘size_t* ngstd::TablePrefixSum(ngstd::FlatArray)’
INLINE size_t * TablePrefixSum (FlatArray<size_t> entrysize)
/home/myubuntu/Documents/ngsuite/ngsolve-src/ngstd/table.hpp:76:19: note: ‘size_t* ngstd::TablePrefixSum(ngstd::FlatArray)’ previously defined here
INLINE size_t * TablePrefixSum (FlatArray entrysize)
ngstd/CMakeFiles/ngstd.dir/build.make:62: recipe for target ‘ngstd/CMakeFiles/ngstd.dir/exception.cpp.o’ failed
make[5]: *** [ngstd/CMakeFiles/ngstd.dir/exception.cpp.o] Error 1
CMakeFiles/Makefile2:167: recipe for target ‘ngstd/CMakeFiles/ngstd.dir/all’ failed
make[4]: *** [ngstd/CMakeFiles/ngstd.dir/all] Error 2
Makefile:138: recipe for target ‘all’ failed
make[3]: *** [all] Error 2
CMakeFiles/ngsolve.dir/build.make:114: recipe for target ‘dependencies/Stamp/ngsolve/ngsolve-build’ failed
make[2]: *** [dependencies/Stamp/ngsolve/ngsolve-build] Error 2
CMakeFiles/Makefile2:215: recipe for target ‘CMakeFiles/ngsolve.dir/all’ failed
make[1]: *** [CMakeFiles/ngsolve.dir/all] Error 2
Makefile:149: recipe for target ‘all’ failed
make: *** [all] Error 2

For installing on 32 bit, try commenting out the line


in ngsolve/ngstd/table.hpp


Thanks Christopher for your reply.

I realized that despite the error, netgen.exe was actually created when I checked in ngsolve-install/bin
I also managed to include an elliptic cone primitive.

It appears netgen.exe is created when the instructions given at Install from sources — NGS-Py 6.2.2302 documentation are followed.

I managed to create an elliptic cone primitive and would like it to be included in netgen for users who may find it useful.

I updated the following files in ngsolve-src/external_dependencies/netgen/libsrc/csg/

To install, one has to update the existing files in ngsolve-src/external_dependencies/netgen/libsrc/csg/with these and follow the instructions given at Install from sources — NGS-Py 6.2.2302 documentation

Please find attached the updated files and example ellipticcone.geo files. These are in a zipped file ellipticcone.tar.gz. file.

Attachment: ellipticcone.tar.gz