All Projects → c3m-labs → ImportMesh

c3m-labs / ImportMesh

Licence: MIT license
Utilities for importing FEM meshes to Mathematica

Programming Languages

Mathematica
289 projects

Projects that are alternatives of or similar to ImportMesh

OpenCascadeLink
Open source package for OpenCascadeLink, which is bundled with Wolfram Language products as of version 12.1
Stars: ✭ 23 (+64.29%)
Mutual labels:  wolfram-language, finite-element-methods
FEMAddOns
Finite Element Method addons for Wolfram Language
Stars: ✭ 41 (+192.86%)
Mutual labels:  wolfram-language, finite-element-methods
dolfinx-tutorial
A reimplementation of the Springer book: https://github.com/hplgit/fenics-tutorial/, covering new topics as well as transitioning from dolfin to dolfinx
Stars: ✭ 28 (+100%)
Mutual labels:  finite-element-methods
fem mesh matlab
MATLAB Toolbox for Handling 2D and 3D FEM Meshes
Stars: ✭ 23 (+64.29%)
Mutual labels:  finite-element-methods
prototypes
miscellaneous wolfram language functions
Stars: ✭ 24 (+71.43%)
Mutual labels:  wolfram-language
Spelunking
Read definitions of in-memory Mathematica functions with ease
Stars: ✭ 48 (+242.86%)
Mutual labels:  wolfram-language
ameshref
Efficient Matlab Implementation of Adaptive Mesh Refinement in 2D
Stars: ✭ 28 (+100%)
Mutual labels:  finite-element-methods
GridapGeosciences.jl
Gridap drivers for geoscience applications
Stars: ✭ 28 (+100%)
Mutual labels:  finite-element-methods
feappv
FEAPpv -- free personal version of the FEAP
Stars: ✭ 57 (+307.14%)
Mutual labels:  finite-element-methods
RhinoLink
Wolfram Language interface to Rhino3D
Stars: ✭ 23 (+64.29%)
Mutual labels:  wolfram-language
vim-mma
💥 A (Neo)vim plugin to provide Wolfram Mathematica language support
Stars: ✭ 20 (+42.86%)
Mutual labels:  wolfram-language
GitLink-Talk
Talk introducing GitLink given at the 2015 Wolfram Technology Conference
Stars: ✭ 18 (+28.57%)
Mutual labels:  wolfram-language
GurobiLink
Wolfram Language interface to the Gurobi numerical optimization library
Stars: ✭ 16 (+14.29%)
Mutual labels:  wolfram-language
lsp-wl
A Wolfram Language Server
Stars: ✭ 157 (+1021.43%)
Mutual labels:  wolfram-language
AdFem.jl
Innovative, efficient, and computational-graph-based finite element simulator for inverse modeling
Stars: ✭ 62 (+342.86%)
Mutual labels:  finite-element-methods
FreeFem-doc
FreeFEM user documentation
Stars: ✭ 98 (+600%)
Mutual labels:  finite-element-methods
wolfram-notebook-embedder
JavaScript embedder for Wolfram Cloud notebooks
Stars: ✭ 48 (+242.86%)
Mutual labels:  wolfram-language
codeparser
Parse Wolfram Language source code as abstract syntax trees (ASTs) or concrete syntax trees (CSTs)
Stars: ✭ 84 (+500%)
Mutual labels:  wolfram-language
FinEtools.jl
Finite Element tools in Julia
Stars: ✭ 126 (+800%)
Mutual labels:  finite-element-methods
mathics-core
An open-source Mathematica. This repository contains the Python modules for WL Built-in functions, variables, core primitives, e.g. Symbol, a parser to create Expressions, and an evaluator to execute them.
Stars: ✭ 83 (+492.86%)
Mutual labels:  wolfram-language

ImportMesh

This package is obsolete. Its functionality, with additional upgrades, is now included in FEMAddOns from Wolfram Research.

Utilities for importing FEM meshes to Mathematica. Currently supported file formats:

Installation

The following description is for people who just want to use the package functionality and are not interested in package development.

To use ImportMesh package you need Mathematica version 11. or later.

ImportMesh package is released in the .paclet file format, which contains code, documentation and other necessary resources. Download the latest .paclet file from the repository "releases" page to your computer and install it by evaluating the following command in the Mathematica:

(* This built-in package is usually loaded automatically at kernel startup. *)
Needs["PacletManager`"]

(* Path to .paclet file downloaded from repository "releases" page. *)
PacletInstall["full/path/to/ImportMesh-X.Y.Z.paclet"]

This will permanently install the ImportMesh package to $UserBasePacletsDirectory. To update the documentation it may be necessary to restart Mathematica. Mathematica will always use the latest installed version of package and all installed versions can be enumerated by evaluating PacletFind["ImportMesh"]. You can get more detailed information about the package with PacletInformation["ImportMesh"]. All versions can be uninstalled with:

PacletUninstall["ImportMesh"]

Alternately load the package directly from online repository by running Get["https://raw.githubusercontent.com/c3m-labs/ImportMesh/master/ImportMesh.wl"].

Usage

Basic

The only (currently) public function is ImportMesh. It creates ElementMesh object from a text file:

Get["ImportMesh`"]

mesh=ImportMesh["path/to/your_mesh_file"];
mesh["Wireframe"]

screenshot

Advanced

There are also functions in the "`Package`" subcontext that implement ImportMesh. Similarly, support is added for Import registration, so it is possible to import a file as an "ElementMesh" and get it to work as expected. For example:

$repURL = "https://raw.githubusercontent.com/c3m-labs/ImportMesh/master";
file = URLDownload@($repURL <> "/Tests/Gmsh/Hex8_box.msh");

mesh = Import[file, "ElementMesh"];
pic = mesh["Wireframe"["MeshElementStyle" -> FaceForm@LightBlue]]

example

Support is also provided for import as a string if the format type of the file is known:

inputText = ReadString@($repURL <> "/Tests/Abaqus/Quad4_annulus.inp");
mesh = ImportString[inputText, "AbaqusMesh"];
pic = mesh["Wireframe"["MeshElementStyle" -> FaceForm@LightBlue]]

example

Specific elements may also be extracted when the format is known:

ImportString[inpText, {"AbaqusMesh", "Elements"}]
(* {"Mesh", "MeshNodes", "MeshElements"} *)
ImportString[inpText, {"AbaqusMesh", "MeshNodes"}]
(* {{0.,1.}, {0., 1.4375}, ... } *)

More information on how to manipulate and visualize ElementMesh objects is available in official documentation

Contributing and bug reports

You can open a new issue with bug report or feature request.

Contributions to ImportMesh package are very welcome. Guidelines on how to build paclet file from source code can be found in CONTRIBUTING.md file. These are some things you can help with:

  • Test package with different mesh files
  • Provide sample mesh files from other, not yet supported, software
  • Propose code improvements (style or performance)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].