Commit 6698eb32 authored by Matthieu Flamand's avatar Matthieu Flamand

fix sediment bottom

parent e6091d1d
Pipeline #2024 passed with stage
in 36 minutes and 54 seconds
......@@ -3,6 +3,7 @@
void dgConservationLawSedimentBottom::gradPsiTermCB(functorCache &m, fullMatrix<double> &val)const{
const fullMatrix<double> &s = m.get(*_s);
val.resize(m.nEvaluationPoint(), 3, false);
for(int i=0; i< m.nEvaluationPoint(); i++) {
val(i,0) = s(i,0);
val(i,1) = s(i,1);
......@@ -13,11 +14,10 @@ void dgConservationLawSedimentBottom::gradPsiTermCB(functorCache &m, fullMatrix<
void dgConservationLawSedimentBottom::interfaceTermCB(functorCache &m, fullMatrix<double>&val) const {
const fullMatrix<double> &sL = m.get(*_s, 0);
const fullMatrix<double> &sR = m.get(*_s, 1);
const fullMatrix<double> &nL = m.get(*functor::getNormals(), 0);
const fullMatrix<double> &nR = m.get(*functor::getNormals(),1);
val.resize(m.nEvaluationPoint(), 2);
const fullMatrix<double> &n = m.get(*functor::getNormals(), 0);
val.resize(m.nEvaluationPoint(), 1);
for(int i=0; i< m.nEvaluationPoint(); i++) {
val(i,0) = -(sL(i,0)*nL(i,0)+sL(i,1)*nL(i,1)+sR(i,0)*nR(i,0)+sR(i,1)*nR(i,1))/2;
val(i,0) = -(sL(i,0)*n(i,0)+sL(i,1)*n(i,1)+sR(i,0)*n(i,0)+sR(i,1)*n(i,1))/2.;
}
}
......
......@@ -10,6 +10,7 @@ class dgConservationLawSedimentBottom : public dgConservationLawFunction {
void interfaceTermCB(functorCache &m, fullMatrix<double> &val) const;
bool isConstantJac() const {return true;}
bool isLinear() const {return true;}
dgBoundaryCondition *newBoundaryWall();
dgBoundaryCondition *newBoundaryOpen();
dgConservationLawSedimentBottom(const functor *s);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment