diff --git a/Solver/TESTCASES/square.geo b/Solver/TESTCASES/square.geo index a214e082b0b163d953a2f4e77243284a87f3a9de..59bee852b86da4c564682b06141c0baf793fd6b1 100644 --- a/Solver/TESTCASES/square.geo +++ b/Solver/TESTCASES/square.geo @@ -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}; diff --git a/Solver/dgConservationLaw.cpp b/Solver/dgConservationLaw.cpp index b977bc60075edba9aeea243ff7b92187b72b50db..d0fd5b45e0880c9e19646c3484d2b48787809e28 100644 --- a/Solver/dgConservationLaw.cpp +++ b/Solver/dgConservationLaw.cpp @@ -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++)