sunfishfly a4b44e0bda add LICENSE.
Signed-off-by: sunfishfly <sunhuaifeng@sdu.edu.cn>
2025-06-12 03:26:22 +00:00
2025-04-29 07:27:39 +00:00
2025-04-29 08:59:57 +00:00
2025-04-29 09:14:23 +00:00
2025-04-29 07:27:56 +00:00
2025-04-24 05:55:00 +00:00
2025-04-29 07:13:19 +00:00
2025-06-12 03:26:22 +00:00
2025-05-09 07:24:37 +00:00

em3d-MT (The numerical examples are being updated!!!!)

1.Introduction

em3d-MT is an open-source MATLAB-based package for 3D forward modeling of magnetotelluric (MT) and radiomagnetotelluric (RMT) data. It is built on an edge-based finite element (FE) framework and solves the full-wave Maxwell’s equations, accounting for both conduction and displacement currents. This enables accurate modeling in the RMT frequency range.

The software supports arbitrary anisotropy in both electrical conductivity and dielectric permittivity, allowing flexible simulation of complex geological scenarios. It utilizes unstructured tetrahedral meshes and a customizable geological modeling workflow to accommodate irregular terrain and heterogeneous media.

To address the high computational cost of 3D modeling, em3d-MT integrates a direct linear solver with a double-layer parallelization strategy. This design supports efficient simulation over multiple frequencies using OpenMP-based multithreading and frequency-level parallelization.

2 software framework

This section provides detailed instructions for installing and configuring the em3d-MT package. The software is developed in MATLAB and requires proper setup of external solvers for efficient computation.

2.1 System Requirements

Operating System: Windows or Linux MATLAB Version: R2023a (or later) Memory: The actual memory usage depends on model size and number of frequencies.

2.2 Required Software

MATLAB (R2023a or later): The core environment in which em3d-MT operates.

em3d-MT relies on several external tools and libraries to facilitate 3D geological modeling and mesh generation. The following software is required for proper functionality:

GeoMesh

For 3D geological modeling and mesh generation, GeoMesh is used. This is an open-source tool specifically designed for electromagnetic (EM) modeling, based on the COMSOL Multiphysics and MATLAB interface (Liu et al., 2024). GeoMesh generates unstructured tetrahedral meshes, which are ideal for representing complex subsurface structures in the forward modeling process. You can find the tool at https://gitee.com/sduem/geomesh

Additionally, em3d-MT supports two types of direct solvers for solving the finite element system:

Panua-Pardiso:

An optimized direct solver used for solving large sparse linear systems. It offers high performance and memory efficiency. More information can be found at https://panua.ch/pardiso/

UMFPACK: An alternative direct solver supported by em3d-MT for solving sparse linear systems, suitable for small models or testing. More information can be found at http://faculty.cse.tamu.edu/davis/suitesparse.html

2.3 Installation

Step 1: Install MATLAB Install MATLAB (R2023a or later). Parallel Computing Toolbox is available for multi-core support.

Step 2: Set Up Panua-Pardiso Solver

Windows: Refer to Barbara (2025). Add PARDISO lib to Matlab in Windows and LINUX, MATLAB Central File Exchange. https://www.mathworks.com/matlabcentral/fileexchange/119053-add-pardiso-lib-to-matlab-in-windows-and-linux, January 13, 2025.

The following steps outline how to configure the Panua-Pardiso solver in the Windows environment:

[1] Register for a Panua account. Then download the panua-pardiso-20240228-win package from the official website: https://panua.ch/pardiso/, and extract the contents.

[2] Open the bin folder in the extracted directory. Press Win + R, type cmd, and drag get_fingerprint.exe into the Command Prompt window. Press Enter to generate your machine fingerprint.

[3] Copy the machine fingerprint into the input box on the Panua Pardiso website. An activation key will be sent to your registered email.

[4] Create a file named panua.lic, paste the activation key into the file, and move it to the user directory (e.g., C:\Users\Username).

[5] Add MinGW Compiler to MATLAB by visiting: https://www.mathworks.com/matlabcentral/fileexchange/52848-matlab-support-for-mingw-w64-c-c-compiler

[6] Download and install Intel OneAPI Base Toolkit including MKL (Math Kernel Library) from: https://www.intel.com/content/www/us/en/developer/tools/oneapi/onemkl.html

[7] Compile MEX Files. After updating the specific paths in the runMEM.m script to match your system, run the script in MATLAB to compile the required .mex files.

The following script is used to compile the Panua-Pardiso interface with MATLAB via MEX. It links the necessary Panua, MATLAB, and Intel MKL libraries using MinGW:

%% This one works (pardisoinit): mex -largeArrayDims -L'PATH\TO\YOUR \Pardiso\panua-pardiso-20230718-win\lib' -llibpardiso... -L'PATH\TO\YOUR\Matalb\Matlab2023a\extern\lib\win64\mingw64' -lmwlapack... -L'PATH\TO\YOUR\Matalb\Matlab2023a\extern\lib\win64\mingw64' -lmwblas... -L'PATH\TO\YOUR\Intel oneAPI\compiler\2023.0.0\windows\compiler\lib\intel64' -lm... -output pardisoinit common.cpp matlabmatrix.cpp sparsematrix.cpp pardisoinfo.cpp pardisoinit.cpp

%% This one works (pardisoreorder): mex -largeArrayDims -L'PATH\TO\YOUR \Pardiso\panua-pardiso-20230718-win\lib' -llibpardiso... -L'PATH\TO\YOUR\Matalb\Matlab2023a\extern\lib\win64\mingw64' -lmwlapack... -L'PATH\TO\YOUR\Matalb\Matlab2023a\extern\lib\win64\mingw64' -lmwblas... -L'PATH\TO\YOUR\Intel oneAPI\compiler\2023.0.0\windows\compiler\lib\intel64' -lm... -output pardisoreorder common.cpp matlabmatrix.cpp sparsematrix.cpp pardisoinfo.cpp pardisoreorder.cpp %% This one works (pardisofactor): mex -largeArrayDims -L'PATH\TO\YOUR \Pardiso\panua-pardiso-20230718-win\lib' -llibpardiso... -L'PATH\TO\YOUR\Matalb\Matlab2023a\extern\lib\win64\mingw64' -lmwlapack... -L'PATH\TO\YOUR\Matalb\Matlab2023a\extern\lib\win64\mingw64' -lmwblas... -L'PATH\TO\YOUR\Intel oneAPI\compiler\2023.0.0\windows\compiler\lib\intel64' -lm...
-output pardisofactor common.cpp matlabmatrix.cpp sparsematrix.cpp pardisoinfo.cpp pardisofactor.cpp

%% This one works (pardisofactor): mex -largeArrayDims -L'PATH\TO\YOUR \Pardiso\panua-pardiso-20230718-win\lib' -llibpardiso... -L'PATH\TO\YOUR\Matalb\Matlab2023a\extern\lib\win64\mingw64' -lmwlapack... -L'PATH\TO\YOUR\Matalb\Matlab2023a\extern\lib\win64\mingw64' -lmwblas... -L'PATH\TO\YOUR\Intel oneAPI\compiler\2023.0.0\windows\compiler\lib\intel64' -lm... -output pardisofree common.cpp matlabmatrix.cpp sparsematrix.cpp pardisoinfo.cpp pardisofree.cpp

UbuntuRefer to the official README provided in the Panua-Pardiso package.

仓库描述
em3d-MT is an open-source MATLAB-based package for 3D forward modeling of magnetotelluric (MT) and radiomagnetotelluric (RMT) data.
自述文档 GPL-3.0 12 MiB
编程语言
MATLAB 99.6%
Limbo 0.4%