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

fix fullMatrix lua bindings

parent 6871f9ec
No related branches found
No related tags found
No related merge requests found
......@@ -352,7 +352,7 @@ void fullMatrix<double>::registerBindings(binding *b)
cm->setArgNames("A","B","alpha","beta",NULL);
cm->setDescription("this = beta*this + alpha * (A.B)");
cm = cb->addMethod("print", &fullMatrix<double>::print);
cm->setArgNames("name",NULL);
cm->setArgNames("name","format",NULL);
cm->setDescription("print the matrix");
cm = cb->addMethod("invertInPlace", &fullMatrix<double>::invertInPlace);
cm->setDescription("invert the matrix and return the determinant");
......
......@@ -490,7 +490,7 @@ class fullMatrix
#endif
;
void print(const std::string name = "", const char *format = "%12.5E ") const
void print(const std::string name = "", const std::string format = "%12.5E ") const
{
printf("Printing matrix %s:\n", name.c_str());
int ni = size1();
......@@ -498,7 +498,7 @@ class fullMatrix
for(int I = 0; I < ni; I++){
printf(" ");
for(int J = 0; J < nj; J++){
printf(format, (*this)(I, J));
printf(format.c_str(), (*this)(I, J));
}
printf("\n");
}
......
......@@ -68,7 +68,7 @@ class linearSystemFull : public linearSystem<scalar> {
}
virtual void zeroRightHandSide()
{
for(int i = 0; i < _b->size(); i++) (*_b)(i) = 0.;
_b->setAll(0.);
}
virtual double normInfRightHandSide() const{
double nor = 0.;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment