VEM Method Module

The vem_method module implements the Virtual Element Method (VEM).

Available Functions

Main.vem_method.vemFunction
vem(mesh::Mesh, rhs::Function, boundary_condition::Function; debug::Bool=false, debug_file_path::String="vem_debug_output.md")::Vector{Float64}

Solve a boundary value problem using the Virtual Element Method (VEM) on a given mesh.

Arguments

  • mesh::Mesh: A mesh structure containing vertices, elements and boundaries (polygons).
  • rhs::Function: The right-hand side function of the boundary value problem.
  • boundary_condition::Function: The function specifying boundary conditions.

Keyword Arguments

  • debug::Bool: If true, generates a detailed debug output in the specified file. Default is false.
  • debug_file_path::String: The path to the debug output file. Default is "vem_debug_output.md".

Returns

  • u::Vector{Float64}: A vector containing the solution (degrees of freedom) at each vertex.

Behavior

  • Constructs the global stiffness matrix K and forcing vector F by looping over the mesh elements.
  • Applies the boundary conditions and solves the system K * u = F to compute the solution u.
  • If debugging is enabled, it writes detailed information about the computation process to the specified file.

Example

```julia u = vem(mesh, rhsfunction, boundarycondition_function; debug=true)

source