https://github.com/balaje/ivem

Contains source code for iVEM

https://github.com/balaje/ivem

Science Score: 23.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
    Found 3 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.4%) to scientific vocabulary

Keywords

matlab vem virtual-element-method virtual-elements
Last synced: 9 months ago · JSON representation

Repository

Contains source code for iVEM

Basic Info
  • Host: GitHub
  • Owner: Balaje
  • License: gpl-3.0
  • Language: MATLAB
  • Default Branch: master
  • Homepage:
  • Size: 2.62 MB
Statistics
  • Stars: 1
  • Watchers: 2
  • Forks: 1
  • Open Issues: 0
  • Releases: 0
Topics
matlab vem virtual-element-method virtual-elements
Created over 6 years ago · Last pushed about 5 years ago
Metadata Files
Readme License

README.md

iVEM (Inspired by AFEM@Matlab) DOI

These set of codes are the first few steps to implement the Virtual Element Method in the easiest way possible. This piece of software can be used to solve new problems without worrying about a lot of background construction regarding mass matrix and error computation.

First prototype consisting of codes to solve simple Poisson problem, Heat equation, Benjamin-Bona-Mahony Equation. More features will be added soon.

How do I get set up?

  • This code will only run on MATLAB. Before starting to use the software, add subfolders of iVEM to the default MATLAB path. To do this:
  • Launch MATLAB.
  • cd into the directory of iVEM.
  • run startup.m
  • Begin using the software.

Example run

To solve the Poisson equation with a right hand side and a boundary condition: After setting up type the following in the MATLAB command prompt.

For k=1

Run: matlab f = @(x,y) 2*pi^2*sin(pi*x).*sin(pi*y); % Note: The .* is a must g_D = @(x,y) 0*x.*y; % Must input in the same form. mesh = load('voronoi'); % Load the "Voronoi" mesh. u = poisson(mesh,f,g_D); % Solve the problem plot_solution(mesh,u); [l2err, h1err] = l2error(mesh,@(x,y)sin(pi*x)*sin(pi*y),u,1,false);

For a prettier picture try running the example examples/simple.m:

|Squares| | -- |

For k=2

Run: matlab f = @(x,y) 2*pi^2*sin(pi*x).*sin(pi*y); % Note: The .* is a must g_D = @(x,y) 0*x.*y; % Must input in the same form. mesh = load('smoothed-voronoi_quadratic'); plotmesh = load('smoothed-voronoi'); % Must input the corresponding linear mesh only. usol = poisson_2(mesh, f, g_D); exact = @(x,y)sin(pi*x)*sin(pi*y); [l2err,h1err] = l2error(mesh,exact,usol,2,false); %%% To plot, we select the solution points on the vertices only noofvertices = length(plotmesh.vertices); u_verts = usol(1:noofvertices); plot_solution(plotmesh,u_verts);

Again, for a prettier picture try running the example examples/simple_2.m:

|Voronoi| | -- |

More Examples:

More examples are provided in the examples/ folder. For example, try running examples/voronoi_2.m to study the rate of convergence.

| Voronoi solution | Voronoi Rate |
-- | --

Running examples/squares_2.m gives the rate of convergence for squares.

| Squares solution | Squares Rate |
-- | --

To get help, simply type

matlab help l2error in the command prompt to know more.

Who do I talk to?

Owner

  • Name: Balaje K
  • Login: Balaje
  • Kind: user
  • Location: Umeå

BITS Pilani; PhD University of Newcastle; Postdoc at Umeå University

GitHub Events

Total
Last Year