namespace Lemma{ /** \page Tutorial A basic tutorial outlining the goals of Lemma, how to acquire and use it, and how to extend it for your own purposes. - \subpage Intro - Introduction to the project - \subpage Compiling - how to compile the library - \subpage Memory - our implementation of garbage collection, and what it means to you - \subpage Minimal - compiling your first minimal Lemma application - \subpage EmSources - Electromagnetic sources \page Intro
\section C Why C++? We get this a lot as most EM software seems to be written in Fortran or Matlab. C++ has developed into a fast powerful language appropriate for scientific computing. The language is undeniably complex and can be intimidating (lots of bad C++ code is out there). However, it is also possible to generate high performance, intuitive, flexible software using C++. In Lemma we take advantage of several recent changes to the language such that our public interface is simple to use, does not require manual memory management, and lets scientists focus on the problem at hand. The biggest hurdle for newcomers is often getting used to the object oriented approach we have taken. Rather than provide programs performing specific tasks Lemma exposes a flexible application programming interface (API) which can be though of as building blocks used to construct programs or projects. \subsection API An API? What's that? Lemma is not a program. It's an API, or an Application Programming Interface. This offers a lot of advantages over traditional programs. - First, its flexible. Its easy to put together components to do exactly what you want and nothing more. - Second, its extendible. If we have a class that does almost what you want, but is missing something, you can just extend a class. - Third, it limits the amount of file IO you might need to do. We deviate from the Unix philosophy of piping text streams between small applications, mainly because doing so is difficult on some operating systems (I'm looking at you Windows), as well as cumbersome when used in graphical user interfaces. - Four, it enforces a consistent design and feel across the project. Once becoming familiar with how Lemma objects are constructed, it becomes simple to use new building blocks. Think of the objects as Lego's, since they are all constructed to work together, you can build anything. If instead you have a mix of Lego, Lincoln Logs, and Tinker Toys you will be more more limited in how you can use the pieces together. \subsection Fortran Why not Fortran? We have lots of reasons for choosing C++ over Fortran, some of them better than others. - We know C++ better, and we like it better. Too many hours debugging old FORTRAN 77 subroutines has left us jaded. - Easy integration with existing libraries. For example Lemma has built in support for VTK, an extremely powerful visualization package. We also include MATLAB file IO readers, an XML parser, and YAML class serialization. Providing Fortran wrappers for all of this would be a huge undertaking. - Flexibility. Lemma is NOT a program, its an API that lets you build applications that fit your needs. This approach is a natural fit for object oriented (OO) programming and C++ is a much more natural choice for an OO project. In spite of advances in the language, Fortran is still more geared towards procedural programming paradigms (for better or worse). - Infinitely better interface. We leverage the Eigen