I have made a solver for non-stationary (generalized) Stokes on surfaces. I also have a solver for stationary Stokes on surfaces. These are both based on Lehrenfeld/Lederer/SchÃ¶berl 2020.

My problem concerns solving the non-stationary on a sphere. My stationary solver works fine. From a solution (u,p) for the stationary Stokes with right-hand side "force" and div(u) = g. I have constructed a non-stationary solution (U,P) to non-stationary stokes with right-hand side (Force, G) by setting

U = w(t) * u

P = w(t) * p

Force = w(t) * force + w_t(t) * u

G = w(t)*g.

However, my solution explodes, even if I set w(t) = 1, w_t(t) = 0. Note that it works fine, and converges, for open surfaces (with Dirichlet boundary conditions).

For clarity, the time-stepping is performed with Implicit Euler, and the mixed space is a Piola-transformed BDM_k, P^{dc}_{k-1}. I also have a Lagrange-multiplier for uniqueness of p. (Also I do Hybridized Hdiv).

Qualitatively, my solution is continuously perturbed for a few time-steps to what looks like another smooth solution. After that, it just increases in magnitude. The factor with which it increases in each step seems to be independent of time-step size. It almost seems like there is another constant (in time) term on the right-hand side, independent of time-step size.

Does anyone know why this problem arises? Is there something about non-stationary stokes on closed surfaces which is ill-posed?

I would be very grateful for any insight

Best regards,

Alvar]]>

I would like to inspect the stiffness and the mass matrix in numpy/scipy for a problem in 3D elasticity. To convert the ngsolve matrices to scipy I use the code from the how-to in the documentation. The code works well for an example with 1D Poisson equation. However, when going to a 3D space there are some problems which I cannot sort out and for which I cannot find documentation. A minimum example which leads to the problem is this:

The method `COO()` does not seem to exist for the form matrix `k`. Instead I was using the `CSR` method. However, the `CSR` method returns a `FlatVectorD`, a `FlatArray_I_S` and a `FlatArray_S_S` object instead of the raw row and column indices and the raw values. I could not find any information how to constrcut from these objects a sparse matrix in scipy. I would be very happy if you could help me with this issue. Thanks in advance.]]>

Sorry, I am fairly new to python and NGSolve, I think I have a relatively simple question.

I am trying to compute the RHS of the surface stokes equations by a given analytic solution.

The geometry I have is just a simple unit sphere. So I wrote the following operators to compute RHS of surface stokes equations:

I didn't find how to modified the matrix valued coefficient function after define it, sorry I used the list.

The problem I have now is When I tried to compute

And assemble corresponding RHS in the algebraic system

My code became very very slow on the assembling step. I think the main reason might be (Coef_Div_Gamma(v)) operator, but I don't know what is wrong with this part. I think it took days to assemble, any reasons caused this?

Where, Pmat defined as,

v[2] belongs to

thanks a lot,

Ryan]]>

Best regards,

Alvar]]>

Thanks]]>

We instead get a single circle centered at at the origin. The same thing happens with a union. An intersection yields an empty mesh; it's like the two circles are the same. If we shift the center a small amount, the code works as expected.

I've done this using a conda install on my Macbook Pro as well as with an apt-get install on Ubuntu 20.04 LTS, both with the same result.]]>

I experience some problems when defining a function space on a subdomain of my mesh:

The assembly of any system matrix throws the following error/warning:

I guess this is why i cannot find a solution to my problem.

I have already visualized the function space using a gridfunction and it looks good to me.

Interestingly, if I define the function space on the entire domain everything works great. I can assemble the system matrices without the above warning and get a reasonable solution to my problem.

Can this error be related to my mesh? I have already tried this restricted function space on a simple geometry and i didn't get the error.

Best Regards

Christoph Dietz]]>

when I call the function even with the parameter I suppressed all output to stdout or stderr coming from python following the instructions of this post: here . I am also using the setting but it looks like it is not preventing the output above from the solver. I guess the residual output is coming from the C/Fortran library of PARDISO.]]>

I am trying to use the "many" default smoothing blocks implemented for finite element spaces for preconditioning.

So I tried to export CreateSmoothingBlocks for a finite element space (EdgeFESpace is "exactly" your NedelecFESpace), with

But when I call

python complains:

I didn't find a solution to this in the source files. Can you help with this?

Best,

Guosheng]]>

most of the time my python script/ngsolve works well, all fine, but with some *.stp parts there is following problem:

i call my python script, NGSolve starts. OK

I see the meshing progress in the statusbar bottom/right from NGSolve. OK

But the loaded *.stp part in NGSolve does not get a mesh, after the progress is ready there is no mesh it is still the normal loaded *.stp part.

What is wrong? (most of the time it works well, but with some parts it does not work).

The strange thing is if i click in NGSolve "Generate Mesh" by hand, all works fine!

Here is my python code, I really do not know what is wrong with it?

from netgen.occ import *

from netgen.meshing import MeshingStep

geo = OCCGeometry("//L1/Test1/mail/user/ng/projects/user/abc/Teil_1.stp")

mesh = geo.GenerateMesh(meshsize.very_coarse, perfstepsstart=MeshingStep.ANALYSE, perfstepsend=MeshingStep.MESHSURFACE)

Draw(Mesh(mesh))

mesh.Export("//L1/Test1/mail/user/ng/projects/user/abc/Teil_1.stl", 'STL Format')

regards, mario]]>

Using mesh.save('meshname'), I have stored a mesh file ('meshname.vol.gz') for each single body. Within the netgen GUI I am able to merge these meshes (File->Merge Mesh) and then export them to a single mesh. Is there the opportunity to merge these meshes by a python command? I couldn't find anything in the documentation and I have seen that a couple of forum members ask for similar questions, but these discussions didn't helped me.]]>

Does NGSolve's adaptive meshing support hanging nodes?

When I use mesh.Refine() on a structured quadrilateral mesh, all mesh elements along a given row or column are refined instead of only the select elements I wish to refine. I have attached sample code to demonstrate this. It's based on your adaptive mesh refinement tutorial.

Thanks.

]]>