Skip to content
majockbimPublic

About

Φ magnetic field simulator

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

45 Commits

Folders and files

Repository files navigation

lodestone

what is it

lodestone is a physics engine to calculate 3D vector fields at high performance

physics

currently calculating magnetic field vector fields due to a single magnetic dipole.

the core equation used is:

B = (μ₀/4π) · (1/r³) · [3(m·r̂)r̂ - m]

current architecture

  • language: C++17
  • math: eigen
    • note: "eigen performs best with compilers based on GCC or LLVM/CLANG" [1]
    • with this information in mind, lodestone will be compiler agnostic with only GCC and CLANG to maximize performance

inspiration(s)

a neodymium magnet i found stuck to a chair

build

default compilation (uses your system's default compiler):

cmake -S . -B build
cmake --build build

force compilation with g++ (gcc):

cmake -G "MinGW Makefiles" -S . -B build
cmake --build build

run the engine:

.\build\Debug\lodestone.exe

run the tests:

cmake --build build --target lodestone_tests
cd build
ctest --output-on-failure

reference(s)

[1] Eigen: A C++ template library for linear algebra

books that have influence the modularity of lodestone
[2] C++17 In Detail - Bartłomiej Filipek
[3] Effective Modern C++ - Scott Meyers

tutorials that have been helpful
[4] Learn OpenGL: Creating a window [5] GLFW: Getting started

About

Φ magnetic field simulator

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages