Skip to content

Source: examples/poisson

Poisson examples

The upstream examples/poisson folder collects static scalar-field problems built around the "poisson" element. The shipped cases cover generated meshes, imported Gmsh meshes, analytic benchmark materials, mixed Dirichlet/Neumann boundary conditions, and nonlinear Poisson materials.

Files in this folder

Representative input

The simplest generated-mesh case is poisson-2d.json:

json { "mesh": { "type": "asfem", "dim": 2, "nx": 20, "ny": 20, "meshtype": "quad4", "savemesh": true }, "dofs": { "names": ["phi"] }, "elements": { "elmt1": { "type": "poisson", "dofs": ["phi"], "material": { "type": "constpoisson", "parameters": { "sigma": 1.0, "f": 0.1 } } } }, "projection": { "type": "default", "vectormate": ["gradu"] }, "bcs": { "left": { "type": "dirichlet", "dofs": ["phi"], "bcvalue": 0.0, "side": ["left"] } }, "job": { "type": "static", "print": "dep" } }

Notes

  • All Poisson examples use the single DoF name "phi" and the "poisson" element type.
  • Benchmark inputs use the materials poisson1d-benchmark or poisson2d-benchmark, and the 2D benchmark cases also use the special boundary condition "type":"poisson2dbenchmark".
  • Nonlinear cases switch the material to nonlinear-poisson2d or nonlinear-poisson3d and use "nlsolver":{"type":"newton"}.
  • Several upstream files still include "restart": true inside "job", but the current ReadJobBlock.cpp only reads "type" and "print".