Skip to content
Snippets Groups Projects
Commit 5a046214 authored by Jonathan Lambrechts's avatar Jonathan Lambrechts
Browse files

bindings for dgSlopeLimite (no bool in lua)

parent eaef33a5
No related branches found
No related tags found
No related merge requests found
......@@ -20,6 +20,7 @@
#include "dgConservationLawWaveEquation.h"
#include "dgRungeKutta.h"
#include "dgSystemOfEquations.h"
#include "dgLimiter.h"
extern "C" {
#include "lua.h"
......@@ -282,6 +283,8 @@ binding::binding(){
DocRecord::registerBindings(this);
GEntity::registerBindings(this);
GFace::registerBindings(this);
dgLimiter::registerBindings(this);
dgSlopeLimiter::registerBindings(this);
}
binding *binding::_instance=NULL;
#endif
......@@ -72,7 +72,7 @@ law:addBoundaryCondition('Top',law:newOutsideValueBoundary(FS))
GC=dgGroupCollection(myModel,2,order)
solution=dgDofContainer(GC,4)
solution:L2Projection(FS)
limiter=dgSlopeLimiter(law)
limiter = dgSlopeLimiter(law)
-- limiter:apply(solution)
GC:buildGroupsOfInterfaces(myModel,2,order)
......
......@@ -4,7 +4,7 @@
#include "function.h"
//----------------------------------------------------------------------------------
bool dgSlopeLimiter::apply ( dgDofContainer *solution)
int dgSlopeLimiter::apply ( dgDofContainer *solution)
{
dgGroupCollection *groups=solution->getGroups();
solution->scatter();
......@@ -118,7 +118,7 @@ bool dgSlopeLimiter::apply ( dgDofContainer *solution)
}
}
}
return true;
return 1;
}
#include "Bindings.h"
......@@ -127,9 +127,9 @@ void dgLimiter::registerBindings(binding *b) {
classBinding *cb = b->addClass<dgLimiter>("dgLimiter");
cb->setDescription("Parent class for limiters");
methodBinding *cm;
// cm = cb->addMethod("apply",&dgLimiter::apply);
// cm->setArgNames("solution",NULL);
// cm->setDescription("apply the limiter on the solution");
cm = cb->addMethod("apply",&dgLimiter::apply);
cm->setArgNames("solution",NULL);
cm->setDescription("apply the limiter on the solution");
}
void dgSlopeLimiter::registerBindings(binding *b) {
......@@ -139,5 +139,6 @@ void dgSlopeLimiter::registerBindings(binding *b) {
cm = cb->setConstructor<dgSlopeLimiter,dgConservationLaw *>();
cm->setDescription("A new explicit slope limiter");
cm->setArgNames("law",NULL);
cb->setParentClass<dgLimiter>();
}
......@@ -13,14 +13,14 @@ protected:
dgConservationLaw *_claw;
public:
dgLimiter (dgConservationLaw *claw) : _claw(claw) {}
virtual bool apply ( dgDofContainer *sol)=0;
virtual int apply ( dgDofContainer *sol)=0;
static void registerBindings(binding *b);
};
class dgSlopeLimiter : public dgLimiter{
public :
dgSlopeLimiter (dgConservationLaw *claw) : dgLimiter (claw) {}
virtual bool apply ( dgDofContainer *solution);
virtual int apply ( dgDofContainer *solution);
static void registerBindings(binding *b);
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment