5from abc
import abstractmethod
11 Interface for all solvers' code snippets
13 Every solver has to inject some code snippets into the generated code: Which
14 fields have to be available in the abstract base class, how do you compute
15 the time step size within the kernels, and so forth. These routines are
16 collected here. They are often the same for different numerical schemes, so
17 it makes sense to bundle them up in snippet classes.
23 raise Exception(
"abstract method, not implemented")
28 raise Exception(
"abstract method, not implemented")
33 raise Exception(
"abstract method, not implemented")
40 Within the actual compute kernels, the kernels ask the solver variant how to
44 const double timeStepSize = ...;
46 You can remove the const if you want. Anyway, this routine has to build up the
47 right time step size choice.
50 raise Exception(
"abstract method, not implemented")
57 Very similar to create_compute_time_step_size(), this routine should return
58 a code snippet which creates a field newTimeStepSize. It is used for subsequent
59 time steps and/or some global analysis.
62 raise Exception(
"abstract method, not implemented")
67 raise Exception(
"abstract method, not implemented")
72 raise Exception(
"abstract method, not implemented")
Interface for all solvers' code snippets.
create_start_time_step_implementation(self)
create_abstract_solver_user_declarations(self)
create_compute_time_step_size()
Within the actual compute kernels, the kernels ask the solver variant how to determine a new field.
create_abstract_solver_user_definitions(self)
create_abstract_solver_constructor_statements(self)
create_compute_new_time_step_size()
Very similar to create_compute_time_step_size(), this routine should return a code snippet which crea...
create_finish_time_step_implementation(self)