Wiki

Clone wiki

infinitePoisson / Home

MICCoM COPSS - Magnetostatic/Electrostatic Simulation Code

This code can be applied to calculate magnetic/electric potential/fields among ferromagnetic/ferroelectric bodies embedded in free space where the magnetic/electric potential decays to zero at infinity.

Here we solve the Poisson equation in infinite domain using a hybrid finite element--boundary integral method. We use black-box fast-multipole method (BBFMM) to accelerate the boundary integral in this hybrid method. The boundary integral requires O(N^2) calculation in the direct method, where N is the number of surface nodes; while BBFMM only requires O(N) calculation, therefore substantially accelerates the simulation process.

The code is being developed using libMesh (finite-element library) and ScalFMM (FMM library). It solves Poisson equation, then perform boundary integration, and lastly solves Laplace equation within a single simulation, and it can run in parallel.

Our method paper has details on the implementation and tests of this code: An O(N) and parallel approach to integral problems by a kernel-independent fast multipole method: Application to polarization and magnetization of interacting particles. We humbly ask any published work which uses the code to include a citation of this paper, as a means to support our continuous development of the code.

Followings are details on how to access the code, installation of prerequisite libraries, compilation of this code, and running simulations.

0. Access the source code

  • Please fill the form so we can add you as a user to this repository.

1. Install libMesh

  • We recommend the MOOSE approach as a convenient way to build libMesh. Follow steps 1, 2, and 3 here. The first step "Set System Environment" is basically installing PETSc, and we recommend the Manual Installation Instructions (Basic) --> Linux --> Steps 0~2.

  • Set the environment variable for libMesh: in your bash profile, add the libMesh directory, for example:

    #!bash
    
    export LIBMESH_DIR=~/projects/moose/libmesh/installed
    

2. Install ScalFMM

  • Follow the instructions in the contrib/scalfmm folder in this repository.

3. Compile the application code

  • Use the Makefile in the src folder to compile the application code.

  • Type make In the src folder. It will generate the executable file.

4. Run simulation

  • Type the following in the example folder, for example for the magnetic sphere
    #!linux
    
    (mpiexec -np 4) ../src/poisson-opt -i sphere.in -log_summary
    

Updated