Skip to content

jeremiah-corrado/fem_2d_mesh_plot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fem_2d_mesh_plot

A Mesh visualization tool for the fem_2d library.

fem_2d allows mesh files to be exported in a json format compatible with this library:

use fem_2d::prelude::*;

// load a raw mesh file (this is an alternate format, not compatible with this library)
let mut mesh = mesh::from_file("./input_files/some_mesh.json").unwrap();

// execute some refinements
mesh.set_global_expansion_orders([3, 4]).unwrap();
mesh.h_refine_elems(vec![0, 3, 4, 6], HRef::T).unwrap();

// export the mesh file 
mesh.export_to_json("./output_files/refined_mesh.json").unwrap();

This tool allows mesh files to be visualized in 3D, and exported as images

Installation

  1. Install Node.js if you haven't already
  2. Download or clone this repository to a directory of your choice
  3. Navigate to that directory in a terminal and run the command npm install

Operation

  1. Using the same terminal pointed at the directory containing this repo, run node server.js in the terminal
  2. Navigate to localhost:3000 in your browser
  3. Click choose file in the top right corner or the app and select a mesh.json file generated by fem_2d
  4. Use the options on the right to manipulate the appearance of the mesh, or click and drag on the mesh to rotate it.

Citation

Please include one or more of the following citations in any academic or commercial work based on this repository:

  • Corrado, Jeremiah; Harmon, Jake; Notaros, Branislav; Ilic, Milan M. (2022): FEM_2D: A Rust Package for 2D Finite Element Method Computations with Extensive Support for hp-refinement. TechRxiv. Preprint. https://doi.org/10.36227/techrxiv.19166339.v1
  • Corrado, Jeremiah; Harmon, Jake; Notaros, Branislav (2021): A Refinement-by-Superposition Approach to Fully Anisotropic hp-Refinement for Improved Efficiency in CEM. TechRxiv. Preprint. https://doi.org/10.36227/techrxiv.16695163.v1
  • Harmon, Jake; Corrado, Jeremiah; Notaros, Branislav (2021): A Refinement-by-Superposition hp-Method for H(curl)- and H(div)-Conforming Discretizations. TechRxiv. Preprint. https://doi.org/10.36227/techrxiv.14807895.v1

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published