Преглед изворни кода

Added Doxygen documentation generation. Currently not build by default, use make doc for that.

enhancement_3
Trevor Irons пре 8 година
родитељ
комит
d18983799f

+ 11
- 0
CMakeLists.txt Прегледај датотеку

@@ -186,3 +186,14 @@ target_link_libraries(Hello lemmacore)
186 186
 add_dependencies(Hello YAML-CPP)
187 187
 
188 188
 
189
+# add a target to generate API documentation with Doxygen
190
+find_package(Doxygen)
191
+	if(DOXYGEN_FOUND)
192
+	configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Documentation/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Documentation/Doxyfile @ONLY)
193
+	add_custom_target(doc
194
+	${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Documentation/Doxyfile
195
+	WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
196
+	COMMENT "Generating API documentation with Doxygen" VERBATIM
197
+	)
198
+	endif(DOXYGEN_FOUND)
199
+

+ 1644
- 0
Documentation/Doxyfile.in
Разлика између датотеке није приказан због своје велике величине
Прегледај датотеку


+ 123
- 0
Documentation/dox/compiling.dox Прегледај датотеку

@@ -0,0 +1,123 @@
1
+namespace Lemma{
2
+
3
+/**
4
+    \page Compiling
5
+
6
+<div class="lemmamainmenu"> 
7
+    \ref Intro     "Intro"
8
+  | \b   Compiling
9
+  | \ref Memory    "Memory management"
10
+  | \ref Minimal   "Minimal programme"
11
+  | \ref EmSources "EM Sources"
12
+</div>
13
+
14
+Compiling Lemma is fairly straightforward. The biggest hurdle is possibly installing
15
+the prerequisites, but on many platforms this is easy.
16
+
17
+\section Table Table of contents
18
+- \ref Prerequisites
19
+- \ref OptionalPrerequisites
20
+- \ref Downloading
21
+- \ref Configuring
22
+- \ref Building
23
+
24
+\section Prerequisites Prerequisites
25
+
26
+
27
+
28
+You will need to acquire the following free packages:
29
+- SCons - SCons is a make replacement that is written in Python. It is easily
30
+  configurable and directly controls the build process. It is not a Makefile
31
+  intermediary like some similar applications. It is freely available at
32
+  <http://scons.org>. On Linux, your package manager very likely provides this. On
33
+  Windows it is slightly more complicated. But, hey, Windows is easy... right? That's why 
34
+  you use it :)  The process is well documented on the SCons
35
+  website. You might guess that we aren't huge Windows fans.
36
+- Eigen3 - Eigen is a header-only linear algebra template library. It is made
37
+  available under the Gnu Lesser Public License. It is available at
38
+  <http://eigen.tuxfamily.org>. Please note that Lemma uses Version 3 of the Library.
39
+
40
+    \subsection Dependencies
41
+    The only dependencies are the Eigen linear algebra Library v3, a
42
+    C++ compiler and scons.
43
+    (Currently a fortran compiler is needed too, see above)
44
+
45
+    The following compilers are fully supported and tested: gnu, mingw,
46
+    and intelc. Several routines are parallelised for shared memory platforms
47
+    using OpenMP. Any of the above compilers is able to be used with OpenMP.
48
+    Microsoft's Visual C++ compiler will likely be supported for stable
49
+    releases, but is not actively tested. (Also the current FORTRAN compiler
50
+    dependency limits this compiler as well.) Eigen extensively uses template
51
+    meta programming, the Borland compiler has been shown to be subpar at
52
+    optimizing this type of code and will likely never be supported actively.
53
+    A new compiler clang, is being developed and may prove to be promising as
54
+    well, but current C++ support is lacking. If you are using a different
55
+    compiler, please share your experiences with us.
56
+
57
+    The Visualization ToolKit (VTK) is used for visualisation throughout Lemma.
58
+    It is not an explicit dependency, but without it, you will not be able to
59
+    get any graphical output.
60
+
61
+    Eigen is  freely available  under the LGPL at
62
+    <http://eigen.tuxfamily.org>. The necessary components of Eigen will
63
+    be included in stable releases of Lemma.
64
+    Scons is a make replacement built on top of Python, and is also free.
65
+
66
+\section OptionalPrerequisites Optional Prerequisites
67
+- VTK - The Visualization ToolKit is a powerful data visualization framework. This is
68
+  an optional dependency, but some functionality will be missing without it. Any
69
+  version after 5.4 is fine. VTK is available under a BSD license from <http://vtk.org>
70
+  Again-- on Linux-- most package managers offer VTK. Compiling from source is not
71
+  terribly difficult, but requires installing CMake as well. Strangely (wink wink) this is 
72
+  harder under Windows.
73
+- Qt - Limited GUI support is provided leveraging the Qt framework. You will need to have 
74
+  the development version of Qt 4 installed to use this. 
75
+- Boost - Several classes use Boost. Lemma ships with a minimalist part of Boost and should compile 
76
+	without it. However, if you are getting Boost errors while compiling, install the development version 
77
+	 of boost. Note that Ubuntu ships with a very old Boost that has caused some issues. 
78
+	Also, the Python wrapper requires boost.python and is not shipped with Lemma. 
79
+
80
+\section Downloading Acquiring the source
81
+Lemma is currently available from svn checkout only. Note that while Lemma is still in Beta only
82
+developers have access to the source code. Contact us if you would like to contribute. 
83
+\code
84
+svn co https://svn.lemmasoftware.org/lemma/trunk Lemma
85
+\endcode
86
+
87
+\section Configuring Configuring
88
+There is very little configuring to do. In the main Lemma directory you will find a file 
89
+called 'Examplesettings.py listed below'
90
+\include Examplesettings.py
91
+Configure this to your machine, and copy to a file named
92
+\code
93
+settings.py
94
+\endcode
95
+
96
+ If you have more questions about a parameter you can type
97
+\code
98
+scons -h
99
+\endcode
100
+For more information. After configuring, copy Examplesettings.py to a file called settings.py.
101
+
102
+\section Building
103
+To build the libraries simply type:
104
+\code
105
+scons  -j2
106
+\endcode
107
+To build the libraries and unit tests. The -j2 arguments tell scons how many threads compilation
108
+should occur on (parallel build). We recommend one per processor. Note, this only affects 
109
+the speed of the build, not whether or not Lemma will have OpenMP support.
110
+
111
+\section Installing
112
+To install the library simply type:
113
+\code
114
+scons  install
115
+\endcode
116
+To install to INSTALLDIR. Note depending on your machine, you may need sudo privileges to do this.
117
+Also, if you let INSTALLDIR=./lib this step will fail as those libraries are already located in Lemma/lib.
118
+
119
+Note that on a Mac, this step is crucial.    
120
+
121
+*/ 
122
+/** @} */ 
123
+}

+ 72
- 0
Documentation/dox/emsource.dox Прегледај датотеку

@@ -0,0 +1,72 @@
1
+namespace Lemma{
2
+
3
+/** 
4
+    \page EmSources 
5
+
6
+<div class="lemmamainmenu">             
7
+    \ref Intro     "Intro"
8
+  | \ref Compiling "Compiling"
9
+  | \ref Memory    "Memory management "
10
+  | \ref Minimal   "Minimal programme"  
11
+  | \b EM \b Sources
12
+</div>
13
+
14
+We support the following dipole types: 
15
+- Grounded electric
16
+- ungrounded electric
17
+- magnetic
18
+Each in horizontal and vertical polarizations. Dipoles may be placed anywhere in a model.
19
+
20
+\code
21
+    DipoleSource *dipole = DipoleSource::New();
22
+        dipole->SetType(GROUNDEDELECTRICDIPOLE);
23
+        dipole->SetPolarisation(XPOLARISATION);
24
+        //dipole->SetPolarisation(YPOLARISATION);
25
+        //dipole->SetPolarisation(ZPOLARISATION);
26
+
27
+        //dipole->SetType(UNGROUNDEDELECTRICDIPOLE);
28
+        //dipole->SetPolarisation(XPOLARISATION);
29
+        //dipole->SetPolarisation(YPOLARISATION);
30
+        //dipole->SetPolarisation(ZPOLARISATION);
31
+
32
+        //dipole->SetType(MAGNETICDIPOLE);
33
+        //dipole->SetPolarisation(XPOLARISATION);
34
+        //dipole->SetPolarisation(YPOLARISATION);
35
+        //dipole->SetPolarisation(ZPOLARISATION);
36
+
37
+        dipole->SetMoment(1);
38
+        dipole->SetLocation(1,1,-1e-4);
39
+        dipole->SetNumberOfFrequencies(1);
40
+        dipole->SetFrequency(0,2000);
41
+        dipole->SetPhase(0);
42
+\endcode
43
+Each of the above dipole types is shown in this example. Note the use of enumerations (ALLCAPS) instead of integer markers,
44
+making the code immediately obvious. The location is set in x,y,z order. A right hand coordinate system is used with 
45
+a pointing down. So this dipole is just in the air. 
46
+Only a sinlge frequency is computed, at 2000 Hz, and the phase is set to zero.
47
+
48
+\section Other Other sources
49
+Currently we also support arbitrary ungrounded wire loops. We plan to support grounded wire loops in the near future as well.
50
+
51
+For our example we will construct a wire antenna loop. To do this insert this code into your skeleton application shown on the previous page.
52
+
53
+\code 
54
+    PolygonalWireAntenna *pa = PolygonalWireAntenna::New();
55
+        pa->SetNumberOfPoints(5);
56
+        pa->SetPoint(0, Vector3r(   0,   0, -1e-3));
57
+        pa->SetPoint(1, Vector3r( 100,   0, -1e-3));
58
+        pa->SetPoint(2, Vector3r( 100, 100, -1e-3));
59
+        pa->SetPoint(3, Vector3r(   0, 100, -1e-3));
60
+        pa->SetPoint(4, Vector3r(   0,   0, -1e-3));
61
+        pa->SetNumberOfFrequencies(2);
62
+        pa->SetFrequency(0, 1000);
63
+        pa->SetFrequency(0, 5000);
64
+        pa->SetCurrent(10);
65
+        pa->SetNumberOfTurns(1);
66
+\endcode
67
+The code is basically self-explanitory. We are constructing a single turn wire loop with 5 points. The first and last 
68
+point are the same making this a loop, but that is not a requirement. All loops must be 'closed' in this fashion.
69
+We are interested in two frequencies: 1 and 5 kHz and we have a 10 A current running through a single turn wire.
70
+*/
71
+
72
+}

+ 7
- 0
Documentation/dox/extending.dox Прегледај датотеку

@@ -0,0 +1,7 @@
1
+namespace Lemma {
2
+
3
+/** 
4
+	\page Extending Extending
5
+	A page outlining how to extend Lemma classes.
6
+*/
7
+}

+ 101
- 0
Documentation/dox/mem.dox Прегледај датотеку

@@ -0,0 +1,101 @@
1
+namespace Lemma{
2
+
3
+/** 
4
+    \page Memory 
5
+
6
+<div class="lemmamainmenu"> 
7
+    \ref Intro     "Intro"
8
+  | \ref Compiling "Compiling"
9
+  | \b   Memory \b management 
10
+  | \ref Minimal   "Minimal programme"  
11
+  | \ref EmSources "EM Sources"
12
+</div>
13
+
14
+\section MemoryManagement Memory Management
15
+
16
+\subsection Reference Reference counting and memory management
17
+Lemma makes extensive use of reference counting. We do this for a variety of 
18
+reasons. 
19
+- It is not uncommon for multiple objects to have the same instantiations 
20
+of an object as members.
21
+- Making copies of each object is not a viable option because the objects may be large, and they must all update simultaneously.
22
+- Without reference counting it is very easy to leave dangling pointers.
23
+- It is much easier to write code, as local copies of objects can be deleted 
24
+as soon as they are no longer used within that context. The memory will not be 
25
+freed and the object persists as long as other objects still reference it.   
26
+
27
+The base class for all Lemma objects is ReferenceCountedObject. 
28
+The interface requires that all derived, non-abstract classes have <B>New</B> and <B>Delete</B> methods. So that objects may be created and destoyed with the 
29
+following syntax.
30
+
31
+\code 
32
+DerivedClass* Object = DerivedClass::New();
33
+Object->Delete();
34
+\endcode
35
+
36
+\warning It is important to note that the default constructors and destructors are protected so the following code is <B>NOT</B> valid.
37
+\code 
38
+DerivedClass* Object = new DerivedClass;
39
+delete Object; 
40
+\endcode
41
+The reasons for this will hopefully be clear soon.
42
+
43
+Many Lemma classes have other Lemma classes as data members. Classes may
44
+share these members, and depend on them being updated simultaneously. So 
45
+that a situation like this is not unusual. 
46
+\code 
47
+DerivedClass* Component = DerivedClass::New();
48
+AnotherDerivedClass* Object2 = AnotherDerivedClass::New();
49
+YetAnotherDerivedClass* Object3 = YetAnotherDerivedClass::New();
50
+Object2->AttachMyComponent(Component);
51
+Object3->AttachMyComponent(Component);
52
+Component->Update();       // All three classes use the updated Component
53
+\endcode
54
+At this point both Object2 and Object3 have an up to date Component and any 
55
+changes to Component can be seen by the Objects. Often these types of 
56
+connections are happening behind the scenes and end users should not be 
57
+troubled by any of this.
58
+
59
+Now in this example it is clear that if Component is deleted, than the objects 
60
+will contain dangling pointers. To avert this, calling the 
61
+ReferenceCountedObject::Delete() does not necessarily destroy the object.
62
+So that it would be safe -- continuing from the above example
63
+\code
64
+Component->Delete();                     // The 'Component' handle will no longer be used.
65
+Object2->CallMethodRelyingOnComponent(); // But we can still use the object
66
+\endcode
67
+
68
+\subsection what Whats going on?
69
+Whenever we declared a new handle to the object-- either by calling New, or implicitly in the Connect methods--
70
+the true 'Component' object updated a list of pointers that had handles to it. 
71
+
72
+\code
73
+DerivedClass* Component = DerivedClass::New();       // One Reference, 'Component'
74
+Object2->AttachMyComponent(Component);               // Two References, internal in Object2       
75
+Object3->AttachMyComponent(Component);               // Three References, internal in Object3
76
+Component->Delete();                                 // Two References, 'Component' is gone. 
77
+                                                     // DON'T USE Component->Method() ANYMORE!!!
78
+Object2->Delete();                                   // One Reference, Object2 releases handle upon Delete
79
+Object3->SomeFuntionReleasingComponent();            // Zero References, Component object is now deleted and
80
+                                                     // all memory is freed!
81
+\endcode
82
+
83
+\section So So what do I need to know?
84
+Not much. This is here to make life easy when doing high level programming. Just follow these simple rules
85
+- Allocate and free all variables with New and Delete, you have to do this as the default 
86
+versions are protected.
87
+
88
+- Once calling Delete on an object it is no longer safe to use that handle. For example don't call 
89
+Component->Delete(), and then call Component->Method(). Even if you 'know' that there are existing references
90
+and that it shouldn't have been deleted yet. Instead move your call to Delete down after your last direct use
91
+of each class. 
92
+
93
+- Remember to call Delete, thanks to reference counting it is safe to do this as soon as you are done 
94
+ using an object even if other classes are using it. If  you don't call Delete on objects you create, your
95
+ program <B>will</B> leak memory!
96
+
97
+- Revel in the fact that memory is being managed for you, and that dangling pointers are not a concern.
98
+
99
+*/
100
+
101
+}

+ 153
- 0
Documentation/dox/min.dox Прегледај датотеку

@@ -0,0 +1,153 @@
1
+namespace Lemma{
2
+
3
+/** 
4
+\page Minimal 
5
+
6
+<div class="lemmamainmenu"> 
7
+    \ref Intro     "Intro"
8
+  | \ref Compiling "Compiling"
9
+  | \ref Memory    "Memory management"
10
+  | \b   Minimal \b programme
11
+  | \ref EmSources "EM Sources"
12
+</div>
13
+
14
+\section Download Download
15
+Lemma source code may be obtained via svn server 
16
+\code
17
+svn co http://cgem.ath.cx/repos/MR/Lemma Lemma
18
+\endcode
19
+
20
+Binary versions of the library for Microsoft Windows will be available for download shortly.
21
+
22
+To compile you will also need the Eigen3 linear algebra header library, freely available at
23
+<http://eigen.tuxfamily.org>. 
24
+We use the scons, a make replacement for builds which is available at <http://scons.org>.
25
+Finally a good C++ compiler is needed. We actively support gcc, intel, and 
26
+Microsoft Visual C++ 2010. Your mileage may vary with other compilers. Lemma has been sucessfully compiled on 
27
+Microsoft Windows, Mac OSX, many flavours of Linux 64 and 32 bit, and BSD's.  
28
+
29
+\section Exposing Exposing the API
30
+You may choose to either include individual pieces of Lemma, or instead to simply 
31
+include all of Lemma using '#include Lemma'. Examples will be shown both ways but 
32
+generally speaking including all of Lemma is a fine thing to do. All of the objects 
33
+are defined within the Lemma namespace, so you may want to use that, too.
34
+\code
35
+#include "Lemma"  
36
+using namespace Lemma;
37
+int main() {
38
+    // Any Lemma Code is OK
39
+} 
40
+\endcode
41
+
42
+\section Compiling_old
43
+Compiling Lemma code is fairly straightforward. For example using g++ 
44
+\code
45
+	g++ min.cpp -I/path/to/Lemma/include -L/path/to/Lemma/lib -llemma -lmatio -lticppd -lem1d 
46
+\endcode
47
+
48
+\subsection Libs Whoa, what are all those libs
49
+Compiling Lemma builds several libraries. The largest one is liblemma.so(dll). This contains all the Lemma classes.
50
+The libmatio is responsible for reading in MATLAB files and libticcppd is an XML reader/writer/parser. The libem1d library is a FORTRAN implimentation of a dipole em solver that is used for quality control and assurance. 
51
+We use scons to build Lemma. It is easy to extend scons to compile your applications as well, taking care of all 
52
+the compiler linker details.
53
+
54
+\section VTK 
55
+Lemma can be integrated with VTK to produce data visualizations. Using the VTK interfaces is a slightly more advanced
56
+topic and will be handled in a later tutorial.
57
+
58
+\section Small Small example application.
59
+We will now spend the next few pages building a Lemma application that computes fields from a wire loop in a time domain survey.
60
+
61
+When forward modelling geophysical data, it is natural to break up what is needed into several catagories: the transmitter, the receiver, the earth model, and the specific instrument.  In fact, these are exactly the classes needed by Lemma to execute a forward model.  Therefore, the first step will be to define these classes.  Continuing the code from above, we add class constructors:
62
+\code
63
+#include "Lemma"
64
+using namespace Lemma;
65
+int main() {
66
+	PolygonalWireAntenna* Trans = PolygonalWireAntenna::New();
67
+	ReceiverPoints* Receivers = ReceiverPoints::New();
68
+	LayeredEarthEM *Earth = LayeredEarthEM::New();
69
+
70
+	// More Lemma code to go here
71
+
72
+	return EXIT_SUCCESS;
73
+}
74
+\endcode
75
+
76
+Now that we have created objects for a transmitter, a receiver, and a layered earth model, we need to populate them with their appropriate parameters.
77
+
78
+For the transmitter, we will define a 100 metre by 100 metre loop just above the surface of the Earth with 1 A current and one turn.  We input the following after our new objects:
79
+
80
+\code
81
+	Trans->SetNumberOfPoints(5);
82
+	Trans->SetPoint(0, Vector3r(   0,   0, -1e-3));
83
+	Trans->SetPoint(1, Vector3r( 100,   0, -1e-3));
84
+	Trans->SetPoint(2, Vector3r( 100, 100, -1e-3));
85
+	Trans->SetPoint(3, Vector3r(   0, 100, -1e-3));
86
+	Trans->SetPoint(4, Vector3r(   0,   0, -1e-3));
87
+	Trans->SetCurrent(1);
88
+	Trans->SetNumberOfTurns(1);
89
+\endcode
90
+
91
+For the receiver location, we'll put one receiver in the centre of the transmitter loop.
92
+
93
+\code
94
+	Vector3r loc;
95
+	Real ox = 50.;
96
+	Real oy = 50.;
97
+	Real depth = -1.e-3;
98
+	Receivers->SetNumberOfReceivers(1);
99
+	loc << ox,oy,depth;
100
+	Receivers->SetLocation(0,loc);
101
+\endcode
102
+
103
+We now set our 5 layer earth model up, with conductivities in S/m.  The 5 layers include the air and basement halfspace.
104
+
105
+\code
106
+	Earth->SetNumberOfLayers(5);
107
+	Earth->SetLayerConductivity( (VectorXcr(5) << 0.,1.e-4,1.e-2,
108
+		1.e-4,1.e-6).finished() );
109
+	Earth->SetLayerThickness( (VectorXr(3) << 10,5,50).finished() );
110
+\endcode
111
+
112
+Finally, we set up an instrument object and attach these objects to it.  Since this is a time domain survey, we also define and attach the centre-gate times for a particular instrument.
113
+
114
+\code
115
+	VectorXr maintimes;
116
+	maintimes.resize(25);
117
+	maintimes << 	191.,216.,246.,286.,336.,400.,480.,584.,
118
+		714.,883.,1097.,1366.,1714.,2157.,2724.,3445.,4361.,
119
+		5535.,7032.,8858.,10724.,13151.,16196.,20047.,25012.;
120
+	maintimes = maintimes.array() /1000000;
121
+	InstrumentTem *instrument = InstrumentTem::New();
122
+	instrument->EMEarthModel(Earth);
123
+	instrument->SetTransmitLoop(Trans);
124
+	instrument->SetReceiver(Receivers);
125
+	instrument->SetTimes(maintimes);
126
+\endcode
127
+
128
+We are now ready to make the calculation and get our results.
129
+
130
+\code
131
+	instrument->MakeCalculation();
132
+	// Output results to file
133
+	std::ofstream outfile1;
134
+	outfile1.open("solution.out");
135
+	for (int ii=0;ii<ntimes;ii++) {
136
+		outfile1 << instrument->GetMeasurements()(ii,0)<<"    "<<
137
+			instrument->GetMeasurements()(ii,1)<<std::endl;
138
+	}
139
+	outfile1.close();
140
+
141
+	//A little cleanup
142
+	instrument->Delete();
143
+	Trans->Delete();
144
+	Earth->Delete();
145
+	Receivers->Delete();
146
+\endcode
147
+
148
+Congrats! You have used Lemma to create a forward modelling program.  Hopefully now you can see how easy it is to use Lemma to create powerful programs.
149
+
150
+
151
+*/
152
+}
153
+//\include utdipolesource.cpp

+ 85
- 0
Documentation/dox/tutorial.dox Прегледај датотеку

@@ -0,0 +1,85 @@
1
+namespace Lemma{
2
+
3
+/**
4
+    \page   Tutorial
5
+
6
+   A basic tutorial outlining the goals of Lemma, how to acquire and use it, and how to extend it 
7
+   for your own purposes. 
8
+
9
+   - \subpage Intro - Introduction to the project
10
+   - \subpage Compiling - how to compile the library
11
+   - \subpage Memory - our implementation of garbage collection, and what it means to you
12
+   - \subpage Minimal - compiling your first minimal Lemma application
13
+   - \subpage EmSources - Electromagnetic sources
14
+    
15
+  \page   Intro
16
+  <div class="lemmamainmenu">  
17
+    \b   Intro      
18
+  | \ref Compiling "Compiling"
19
+  | \ref Memory    "Memory management"
20
+  | \ref Minimal   "Minimal programme"  
21
+  | \ref EmSources "EM Sources"
22
+  </div>
23
+
24
+Some basic information about Lemma to get you started. If you are familiar with
25
+C++ and API's you can skip this page.
26
+
27
+\section C Why C++?
28
+We get this a lot as most EM software seems to be written in fortran or Matlab. We
29
+begin by discussing why we didn't choose certain languages/platforms.
30
+
31
+\subsection  Fortran Why not fortran?
32
+We have  lots of reasons for choosing C++ over fortran, some of them better than others.
33
+- We know it better, and we like it better. Too many hours debugging old 
34
+  FORTRAN subroutines has left us jaded.
35
+- Easy integration with existing libraries. For example Lemma has built in 
36
+support for VTK, an extremely powerful visualization package. We also include 
37
+MATLAB file IO readers and an XML parser. Providing fortran wrappers for all 
38
+of this would be a huge undertaking.
39
+- Flexibility. Lemma is NOT a program, its an API that lets you build 
40
+ applications that fit your needs. This approach is a natural fit for object oriented
41
+ programming and C++ is a much more natural choice for an OO project. 
42
+- Infinitely better interface. We leverage the Eigen 
43
+   <http://eigen.tuxfamily.org>  linear algebra package
44
+  to deliver expressive, fast code. Their benchmarks are right in line with 
45
+  fast BLAS and LAPACK implimentations. If you honestly feel that 
46
+\code
47
+DGEMM ( TRANSA, TRANSB, M, N, K, ALPHA, A, LDA, B, LDB, BETA, C, LDC )
48
+\endcode  
49
+ is superior to
50
+\code
51
+  C = A*B.transpose(); 
52
+\endcode 
53
+ you are living in denial. Check the benchmarks if you are still skeptical. 
54
+- We know fortran 2003 has come a long way, but hey, so has C++. Give it a 
55
+chance.
56
+
57
+\subsection Matlab Ok, so why not MATLAB?
58
+First its closed source, second most large MATLAB programs suffer severe 
59
+performance issues. Third, support for object-oriented programming is a joke. 
60
+Finally, its also expensive and we don't think the graphics are all
61
+that great.
62
+
63
+\subsection Python How about Python?
64
+We like Python. While large 100% native Python applications are often very slow, it is easy to wrap fast C++ and Fortran routines around a Python interface. 
65
+We actually plan on doing this in the future, and it is likely that at some 
66
+point this may be the most common way to use Lemma. Lots of great visualization
67
+solutions exist in Python (including VTK) and it is a great programming environment. The hard
68
+part is that Eigen relies heavily on Expression templates that cannot be 
69
+trivially wrapped into a python interface. So any python interface would have 
70
+to be carefully constructed. We would welcome help in this department.
71
+In the mean-time our API is elegant and easy to use.
72
+
73
+\section API An API? What's that?
74
+Lemma is not a program. It's an API, or an Application Programming Interface.
75
+This offers a lot of advantages over traditional programs. 
76
+- First, its flexible. Its easy to put together components to do exactly what 
77
+  you want and nothing more. 
78
+- Second, its extendible. If we have a class that does almost what you want, you
79
+  can just extend a class. 
80
+- Third, it limits the amount of file IO you might need to do.
81
+- Four, there are lots of other good reasons too. Just give it a try. 
82
+*/
83
+
84
+/** @} */
85
+}

Loading…
Откажи
Сачувај