Skip to content
Snippets Groups Projects
Commit 186c9068 authored by Tuomas Karna's avatar Tuomas Karna
Browse files

linearSystem::setParameter accessible in Lua

parent ac242d4d
No related branches found
No related tags found
No related merge requests found
...@@ -8,11 +8,18 @@ ...@@ -8,11 +8,18 @@
template<> template<>
void linearSystem<double>::registerBindings(binding *b){ void linearSystem<double>::registerBindings(binding *b){
classBinding *cb = b->addClass<linearSystem<double> >("linearSystemDouble");
cb->setDescription("An abstraction of a linear system Ax = b.");
methodBinding *cm; methodBinding *cm;
classBinding *cb = b->addClass<linearSystemBase>("linearSystemBase");
cb->setDescription("Base class for linear systems");
cm = cb->addMethod("setParameter", &linearSystemBase::setParameter);
cm->setDescription("set linearSystem parameters");
cm->setArgNames("key","value",NULL);
cb = b->addClass<linearSystem<double> >("linearSystemDouble");
cb->setDescription("An abstraction of a linear system Ax = b.");
cm = cb->addMethod("systemSolve", &linearSystem<double>::systemSolve); cm = cb->addMethod("systemSolve", &linearSystem<double>::systemSolve);
cm->setDescription("compute x = A^{-1}b"); cm->setDescription("compute x = A^{-1}b");
cb->setParentClass<linearSystemBase>();
#ifdef HAVE_TAUCS #ifdef HAVE_TAUCS
cb = b->addClass<linearSystemCSRTaucs<double> >("linearSystemCSRTaucs"); cb = b->addClass<linearSystemCSRTaucs<double> >("linearSystemCSRTaucs");
...@@ -39,6 +46,7 @@ void linearSystem<double>::registerBindings(binding *b){ ...@@ -39,6 +46,7 @@ void linearSystem<double>::registerBindings(binding *b){
cb->setDescription("An abstraction of a linear system Ax = b."); cb->setDescription("An abstraction of a linear system Ax = b.");
cm = cb->addMethod("systemSolve", &linearSystem<fullMatrix<double> >::systemSolve); cm = cb->addMethod("systemSolve", &linearSystem<fullMatrix<double> >::systemSolve);
cm->setDescription("compute x = A^{-1}b"); cm->setDescription("compute x = A^{-1}b");
cb->setParentClass<linearSystemBase>();
#ifdef HAVE_PETSC #ifdef HAVE_PETSC
linearSystemPETScRegisterBindings (b); linearSystemPETScRegisterBindings (b);
#endif #endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment