Skip to content
Snippets Groups Projects
Commit fb808fe1 authored by Bernd Flemisch's avatar Bernd Flemisch
Browse files

box 3p3cni columnxylolproblem: avoid uninitialized warning, enhance

readability of initial condition.


git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@8838 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent e6321e5d
No related branches found
No related tags found
No related merge requests found
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
// vi: set et ts=4 sw=4 sts=4:
/*****************************************************************************
* Copyright (C) 2011 by Holger Class *
* Copyright (C) 2011 by Holger Class *
* Institute for Modelling Hydraulic and Environmental Systems *
* University of Stuttgart, Germany *
* email: <givenname>.<name>@iws.uni-stuttgart.de *
......@@ -9,7 +9,7 @@
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 2 of the License, or *
* (at your option) any later vesion. *
* (at your option) any later vesion. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
......@@ -178,7 +178,7 @@ public:
{
const GlobalPosition globalPos = vertex.geometry().center();
if(globalPos[1] < eps_)
if (globalPos[1] < eps_)
values.setAllDirichlet();
else
values.setAllNeumann();
......@@ -329,37 +329,52 @@ private:
values[temperatureIdx] = 296.15;
values[pressureIdx] = 1.e5;
if(y > 1.2-eps_){
values[switch2Idx] = 0.112; // almost no contaminant component
values[switch1Idx] = 0.005;
} else if(y < 1.2-0.3){ // extended domain
values[switch2Idx] = 1.e-4; // almost no contaminant component
values[switch1Idx] = 0.005;
} else {
values[switch1Idx] = 0.005;
if((y<=1.2-0.001)&&(y>=1.2-0.0148)) values[switch2Idx] = 0+((1.2-y)/0.0148)*0.112;
if((y<1.2-0.0148)&&(y>=1.2-0.0296)) values[switch2Idx] = 0.112+(((1.2-y)-0.0148)/0.0148)*(0.120-0.112);
if((y<1.2-0.0296)&&(y>=1.2-0.0444)) values[switch2Idx] = 0.120+(((1.2-y)-0.0296)/0.0148)*(0.125-0.120);
if((y<1.2-0.0444)&&(y>=1.2-0.0592)) values[switch2Idx] = 0.125+(((1.2-y)-0.0444)/0.0148)*(0.137-0.125);
if((y<1.2-0.0592)&&(y>=1.2-0.0740)) values[switch2Idx] = 0.137+(((1.2-y)-0.0592)/0.0148)*(0.150-0.137);
if((y<1.2-0.0740)&&(y>=1.2-0.0888)) values[switch2Idx] = 0.150+(((1.2-y)-0.0740)/0.0148)*(0.165-0.150);
if((y<1.2-0.0888)&&(y>=1.2-0.1036)) values[switch2Idx] = 0.165+(((1.2-y)-0.0888)/0.0148)*(0.182-0.165);
if((y<1.2-0.1036)&&(y>=1.2-0.1184)) values[switch2Idx] = 0.182+(((1.2-y)-0.1036)/0.0148)*(0.202-0.182);
if((y<1.2-0.1184)&&(y>=1.2-0.1332)) values[switch2Idx] = 0.202+(((1.2-y)-0.1184)/0.0148)*(0.226-0.202);
if((y<1.2-0.1332)&&(y>=1.2-0.1480)) values[switch2Idx] = 0.226+(((1.2-y)-0.1332)/0.0148)*(0.257-0.226);
if((y<1.2-0.1480)&&(y>=1.2-0.1628)) values[switch2Idx] = 0.257+(((1.2-y)-0.1480)/0.0148)*(0.297-0.257);
if((y<1.2-0.1628)&&(y>=1.2-0.1776)) values[switch2Idx] = 0.297+(((1.2-y)-0.1628)/0.0148)*(0.352-0.297);
if((y<1.2-0.1776)&&(y>=1.2-0.1924)) values[switch2Idx] = 0.352+(((1.2-y)-0.1776)/0.0148)*(0.426-0.352);
if((y<1.2-0.1924)&&(y>=1.2-0.2072)) values[switch2Idx] = 0.426+(((1.2-y)-0.1924)/0.0148)*(0.522-0.426);
if((y<1.2-0.2072)&&(y>=1.2-0.2220)) values[switch2Idx] = 0.522+(((1.2-y)-0.2072)/0.0148)*(0.640-0.522);
if((y<1.2-0.2220)&&(y>=1.2-0.2368)) values[switch2Idx] = 0.640+(((1.2-y)-0.2220)/0.0148)*(0.767-0.640);
if((y<1.2-0.2368)&&(y>=1.2-0.2516)) values[switch2Idx] = 0.767+(((1.2-y)-0.2368)/0.0148)*(0.878-0.767);
if((y<1.2-0.2516)&&(y>=1.2-0.2664)) values[switch2Idx] = 0.878+(((1.2-y)-0.2516)/0.0148)*(0.953-0.878);
if((y<1.2-0.2664)&&(y>=1.2-0.2812)) values[switch2Idx] = 0.953+(((1.2-y)-0.2664)/0.0148)*(0.988-0.953);
if((y<1.2-0.2812)&&(y>=1.2-0.3000)) values[switch2Idx] = 0.988;
}
values[switch1Idx] = 0.005;
if (y > 1.2 - eps_)
values[switch2Idx] = 0.112;
else if (y > 1.2 - 0.0148)
values[switch2Idx] = 0 + ((1.2 - y)/0.0148)*0.112;
else if (y > 1.2 - 0.0296)
values[switch2Idx] = 0.112 + (((1.2 - y) - 0.0148)/0.0148)*(0.120 - 0.112);
else if (y > 1.2 - 0.0444)
values[switch2Idx] = 0.120 + (((1.2 - y) - 0.0296)/0.0148)*(0.125 - 0.120);
else if (y > 1.2 - 0.0592)
values[switch2Idx] = 0.125 + (((1.2 - y) - 0.0444)/0.0148)*(0.137 - 0.125);
else if (y > 1.2 - 0.0740)
values[switch2Idx] = 0.137 + (((1.2 - y) - 0.0592)/0.0148)*(0.150 - 0.137);
else if (y > 1.2 - 0.0888)
values[switch2Idx] = 0.150 + (((1.2 - y) - 0.0740)/0.0148)*(0.165 - 0.150);
else if (y > 1.2 - 0.1036)
values[switch2Idx] = 0.165 + (((1.2 - y) - 0.0888)/0.0148)*(0.182 - 0.165);
else if (y > 1.2 - 0.1184)
values[switch2Idx] = 0.182 + (((1.2 - y) - 0.1036)/0.0148)*(0.202 - 0.182);
else if (y > 1.2 - 0.1332)
values[switch2Idx] = 0.202 + (((1.2 - y) - 0.1184)/0.0148)*(0.226 - 0.202);
else if (y > 1.2 - 0.1480)
values[switch2Idx] = 0.226 + (((1.2 - y) - 0.1332)/0.0148)*(0.257 - 0.226);
else if (y > 1.2 - 0.1628)
values[switch2Idx] = 0.257 + (((1.2 - y) - 0.1480)/0.0148)*(0.297 - 0.257);
else if (y > 1.2 - 0.1776)
values[switch2Idx] = 0.297 + (((1.2 - y) - 0.1628)/0.0148)*(0.352 - 0.297);
else if (y > 1.2 - 0.1924)
values[switch2Idx] = 0.352 + (((1.2 - y) - 0.1776)/0.0148)*(0.426 - 0.352);
else if (y > 1.2 - 0.2072)
values[switch2Idx] = 0.426 + (((1.2 - y) - 0.1924)/0.0148)*(0.522 - 0.426);
else if (y > 1.2 - 0.2220)
values[switch2Idx] = 0.522 + (((1.2 - y) - 0.2072)/0.0148)*(0.640 - 0.522);
else if (y > 1.2 - 0.2368)
values[switch2Idx] = 0.640 + (((1.2 - y) - 0.2220)/0.0148)*(0.767 - 0.640);
else if (y > 1.2 - 0.2516)
values[switch2Idx] = 0.767 + (((1.2 - y) - 0.2368)/0.0148)*(0.878 - 0.767);
else if (y > 1.2 - 0.2664)
values[switch2Idx] = 0.878 + (((1.2 - y) - 0.2516)/0.0148)*(0.953 - 0.878);
else if (y > 1.2 - 0.2812)
values[switch2Idx] = 0.953 + (((1.2 - y) - 0.2664)/0.0148)*(0.988 - 0.953);
else if (y > 1.2 - 0.3000)
values[switch2Idx] = 0.988;
else
values[switch2Idx] = 1.e-4;
}
const Scalar eps_;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment