I am trying to extract the solution in a 3D problem on a given plane. So, once the solution is available from the solver, I set up a cloud of points defined over a 2D region [-R,R]^2:

While this works without mpirun, when i launch the script with more than 1 cores, i end up in SIGSEGV fault. Most likely because inside the for loop the partitioning information is lost. Is there a better way of extracting the solution on a given plane which works with mpirun? Other possibility which i could think of is to write the vtk file and then use vtkcutter to slice through the domain and save the solution.

Thanks in advance!]]>

I am interested in solving a standard exterior acoustic scattering problem by truncating the whole domain to a bounded domain D, and using approximation (for example, using the first few spherical harmonics ) of the Dirichlet to Neumann map on the boundary of D.

How to define the bilinear form on the boundary of D in Netgen?

Best regards,

Shixu]]>

I am new to the forum and usually run FEM simulation on pavement layered systems. I set up my mesh using CSG.

Any suggestions? Thanks

]]>

I am interested in knowing if it's possible to perform boolean operations on external meshes in step formats. I have a solid geometry (say volume1 and given in a step file) which needs to be embedded inside another volume, ideally a sphere (say volume2 and created with CSGeometry() ) and i then need to mesh the region (volume2 - volume1) and define dirichlet boundary conditions on the surface of volume1. I tried performing the boolean operation in gmsh but as i understand from mailing list there, a boolean between step and geometric entities in gmsh is not possible (also i get incorrect results so not sure if the boolean operation is being performed correctly).

I started looking at the merge.py given here and this actually merges my step file with a sphere without trouble (attached the adapted script). However it's not clear to me how to obtain the volume mesh for the region in between and define a boundary condition on interior surface. The line mesh.GenerateVolumeMesh() in the merge.py ends up in error in my case, i receive an error: Stop meshing since too many attempts. I am not sure why this happens as i could get a volume mesh with gmsh and i also added a line geo1.Heal() that fixes the errors in my step file if any.

Provided i am able to generate a volume mesh, would the following syntax make sense in order to apply the dirichlet condition on the surface of volume1:

Thanks in advance for your help!

]]>

BlockMatrix( [ [D, None], [None, M] ] )

in which D = diag(a.mat) and M is the symmetric Gauss-Seidel (GS) matrix for

Y = b.mat @ D^{-1} @ b.mat.T

where @ means matrix multiplication. I know one can create Jacobi and GS preconditioners , but I first need to compute matrix Y. Is this possible in NGSolve, so that Y can be a BaseMatrix for GS?

I would appreciate any advice about best practices for doing linear algebra in NGSolve.

Thank you,

Barry]]>

I recently came across this post: ngsolve.org/forum/ngspy-forum/791-functi...vectors-unclear#1638

Now, I wanted to implement this in a 2D setting to evaluate the normal component of a CoefficientFunction along an interface (locally, I don't want to integrate).

However, I always got a normal vector being 0 everywhere. In the 3D case this does not happen and I get nice normal vectors along my interface.

Attached there is a small script showing this behaviour.

Could you please help me with this problem or tell me if I missed anything?

Thank you very much!

Best regards,

Julius]]>

on one of the nodes. I would have expected the code to print the dofs owned by each rank at the end and save the solution in 4 different vtk files as dictated by the partitions. However what i see is 4 copies of the code being run thus it's always the rank 0 which owns all the dofs and the output being saved to a single vtk file:

How do i make sure the mpi is enabled when using ngsolve on hpc? I can see that on the cluster, build/CMakeCache.txt has -DUSE_MPI=OFF as well as i can see that NETGEN_CMAKE_ARGS has:

-DCMAKE_CXX_COMPILER=/opt/gridware/depots/3dc76222/el7/pkg/compilers/gcc/8.3.0/bin/g++;-DCMAKE_C_COMPILER=/opt/gridware/depots/3dc76222/el7/pkg/compilers/gcc/8.3.0/bin/gcc;

I would have expected the c++ compiler to be mpicc and not g++. Is this the problem? I am attaching the CMakeCache.txt in build and build/netgen for your reference. Thanks a lot for your time and help! ]]>

I am trying to use multiple instances of NGSolve. However, I have run into an issue whilst using the bddc preconditioner on Ubuntu. The problem occurs when assembling the matrix whilst using a bddc preconditioner, I have attached a simple example to demonstrate this.

