From 82cff13df65413d345210c60d78db42a4f96181b Mon Sep 17 00:00:00 2001 From: Klaus <klaus.boehnlein@tu-dresden.de> Date: Fri, 17 Sep 2021 00:25:06 +0200 Subject: [PATCH] Add Option to receive Cell-Output --- src/HelperFunctions.py | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/src/HelperFunctions.py b/src/HelperFunctions.py index 578fcfdb..13a545ac 100644 --- a/src/HelperFunctions.py +++ b/src/HelperFunctions.py @@ -63,18 +63,29 @@ def RunCellProblem(alpha,beta,theta,gamma,mu1,rho1, InputFilePath = os.path.dirn +def GetCellOutput((alpha,beta,theta,gamma,mu1,rho1, InputFilePath = os.path.dirname(os.getcwd()) +"/inputs/computeMuGamma.parset", + OutputFilePath = os.path.dirname(os.getcwd()) + "/outputs/outputMuGamma.txt" ): + RunCellProblem(alpha,beta,theta,gamma,mu1,rho1, InputFilePath) + print('Read effective quantities...') + Q, B = ReadEffectiveQuantities() + print('Q:', Q) + print('B:', B) + return Q, B + + # unabhängig von alpha... -def GetMuGamma(beta,theta,gamma,mu1,rho1, InputFilePath = os.path.dirname(os.getcwd()) +"/inputs/computeMuGamma.parset"): +def GetMuGamma(beta,theta,gamma,mu1,rho1, InputFilePath = os.path.dirname(os.getcwd()) +"/inputs/computeMuGamma.parset", + OutputFilePath = os.path.dirname(os.getcwd()) + "/outputs/outputMuGamma.txt" ): # ------------------------------------ get mu_gamma ------------------------------ # ---Scenario 1.1: extreme regimes if gamma == '0': - print('extreme regime: gamma = 0') + # print('extreme regime: gamma = 0') mu_gamma = (1.0/6.0)*arithmeticMean(mu1, beta, theta) # = q2 - print("mu_gamma:", mu_gamma) + # print("mu_gamma:", mu_gamma) elif gamma == 'infinity': - print('extreme regime: gamma = infinity') + # print('extreme regime: gamma = infinity') mu_gamma = (1.0/6.0)*harmonicMean(mu1, beta, theta) # = q1 - print("mu_gamma:", mu_gamma) + # print("mu_gamma:", mu_gamma) else: # --- Scenario 1.2: compute mu_gamma with 'Compute_MuGamma' (much faster than running full Cell-Problem) # print("Run computeMuGamma for Gamma = ", gamma) -- GitLab