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

dg: correct Outside Boundary Condition

parent a3133053
Branches
Tags
No related merge requests found
......@@ -10,5 +10,5 @@ Line Loop(5) = {2, 3, 4, 1};
Plane Surface(6) = {5};
Physical Line("Border") = {1, 2, 3, 4};
Physical Surface("Inside") = {6};
Transfinite Line {1, 2, 4, 3} = 2 Using Progression 1;
Transfinite Surface {6};
//Transfinite Line {1, 2, 4, 3} = 2 Using Progression 1;
//Transfinite Surface {6};
......@@ -4,28 +4,25 @@ class dgBoundaryConditionOutsideValue : public dgBoundaryCondition {
dgConservationLaw &_claw;
std::string _outsideValueFunctionName;
class term : public dataCacheDouble {
dataCacheMap cacheMapRight; // new cacheMap to pass to the Riemann solver
dataCacheDouble &solutionRight;
dataCacheDouble &solutionLeft;
dataCacheDouble &outsideValue;
dataCacheMap cacheMapRight; // new cacheMap to pass to the Riemann solver
dataCacheDouble *riemannSolver;
dgConservationLaw &_claw;
public:
term(dgConservationLaw &claw, dataCacheMap &cacheMapLeft,const std::string outsideValueFunctionName):
dataCacheDouble(cacheMapLeft.getNbEvaluationPoints(),claw.nbFields()),
cacheMapRight(cacheMapLeft.getNbEvaluationPoints()),
solutionRight(cacheMapRight.provideData("Solution")),
solutionLeft(cacheMapLeft.get("Solution",this)),
outsideValue(cacheMapLeft.get(outsideValueFunctionName,this)),
cacheMapRight(cacheMapLeft.getNbEvaluationPoints()),
_claw(claw)
{
riemannSolver=_claw.newRiemannSolver(cacheMapLeft,cacheMapRight);
}
void _eval() {
if(_value.size1()!=solutionLeft().size1()){
//adjust sizes
_value = fullMatrix<double>(solutionLeft().size1(),_claw.nbFields());
}
solutionRight.set(outsideValue());
if(riemannSolver){
for(int i=0;i<_value.size1(); i++)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment