Commit 158678f8 authored by Philippe Delandmeter's avatar Philippe Delandmeter Committed by Valentin Vallaeys
Browse files

slim3d: For z layers. The moving mesh was discontinuous!

parent 3460c69a
Pipeline #1101 failed with stage
in 33 minutes and 42 seconds
......@@ -373,7 +373,8 @@ void slim3dSolverFunctions::initialize()
else if (_solver->getUseConservativeALE())
Msg::Fatal("Conservative ALE does not work with adaptive vertical coordinates yet");
_dt3d = new double(-1);
newZFunc = new zNewAdaptative(dofs->xyzOrigDof->getFunction(), eta2dCGFunc, eta2dCGFuncOld, bathFunc2d, dofs->arbitraryMovingMeshDof3d->getFunction(), _dt3d, timeFunc);
//newZFunc = new zNewAdaptative(dofs->xyzOrigDof->getFunction(), eta2dCGFunc, eta2dCGFuncOld, bathFunc2d, dofs->arbitraryMovingMeshDof3d->getFunction(), _dt3d, timeFunc);
newZFunc = new zNewAdaptative(dofs->xyzOrigDof->getFunction(), eta2dCGFunc, eta2dCGFuncOld, _solver->verticalBottomRemover->heightAboveVertBottom->getFunction(), dofs->arbitraryMovingMeshDof3d->getFunction(), _dt3d, timeFunc);
wMeshFunc = new wMeshAdapt(wMeshSurf2dPrecompFunc, eta2dCGFunc, bathFunc2d, dofs->arbitraryMovingMeshDof3d->getFunction());
wMeshDzFunc = new dwMeshDzAdapt(wMeshSurf2dPrecompFunc, eta2dCGFunc, bathFunc2d, dofs->arbitraryMovingMeshDof3d->getFunctionGradient());
......
......@@ -183,7 +183,9 @@ public:
};
void call (dataCacheMap *m, fullMatrix<double> &sol) {
for (int i = 0; i < sol.size1(); i++) {
double movingMeshFactor = (_xyz0(i,2)+_bath(i,0))/(_bath(i,0));
double movingMeshFactor = 0;
if (_bath(i,0) > 0)
movingMeshFactor = (_xyz0(i,2)+_bath(i,0))/(_bath(i,0));
double newZ = _xyz(i,2) + (_eta(i,0) - _etaOld(i,0)) * movingMeshFactor + _f(i,0) * *_dt3d ;
sol.set(i,0, newZ);
}
......
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