Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Support dynamic time-step sizes #72

Open
davidscn opened this issue Jan 22, 2024 · 0 comments
Open

Support dynamic time-step sizes #72

davidscn opened this issue Jan 22, 2024 · 0 comments

Comments

@davidscn
Copy link
Member

The implemented solvers only support constant time-step sizes. We added asserts to prevent misuse. The time-stepping schemes could theoretically handle dynamic time-step sizes, but within the solvers, we create initially dependent data structures once, such that a dynamic time-step size invalidates these data structures. Examples:

// Coefficients, which are needed for time dependencies
const double alpha_1 =
1. / (parameters.beta * std::pow(parameters.delta_t, 2));
const double alpha_2 = 1. / (parameters.beta * parameters.delta_t);
const double alpha_3 = (1 - (2 * parameters.beta)) / (2 * parameters.beta);
const double alpha_4 =
parameters.gamma / (parameters.beta * parameters.delta_t);
const double alpha_5 = 1 - (parameters.gamma / parameters.beta);
const double alpha_6 =
(1 - (parameters.gamma / (2 * parameters.beta))) * parameters.delta_t;

stepping_matrix *= time.get_delta_t() * time.get_delta_t() *
parameters.theta * parameters.theta;

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant