Commit 4dfebc3a authored by Lambert Theisen's avatar Lambert Theisen
Browse files

Rename coupled to r13

parent 9c32f564
Pipeline #170333 passed with stages
in 9 minutes and 54 seconds
......@@ -61,7 +61,7 @@ pages:
- sphinx-apidoc -o source/src ../src
- sphinx-apidoc -o source/tests/heat ../tests/heat
- sphinx-apidoc -o source/tests/stress ../tests/stress
- sphinx-apidoc -o source/tests/coupled ../tests/coupled
- sphinx-apidoc -o source/tests/r13 ../tests/r13
- make html
- mv _build/html/ ${CI_PROJECT_DIR}/public/
artifacts:
......
......@@ -15,7 +15,7 @@ import sys
sys.path.insert(0, os.path.abspath('../src'))
sys.path.insert(0, os.path.abspath('../tests/heat'))
sys.path.insert(0, os.path.abspath('../tests/stress'))
sys.path.insert(0, os.path.abspath('../tests/coupled'))
sys.path.insert(0, os.path.abspath('../tests/r13'))
# -- Project information -----------------------------------------------------
......
......@@ -20,4 +20,4 @@ Contents
source/src/modules.rst
source/tests/heat/modules.rst
source/tests/stress/modules.rst
source/tests/coupled/modules.rst
source/tests/r13/modules.rst
coupled
r13
=======
.. toctree::
:maxdepth: 4
test_coupled_convergence
test_r13_convergence
test\_coupled\_convergence module
test\_r13\_convergence module
=================================
.. automodule:: test_coupled_convergence
.. automodule:: test_r13_convergence
:members:
:undoc-members:
:show-inheritance:
......@@ -49,8 +49,8 @@ stabilization:
# Number of spatial dimensions, currently only two-dimensional.
nsd: 2
# heat, stress, coupled
mode: "coupled"
# heat, stress, r13
mode: "r13"
# Coefficients as in westerkamp2019 or without as in torrilhon2017
use_coeffs: True
......
......@@ -26,7 +26,7 @@ class Input:
"mode": {
"type": "string",
"required": True,
"allowed": ["heat", "stress", "coupled"]
"allowed": ["heat", "stress", "r13"]
},
"use_coeffs": {
"type": "boolean",
......
......@@ -102,12 +102,12 @@ class Solver:
self.mxd_elems = {
"heat": None,
"stress": None,
"coupled": None,
"r13": None,
}
self.mxd_fspaces = {
"heat": None,
"stress": None,
"coupled": None,
"r13": None,
}
self.form_a = None
self.form_b = None
......@@ -154,10 +154,10 @@ class Solver:
msh, self.mxd_elems["stress"]
)
coupled_elems = heat_elems + stress_elems
self.mxd_elems["coupled"] = df.MixedElement(coupled_elems)
self.mxd_fspaces["coupled"] = df.FunctionSpace(
msh, self.mxd_elems["coupled"]
r13_elems = heat_elems + stress_elems
self.mxd_elems["r13"] = df.MixedElement(r13_elems)
self.mxd_fspaces["r13"] = df.FunctionSpace(
msh, self.mxd_elems["r13"]
)
def check_bcs(self):
......@@ -221,10 +221,10 @@ class Solver:
# Setup function spaces
w_heat = self.mxd_fspaces["heat"]
w_stress = self.mxd_fspaces["stress"]
w_coupled = self.mxd_fspaces["coupled"]
if self.mode == "coupled":
(theta, s, p, u, sigma) = df.TrialFunctions(w_coupled)
(kappa, r, q, v, psi) = df.TestFunctions(w_coupled)
w_r13 = self.mxd_fspaces["r13"]
if self.mode == "r13":
(theta, s, p, u, sigma) = df.TrialFunctions(w_r13)
(kappa, r, q, v, psi) = df.TestFunctions(w_r13)
else:
# Pure heat or pure stress: setup all functions..
(theta, s) = df.TrialFunctions(w_heat)
......@@ -248,7 +248,7 @@ class Solver:
f_heat = self.heat_source
f_mass = self.mass_source
if self.mode == "coupled":
if self.mode == "r13":
cpl = 1.0
else:
cpl = 0.0
......@@ -369,7 +369,7 @@ class Solver:
elif self.mode == "stress":
self.form_a = a3 + a4 + a5 + stab_stress
self.form_b = l3 + l4 + l5
elif self.mode == "coupled":
elif self.mode == "r13":
self.form_a = a1 + a2 + stab_heat + a3 + a4 + a5 + stab_stress
self.form_b = l1 + l2 + l3 + l4 + l5
......@@ -393,8 +393,8 @@ class Solver:
w = self.mxd_fspaces["heat"]
elif self.mode == "stress":
w = self.mxd_fspaces["stress"]
elif self.mode == "coupled":
w = self.mxd_fspaces["coupled"]
elif self.mode == "r13":
w = self.mxd_fspaces["r13"]
sol = df.Function(w)
df.solve(
......@@ -406,13 +406,13 @@ class Solver:
(self.sol["theta"], self.sol["s"]) = sol.split()
elif self.mode == "stress":
(self.sol["p"], self.sol["u"], self.sol["sigma"]) = sol.split()
elif self.mode == "coupled":
elif self.mode == "r13":
(
self.sol["theta"], self.sol["s"],
self.sol["p"], self.sol["u"], self.sol["sigma"]
) = sol.split()
if self.mode == "stress" or self.mode == "coupled":
if self.mode == "stress" or self.mode == "r13":
if self.rescale_p:
# Scale pressure to have zero mean
p_i = df.interpolate(self.sol["p"], self.fspaces["p"])
......@@ -424,7 +424,7 @@ class Solver:
def load_exact_solution(self):
"Writes exact solution"
if self.mode == "heat" or self.mode == "coupled":
if self.mode == "heat" or self.mode == "r13":
with open(self.exact_solution, "r") as file:
exact_solution_cpp_code = file.read()
......@@ -438,7 +438,7 @@ class Solver:
self.esol["s"] = df.CompiledExpression(
esol.Heatflux(), degree=2
)
if self.mode == "stress" or self.mode == "coupled":
if self.mode == "stress" or self.mode == "r13":
with open(self.exact_solution, "r") as file:
exact_solution_cpp_code = file.read()
......@@ -571,7 +571,7 @@ class Solver:
"l_inf": errs_v_linf[i],
} for i in range(dofs)]
if self.mode == "heat" or self.mode == "coupled":
if self.mode == "heat" or self.mode == "r13":
se = calc_scalarfield_errors(
self.sol["theta"], self.esol["theta"],
self.fspaces["theta"], "theta"
......@@ -584,7 +584,7 @@ class Solver:
ers["theta"] = se
ers["sx"] = ve[0]
ers["sy"] = ve[1]
if self.mode == "stress" or self.mode == "coupled":
if self.mode == "stress" or self.mode == "r13":
se = calc_scalarfield_errors(
self.sol["p"], self.esol["p"],
self.fspaces["p"], "p"
......
......@@ -48,7 +48,7 @@ stabilization:
# Number of spatial dimensions, currently only two-dimensional.
nsd: 2
# heat, stress, coupled
# heat, stress, r13
mode: heat
# Coefficients as in westerkamp2019 or without as in torrilhon2017
......
......@@ -48,7 +48,7 @@ stabilization:
# Number of spatial dimensions, currently only two-dimensional.
nsd: 2
# heat, stress, coupled
# heat, stress, r13
mode: heat
# Coefficients as in westerkamp2019 or without as in torrilhon2017
......
......@@ -50,7 +50,7 @@ stabilization:
# Number of spatial dimensions, currently only two-dimensional.
nsd: 2
# heat, stress, coupled
# heat, stress, r13
mode: heat
# Coefficients as in westerkamp2019 or without as in torrilhon2017
......
......@@ -48,7 +48,7 @@ stabilization:
# Number of spatial dimensions, currently only two-dimensional.
nsd: 2
# heat, stress, coupled
# heat, stress, r13
mode: heat
# Coefficients as in westerkamp2019 or without as in torrilhon2017
......
......@@ -48,7 +48,7 @@ stabilization:
# Number of spatial dimensions, currently only two-dimensional.
nsd: 2
# heat, stress, coupled
# heat, stress, r13
mode: heat
# Coefficients as in westerkamp2019 or without as in torrilhon2017
......
......@@ -49,8 +49,8 @@ stabilization:
# Number of spatial dimensions, currently only two-dimensional.
nsd: 2
# heat, stress, coupled
mode: coupled
# heat, stress, r13
mode: r13
# Coefficients as in westerkamp2019 or without as in torrilhon2017
use_coeffs: True
......
......@@ -49,8 +49,8 @@ stabilization:
# Number of spatial dimensions, currently only two-dimensional.
nsd: 2
# heat, stress, coupled
mode: coupled
# heat, stress, r13
mode: r13
# Coefficients as in westerkamp2019 or without as in torrilhon2017
use_coeffs: True
......
......@@ -49,8 +49,8 @@ stabilization:
# Number of spatial dimensions, currently only two-dimensional.
nsd: 2
# heat, stress, coupled
mode: coupled
# heat, stress, r13
mode: r13
# Coefficients as in westerkamp2019 or without as in torrilhon2017
use_coeffs: True
......
h,theta_L_2,theta_l_inf,sx_L_2,sx_l_inf,sy_L_2,sy_l_inf,p_L_2,p_l_inf,ux_L_2,ux_l_inf,uy_L_2,uy_l_inf,sigmaxx_L_2,sigmaxx_l_inf,sigmaxy_L_2,sigmaxy_l_inf,sigmayy_L_2,sigmayy_l_inf
0.9886573325052778,0.09694979259351534,0.07650367375589406,0.08577886770302906,0.0558539156109,0.08144521607617977,0.058188882626,1.8379670300128577,2.0726256345198335,0.7358137385543471,0.806805880926,0.5314561575161063,0.558967195136,0.3735682219163951,0.374688498057,0.3577096590466282,0.396890838286,0.36883554832912185,0.386880075256
0.6340332990709842,0.05943030930491017,0.04656490716403461,0.06760276721130587,0.0387195751386,0.062151164899164946,0.0425082203439,1.032823724321196,1.201748727604658,0.5618595544192228,0.980571227229,0.41781408090326955,0.641208620443,0.2555734975773327,0.255282142729,0.253279083444981,0.267749417711,0.2517828036397983,0.262839444172
0.32904683851469807,0.017751066845977173,0.03494701248444021,0.020654012203209553,0.0166832409625,0.01754108697666697,0.0123078459661,0.15708358196551503,0.20872813950482833,0.2733757917546112,0.790952923241,0.24000413905322748,0.575877864078,0.09870326246649042,0.0952921648218,0.09845529358273729,0.103759268504,0.09831576905594486,0.0925944207632
0.16754966839339377,0.00696245184037249,0.020343282189288547,0.005030441934531329,0.00568013330565,0.004543342100374149,0.0051265833176,0.018277256737650738,0.04221725504981061,0.12477895450116827,0.509479434719,0.11810119891693953,0.388615891418,0.032776024276683316,0.0455447994591,0.03157615451348728,0.0400071899874,0.03261468216603714,0.0415930978982
0.08734460120995041,0.0021986733048795968,0.009223005375054605,0.0010447784535277903,0.00124630438857,0.001049239172555221,0.00139689947437,0.0017712618377634486,0.0055961523930284085,0.04256047368582481,0.217745233676,0.04153319207332618,0.187420576014,0.008049678761230796,0.0129564775146,0.007841227451495535,0.0116496185235,0.008064996402255994,0.0126357554015
h,theta_L_2,theta_l_inf,sx_L_2,sx_l_inf,sy_L_2,sy_l_inf,p_L_2,p_l_inf,ux_L_2,ux_l_inf,uy_L_2,uy_l_inf,sigmaxx_L_2,sigmaxx_l_inf,sigmaxy_L_2,sigmaxy_l_inf,sigmayy_L_2,sigmayy_l_inf
0.9886573325052778,0.09694979259351534,0.07650367375589406,0.08577886770302906,0.0558539156109,0.08144521607617977,0.058188882626,1.8379670300128577,2.0726256345198335,0.7358137385543471,0.806805880926,0.5314561575161063,0.558967195136,0.3735682219163951,0.374688498057,0.3577096590466282,0.396890838286,0.36883554832912185,0.386880075256
0.6340332990709842,0.05943030930491017,0.04656490716403461,0.06760276721130587,0.0387195751386,0.062151164899164946,0.0425082203439,1.032823724321196,1.201748727604658,0.5618595544192228,0.980571227229,0.41781408090326955,0.641208620443,0.2555734975773327,0.255282142729,0.253279083444981,0.267749417711,0.2517828036397983,0.262839444172
0.32904683851469807,0.017751066845977173,0.03494701248444021,0.020654012203209553,0.0166832409625,0.01754108697666697,0.0123078459661,0.15708358196551503,0.20872813950482833,0.2733757917546112,0.790952923241,0.24000413905322748,0.575877864078,0.09870326246649042,0.0952921648218,0.09845529358273729,0.103759268504,0.09831576905594486,0.0925944207632
0.16754966839339377,0.00696245184037249,0.020343282189288547,0.005030441934531329,0.00568013330565,0.004543342100374149,0.0051265833176,0.018277256737650738,0.04221725504981061,0.12477895450116827,0.509479434719,0.11810119891693953,0.388615891418,0.032776024276683316,0.0455447994591,0.03157615451348728,0.0400071899874,0.03261468216603714,0.0415930978982
0.08734460120995041,0.0021986733048795968,0.009223005375054605,0.0010447784535277903,0.00124630438857,0.001049239172555221,0.00139689947437,0.0017712618377634486,0.0055961523930284085,0.04256047368582481,0.217745233676,0.04153319207332618,0.187420576014,0.008049678761230796,0.0129564775146,0.007841227451495535,0.0116496185235,0.008064996402255994,0.0126357554015
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