Commit 44f3785f authored by Lambert Theisen's avatar Lambert Theisen
Browse files

Fix testcases with the new inflow BC. This includes:

- Usage of numdiff program rather than diff. This is because with the new inflow-model, some eorrors change slightly. We now compare with an absolute tolerance of 1E-10 because that works fine
- Installation of numdiff within Dockerfile
- Minor style changes in all input files
parent 16435a08
......@@ -24,6 +24,11 @@ RUN cd /usr/local && \
tar -xf gmsh-${GMSH_VERSION}-Linux64-sdk.tgz
ENV PATH=/usr/local/gmsh-${GMSH_VERSION}-Linux64-sdk/bin:$PATH
# Install additional programs
RUN apt-get update && apt-get install -y \
# someotherpackages \
numdiff
# Install any needed packages specified in requirements.txt
# RUN pip install --trusted-host pypi.python.org -r requirements.txt
COPY requirements.txt /tmp/
......
......@@ -64,13 +64,17 @@ xi_tilde: 1.0
bcs:
3000:
"name": "inner"
"theta_w": 1.0
"v_t": -10.0
theta_w: 1.0
v_t: -10
v_n: 0
p_w: 0
gamma: 0
3100:
"name": "outer"
"theta_w": 0.5
"v_t": 0.0
theta_w: 0.5
v_t: 0
v_n: 0
p_w: 0
gamma: 0
# heat source
heat_source: "0"
......
......@@ -64,13 +64,19 @@ xi_tilde: 1.0
bcs:
3000:
"name": "inner"
"theta_w": 1.0
"v_t": -10.0
theta_w: 1.0
v_t: -10
v_n: 0
p_w: 0
gamma: 0
3100:
"name": "outer"
"theta_w": 0.5
"v_t": 0.0
theta_w: 0.5
v_t: 0
v_n: 0
p_w: 0
gamma: 0
# heat source
heat_source: "0"
......
......@@ -24,11 +24,20 @@ class TestCoupledConvergence(object):
def compare_errors(self, errorsfile, ref_errorsfile):
"""
Check against reference errors.
Check against reference errors. Compares absolute differences.
Absolute Error allowed: ``1E-10``
Return exception if diff returns with !=0
A comparison for complete equalness can be obtained with:
.. code-block:: python
subprocess.check_call([
"diff", "-u", "--strip-trailing-cr", errorsfile, ref_errorsfile
], cwd=self.working_dir)
"""
subprocess.check_call([
"diff", "-u", "--strip-trailing-cr", errorsfile, ref_errorsfile
"numdiff", "-s", "\"\n\r ,\"", "-a", "1E-10",
errorsfile, ref_errorsfile
], cwd=self.working_dir)
# @pytest.fixture(scope="module", autouse=True)
......
......@@ -62,13 +62,17 @@ xi_tilde: 1.0
bcs:
3000:
"name": "inner"
"theta_w": 1.0
"v_t": 10.0
theta_w: 1.0
v_t: 10
v_n: 0
p_w: 0
gamma: 0
3100:
"name": "outer"
"theta_w": 0.5
"v_t": 0.0
theta_w: 0.5
v_t: 0
v_n: 0
p_w: 0
gamma: 0
# heat source
heat_source: "2.0 - 1.0 * pow(sqrt(pow(x[0],2)+pow(x[1],2)),2)"
......
......@@ -62,13 +62,17 @@ xi_tilde: 1.0
bcs:
3000:
"name": "inner"
"theta_w": 1.0
"v_t": 10.0
theta_w: 1.0
v_t: 10
v_n: 0
p_w: 0
gamma: 0
3100:
"name": "outer"
"theta_w": 0.5
"v_t": 0.0
theta_w: 0.5
v_t: 0
v_n: 0
p_w: 0
gamma: 0
# heat source
heat_source: "2.0 - 1.0 * pow(sqrt(pow(x[0],2)+pow(x[1],2)),2)"
......
......@@ -64,13 +64,17 @@ xi_tilde: 1.0
bcs:
3000:
"name": "inner"
"theta_w": 1.0
"v_t": 10.0
theta_w: 1.0
v_t: 10
v_n: 0
p_w: 0
gamma: 0
3100:
"name": "outer"
"theta_w": 0.5
"v_t": 0.0
theta_w: 0.5
v_t: 0
v_n: 0
p_w: 0
gamma: 0
# heat source
heat_source: "2.0 - 1.0 * pow(sqrt(pow(x[0],2)+pow(x[1],2)),2)"
......
......@@ -62,13 +62,17 @@ xi_tilde: 1.0
bcs:
3000:
"name": "inner"
"theta_w": 1.0
"v_t": 10.0
theta_w: 1.0
v_t: 10
v_n: 0
p_w: 0
gamma: 0
3100:
"name": "outer"
"theta_w": 0.5
"v_t": 0.0
theta_w: 0.5
v_t: 0
v_n: 0
p_w: 0
gamma: 0
# heat source
heat_source: "2.0 - 1.0 * pow(sqrt(pow(x[0],2)+pow(x[1],2)),2)"
......
......@@ -62,13 +62,17 @@ xi_tilde: 1.0
bcs:
3000:
"name": "inner"
"theta_w": 1.0
"v_t": 10.0
theta_w: 1.0
v_t: 10
v_n: 0
p_w: 0
gamma: 0
3100:
"name": "outer"
"theta_w": 0.5
"v_t": 0.0
theta_w: 0.5
v_t: 0
v_n: 0
p_w: 0
gamma: 0
# heat source
heat_source: "2.0 - 1.0 * pow(sqrt(pow(x[0],2)+pow(x[1],2)),2)"
......
......@@ -24,11 +24,20 @@ class TestHeatConvergence(object):
def compare_errors(self, errorsfile, ref_errorsfile):
"""
Check against reference errors.
Check against reference errors. Compares absolute differences.
Absolute Error allowed: ``1E-10``
Return exception if diff returns with !=0
A comparison for complete equalness can be obtained with:
.. code-block:: python
subprocess.check_call([
"diff", "-u", "--strip-trailing-cr", errorsfile, ref_errorsfile
], cwd=self.working_dir)
"""
subprocess.check_call([
"diff", "-u", "--strip-trailing-cr", errorsfile, ref_errorsfile
"numdiff", "-s", "\"\n\r ,\"", "-a", "1E-10",
errorsfile, ref_errorsfile
], cwd=self.working_dir)
# @pytest.fixture(scope="module", autouse=True)
......
......@@ -64,13 +64,17 @@ xi_tilde: 1.0
bcs:
3000:
"name": "inner"
"theta_w": 1.0
"v_t": -10.0
theta_w: 1.0
v_t: -10
v_n: 0
p_w: 0
gamma: 0
3100:
"name": "outer"
"theta_w": 0.5
"v_t": 0.0
theta_w: 0.5
v_t: 0
v_n: 0
p_w: 0
gamma: 0
# heat source
heat_source: "2.0 - 1.0 * pow(sqrt(pow(x[0],2)+pow(x[1],2)),2)"
......
......@@ -64,13 +64,17 @@ xi_tilde: 1.0
bcs:
3000:
"name": "inner"
"theta_w": 1.0
"v_t": 0.0
theta_w: 1.0
v_t: 0
v_n: 0
p_w: 0
gamma: 0
3100:
"name": "outer"
"theta_w": 0.5
"v_t": 0.0
theta_w: 0.5
v_t: 0
v_n: 0
p_w: 0
gamma: 0
# heat source
heat_source: "2.0 - 1.0 * pow(sqrt(pow(x[0],2)+pow(x[1],2)),2)"
......
......@@ -64,13 +64,17 @@ xi_tilde: 1.0
bcs:
3000:
"name": "inner"
"theta_w": 1.0
"v_t": -10.0
theta_w: 1.0
v_t: -10
v_n: 0
p_w: 0
gamma: 0
3100:
"name": "outer"
"theta_w": 0.5
"v_t": 0.0
theta_w: 0.5
v_t: 0
v_n: 0
p_w: 0
gamma: 0
# heat source
heat_source: "2.0 - 1.0 * pow(sqrt(pow(x[0],2)+pow(x[1],2)),2)"
......
......@@ -64,13 +64,17 @@ xi_tilde: 1.0
bcs:
3000:
"name": "inner"
"theta_w": 1.0
"v_t": -10.0
theta_w: 1.0
v_t: -10
v_n: 0
p_w: 0
gamma: 0
3100:
"name": "outer"
"theta_w": 0.5
"v_t": 0.0
theta_w: 0.5
v_t: 0
v_n: 0
p_w: 0
gamma: 0
# heat source
heat_source: "2.0 - 1.0 * pow(sqrt(pow(x[0],2)+pow(x[1],2)),2)"
......
......@@ -64,13 +64,17 @@ xi_tilde: 1.0
bcs:
3000:
"name": "inner"
"theta_w": 1.0
"v_t": -10.0
theta_w: 1.0
v_t: -10
v_n: 0
p_w: 0
gamma: 0
3100:
"name": "outer"
"theta_w": 0.5
"v_t": 0.0
theta_w: 0.5
v_t: 0
v_n: 0
p_w: 0
gamma: 0
# heat source
heat_source: "2.0 - 1.0 * pow(sqrt(pow(x[0],2)+pow(x[1],2)),2)"
......
......@@ -64,13 +64,17 @@ xi_tilde: 1.0
bcs:
3000:
"name": "inner"
"theta_w": 1.0
"v_t": -10.0
theta_w: 1.0
v_t: -10
v_n: 0
p_w: 0
gamma: 0
3100:
"name": "outer"
"theta_w": 0.5
"v_t": 0.0
theta_w: 0.5
v_t: 0
v_n: 0
p_w: 0
gamma: 0
# heat source
heat_source: "2.0 - 1.0 * pow(sqrt(pow(x[0],2)+pow(x[1],2)),2)"
......
......@@ -24,11 +24,20 @@ class TestStressConvergence(object):
def compare_errors(self, errorsfile, ref_errorsfile):
"""
Check against reference errors.
Check against reference errors. Compares absolute differences.
Absolute Error allowed: ``1E-10``
Return exception if diff returns with !=0
A comparison for complete equalness can be obtained with:
.. code-block:: python
subprocess.check_call([
"diff", "-u", "--strip-trailing-cr", errorsfile, ref_errorsfile
], cwd=self.working_dir)
"""
subprocess.check_call([
"diff", "-u", "--strip-trailing-cr", errorsfile, ref_errorsfile
"numdiff", "-s", "\"\n\r ,\"", "-a", "1E-10",
errorsfile, ref_errorsfile
], cwd=self.working_dir)
# @pytest.fixture(scope="module", autouse=True)
......
Supports Markdown
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