I am not able to solve a transmission problem for the Laplace problem using the hybridized mixed method with static condensation. I wonder if the "element_boundary" method gives a normal vector with the same orientation from both sides of the interface.

Programming the same problem using the "skeleton" NGSolve style gives the right answer.

Best regards,

Salim]]>

I have a symmetric indefinite matrix to solve,

K = [A, B]

[B^T -S].

Minres with a block diagonal preconditioner

M = [A^{-1} 0]

[0, S^{-1}]

works quite well for this particular system.

Here A is roughly a (h.o.) mass matrix and S is the diffusion operator.

I was wondering if the bddc preconditioner can be separately applied to the sub matrices A and S, instead of directly on the big matrix K by default?

Also, how can I change the coarsetype in bddc to other solvers like the ones in the petsc library?

Best regards,

Guosheng]]>

In particular, I was trying out the simple Poisson problem and trying to use the VTKOutput but not very successful. When I issue the following commands, it throws up a TypeError

vtk = VTKOutput(ma=mesh,coefs=[gfu],names=["u"],filename="poisson_solution",subdivisions=3)

vtk.Do()

TypeError Traceback (most recent call last)

<ipython-input-11-5f2b227fbcc2> in <module>

----> 1 vtk = VTKOutput(ma=mesh,coefs=[gfu],names=["u"],filename="poisson_solution",subdivisions=3)

2 vtk.Do()

TypeError: __init__(): incompatible constructor arguments. The following argument types are supported:

1. ngsolve.comp.VTKOutput(ma: ngsolve.comp.Mesh, coefs: list = [], names: list = [], filename: str = 'vtkout', subdivision: int = 0, only_element: int = -1)

Invoked with: kwargs: ma=<ngsolve.comp.Mesh object at 0x1218c6590>, coefs=[<ngsolve.comp.GridFunction object at 0x1218cf860>], names=, filename='poisson_solution', subdivisions=3

I am assuming that I am not pulling the correct solution variable out but unclear as to how I should properly format the solution.

Any help would be appreciated.

Thanks,

D Fridline]]>

I would to ask if there is a way to access the entries of a.mat or gfu.vec in binary form, preferably without any conversion to standard decimal float form.

Is there any way to do this?

I would greatly appreciate any help.

Best regards,

George]]>

but is there any convenient way to compute the co-normals?

]]>

Maybe you can help me out ]]>

def normal_grad(f,n):

return f.Diff(x)*n[0] + f.Diff(y)*n[1]

Vh = H1(mesh, order=order, dirichlet=[1,2,3,4],flags={"dgjumps": True})

v = Vh.TestFunction()

nF = specialcf.normal(2)

vn = normal_grad(v,n)

vno = normal_grad(v.Other(),nF)

vnno = normal_grad(vno,nF)

vnn = normal_grad(vn,nF)

and I get error

NgException Traceback (most recent call last)

<ipython-input-197-5729456d113a> in <module>

179 jump_u_2 = normal_grad(un,nF) - normal_grad(uno,nF)

180 vnno = normal_grad(vno,nF)

--> 181 vnn = normal_grad(vn,nF)

182 jump_v_2 = vnn-vnno

183

<ipython-input-191-e5403275507c> in normal_grad(f, n)

1 def normal_grad(f,n):

----> 2 return f.Diff(x)*n[0] + f.Diff(y)*n[1]

3

NgException: Deriv not implemented for CF N5ngfem23NormCoefficientFunctionE

Has anyone stumbled upon this error before? I find it weird since I can do the same thing for a TestFunction, and it works. I am trying to implement higher order directional derivatives.

Best regards,

Henrik]]>

at the moment i try to familiarize myself with the implementation of the HDiv basis functions.

I took a look at the sparsity pattern of the mass matrix by

and then importing it into matlab.

It looks for the most parts as expected, but there are some dense blocks at both ends of the matrix (far away from machine precision, i.e. 10^-6). Where do these blocks come from?

Best

Tim]]>

The Crank-Nicolson method

\[M\frac{C^{k+1}-C^k}{\Delta t}+\frac{1}{2}A[ C^{k+1}+C^k]=\frac{1}{2}(f^{k+1}+f^k)\]

or in an incremental form:\[M^*(C^{k+1}-C^k)=-\Delta tAC^k+0.5\Delta t(f^{k+1}+f^k)\]

where\[M^*=M+0.5\Delta t A\]

I don't know how to represent (f^{k+1}+f^k) in the time loop. I searched on the tutorial, but I didn't find an example. Please see the attached file.

Could you please tell me how to handle this in NGSolve? Thank you so much.]]>

I would like to ask you for advice on creating elliptical objects. I want to create an elliptical cylinder with nested holes around its perimeter. I use it for simulation in Matlab, where I also generated an attached geo file. When I started the NG mesh generator (Netgen version 5.3), I got stuck in the Start Findpoints operation, but I don't know why? Can you describe me what I'm doing wrong?

Note: The coordinates of the second and sixth object are the same, but with opposite signs with respect to the origin of the system coordinates. Second is Ok, sixth failed.

Here is the generated geo file.

]]>

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.

]]>

The error is:

This is not an urgent issue for me, but I was wondering if there is a work-around. The nightly build works, so I'm guessing that there is just some issue with my build environment.

I'm attaching my CMakeCache.txt. Please let me know if there is more information I can provide.

Best,

Dow]]>

I have attached a demo code for incompressible two phase flow using hybrid-mixed FEM (RT0) for pressure and DG-P0 for saturation.

Currently, I use the standard DG updates for the saturation conservation law equation.

I believe this default version could be significantly improved, but I don't know what's the best option available now in ngsolve. I would like to get ideas about speeding up this code. Many thanks as always!

Best,

Guosheng]]>

recently I have been experimenting with NGSolve and MPI.

For a start, I used a transport problem whose velocity is given by a Stokes

equation. With shared-memory parallelisation this works just fine.

When I switch to MPI (basically the same code but with mesh distribution),

I observe first of all that the velocity somehow increases and also

its vector field is being distorted. Depending on the number of ranks,

their seem also to be artifacts near the boundary, where the mesh is divided.

For matrix inversion I tried pardiso and bddc + GMRes which both produce

the same result.

I have no idea what kind of problem is causing this and any hints or suggestions

are very much appreciated.

All the best,

Philipp]]>

we can now visualize meshes and solutions within jupyter notebooks !

Have a look at

ngsolve.org/docu/nightly/i-tutorials/wta/poisson.html

and the other whetting-the-appetite examples.

webgui is available in the NGSolve 20.05 release, and there are frequent updates and fixes in the nightly versions.

The main activists have been Matthias and Amanda, many thanks to them !

webgui already supports visualization of higher order scalar and vectorial fields, clipping planes, and animation of time-dependent and complex valued solutions.

With webgui you can run the IPython kernel on a server, and visualize locally within your jupyter session. It is also the basis for interactive computing in a cloud. With nbconvert you can generate html pages including interactive views for tutorials and presentation of your results.

webgui is based on webgl, threejs, and jupyter notebook extension.

Try it and enjoy it,

Joachim]]>

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]]>