When calling the script once on Ubuntu the simulation takes 17.759102821350098 seconds. However, calling two copies of the script in quick succession they take 655.858645439148 and 659.8631296157837 seconds respectively.

This only appears to happen on Ubuntu, whilst running the simulation once on Mac takes 15.266962051391602 seconds, whereas, running two copies of the script takes 20.856684684753418 and 21.241539001464844 respectively.

We wish to run multiple examples using multiprocessing which amplifies this problem.

Kind regards,

Ben]]>

I have produced a mesh for a spheroid with the attached .geo file, both using the GUI and from the command line using -batchmode. However, upon saving this as a .vol file (also attached) the geometry information is not contained at the bottom of the .vol file,

this, in turn, leads to a problem after loading the mesh with the following commands

and then attempting to use the command

Is there something I'm doing wrong here?]]>

I am trying to implement an error estimator for Maxwell's equation. For this I followed tutorial 1.6 which wasn't a problem in the first place.

Now I tried to apply this error estimator to a problem which contains a PML which doesn't seem to work, as it becomes an integration over a complex domain. Therefore, I would like to localize these integrals to ignore the PML, yet still run over the boundary of each element. I tried the "definedon" flag, but it always returned some error.

Could someone tell me the correct way to achieve this?

Greetings,

Philipp]]>

I am working on ALE solver for two-phase flow. So I need to remesh when the mesh quality became low.

I found in Michael's particle_remesh.py file ( at ngsolve.org/user-meeting2019/ ) a procedure to remesh an affine mesh, which involves two steps:

(1) copy mesh and move points

(2) copy mesh and optimize it using

I have two questions regarding these steps:

(1) How to manually copy a higher order curved mesh with deformation to a high-order temporary mesh?

(2) What does OptimizeMesh2d do internally? Can it generate curved mesh? I also found it sometimes generates invalid mesh (with an extra node), see this one:

[attachment=undefined]mesh.png[/attachment]

Attached is the code that generate this invalid mesh.

Thanks in advance! Best,

Guosheng]]>

In conjunction with NGSolve, I am running the following:

-Python 3.6.10, compiled with gcc-9.2.0

-CMake version 3.16.2, compiled with gcc-9.2.0

-NGSolve-6.2.1910-28-g130a6d7, compiled with gcc-9.2.0

-NGSolve is compiled so that pardiso and UMFPACK are enabled via -DUSE_MKL and -DUSE_UMFPACK

The script resolvent_test.py is the script I am running to reproduce the issue, and contains a number of parameters in the

__main__ section at the bottom of the script. The parameters I am concerned with are as follows:

-inverse: A string that specifies the driver for the computation of the inverse

-hermitian_conjugate: A flag that indicates whether to compute the hermitian conjugate of the

resolvents (z*B - A), where A and B are complex square matrices.

To run the script, run python3 resolvent_test.py with inverse = '' or inverse = 'pardiso'. This will result in the

process stalling when inside of the apply_resolvents() method, after which I get one of two single-line messages: 'Killed' or 'Segmentation fault'.

-This happens regardless of whether hermitian_conjugate is True or False. When setting

inverse = 'umfpack' or 'sparsecholesky', however, everything works regardless of whether

hermitian_conjugate is True or False.

I'm wondering if there is something I am missing in the compilation step of NGSolve. Either way, it seems like a strange issue to run into. Any help on the matter is greatly appreciated.

-Ben]]>

]]>

I have a question related to the Bilinear and Linear form integrators and corresponding assembly in NGSolve. More specifically, I would like an efficient way to access specific entries in a.mat/f.vec, avoiding the complete assembly of the related bilinear/linear forms. For instance, how could one detect the specific nodes of the mesh which correspond to a non--zero contribution for (i,j)-entry of a.mat and then calculate the related element contributions compute the (i,j)-entry? Thank you in advance for your consideration,

George]]>

Currently not supported is :

- Code generation at run-time

In case you experience any issues, please post them here.

Best,

Matthias]]>

I try to take the gradient of a scalar field. When looking at the result with ParaView i see very strange Glyphs.

See the attached picture. I can't figure out where I made a mistake?

With best regards,]]>

I am looking into time domain wave simulation with explicit DG methods, say acoustics scattering.

I was wondering how a proper boundary treatment in the farfield could be realized in NGSolve.

As an example, how to modify the demo code

timeDGwave.py

to fit for an unbounded domain? I tried to use PML, but it gives me errors...

Best,

Guosheng]]>