Das persönliche Profil (https://zivgitlab.uni-muenster.de/USERID) wurde für alle Nutzer administrativ auf "privat" gesetzt. Wenn sie möchten, dass dieses wieder für alle internen Nutzer sichtbar wird, deaktivieren sie bitte das "private profile" unter den persönlichen Einstellungen (https://zivgitlab.uni-muenster.de/-/profile).

Commit f4213cce authored by Tobias Leibner's avatar Tobias Leibner

Update scripts, pymor, gdt, xt

parent 05b98b59
Pipeline #69677 failed with stages
in 8 minutes and 38 seconds
This diff is collapsed.
......@@ -54,7 +54,7 @@ def check_solve(grid_size, testcase, verbose=False):
solver = Solver(testcase, prefix, 1000000000, grid_size, False, not verbose, parameters)
operator = CoordinateTransformedmnOperator(solver)
model = CoordinatetransformedmnModel(operator, solver.get_initial_values(), solver.t_end, solver.initial_dt(), atol=1e-3, rtol=1e-3)
times_python, results_python, nonlinear_python = model._solve(verbose=verbose, mu=parameters)
times_python, results_python, nonlinear_python = model.compute(verbose=verbose, mu=parameters)
times_cpp, results_cpp, nonlinear_cpp = solver.solve(store_operator_evaluations=True, mu=parameters)
check_solver_results(comm_world, times_python, results_python, nonlinear_python, times_cpp, results_cpp, nonlinear_cpp)
if comm_world.rank == 0:
......
......@@ -25,7 +25,7 @@ def visualize_solutions(grid_size, testcase, use_python_solve):
if use_python_solve:
operator = CoordinateTransformedmnOperator(solver)
model = CoordinatetransformedmnModel(operator, solver.get_initial_values(), solver.t_end)
times, results = model._solve()
times, results = model.compute()
for i, vec in enumerate(results._list):
solver.visualize(vec, f"{prefix}_{i}")
else:
......
Subproject commit e3fe7bd2bb4f15740bd0f5c458e4fd6249808e15
Subproject commit 7974e9db992524bd430723e5c5414aef89108776
Subproject commit 1919171b4eee072529ae7fd8e388a69a63f859ee
Subproject commit 371658070bee69f097973e1ed86d7ce5d39f993a
......@@ -113,8 +113,8 @@ class BoltzmannModel(Model):
self.parameters_own = PARAMETER_TYPE
self.solution_space = self.initial_data.range
def _solve(self, mu=None, return_output=False, return_half_steps=False, basis=None):
assert not return_output
def _compute_solution(self, mu=None, **kwargs):
return_half_steps = kwargs['return_half_steps'] if 'return_half_steps' in kwargs else False
U = self.initial_data.as_vector(mu)
U_half = U.empty()
U_last = U.copy()
......@@ -202,10 +202,9 @@ class DuneModel(BoltzmannModel):
name="DuneModel",
)
def _solve(self, mu=None, return_output=False, return_half_steps=False):
assert not return_output
return self.with_(new_type=BoltzmannModel, rhs=self.non_decomp_rhs_operator).solve(
mu=mu, return_half_steps=return_half_steps
def _compute_solution(self, mu=None, **kwargs):
return self.with_(new_type=BoltzmannModel, rhs=self.non_decomp_rhs_operator).compute(
mu=mu, **kwargs
)
......
......@@ -771,9 +771,9 @@ class CellModel(Model):
[self.initial_pfield.as_vector(), self.initial_ofield.as_vector(), self.initial_stokes.as_vector()]
)
def _solve(self, mu=None, return_output=False, return_stages=False, return_residuals=False):
assert not return_output
def _compute_solution(self, mu=None, **kwargs):
return_stages = kwargs['return_stages'] if 'return_stages' in kwargs else False
return_residuals = kwargs['return_residuals'] if 'return_residuals' in kwargs else False
# initial values
pfield_vecarray = self.initial_pfield.as_vector()
ofield_vecarray = self.initial_ofield.as_vector()
......
......@@ -165,14 +165,15 @@ class CoordinatetransformedmnModel(Model):
self.rk_q = 2
self.solution_space = operator.source
def _solve(self, mu=None, return_output=False, verbose=False, include_intermediate_alphas=False):
def _compute_solution(self, mu=None, **kwargs):
verbose = kwargs['verbose'] if 'verbose' in kwargs else False
include_intermediate_alphas = kwargs['include_intermediate_alphas'] if 'include_intermediate_alphas' in kwargs else False
"""
Solve with adaptive Runge-Kutta-Scheme (Bogacki-Shampine).
Copied and adapted from C++ (dune/gdt/tools/timestepper/adaptive-rungekutta-kinetic.hh)
"""
print(mu)
assert not return_output
Alphas = self.initial_data.as_vector()
NonlinearSnaps = self.solution_space.empty()
# alpha = self.initial_data.as_vector(mu)
......
Subproject commit b7bd9cc3b40af5be8b841e15d4659de282df63cc
Subproject commit b8f15577d1631200690b1b0f0d17b1fac67ba399
virtualenv -p /home/tobias/Downloads/intelpython3/bin/python3 venv
virtualenv -p python3.8 venv
source venv/bin/activate
python -m pip install numpy scipy cython mpi4py
cd pymor
......
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