Skip to content
Discussion options

You must be logged in to vote

Hi @Ub3rJosh, the SecondOrderModel only supports linear Operators. For nonlinear time-dependent problems, you would need to use the InstationaryModel or define a new Model class.

For instance, to build $\ddot{x} = x^2$, which is $\dot{x}_1 = x_2$, $\dot{x}_2 = x_1^2$ in first-order form, this can be done with

import numpy as np

from pymor.algorithms.timestepping import ExplicitEulerTimeStepper
from pymor.models.basic import InstationaryModel
from pymor.operators.constructions import ZeroOperator
from pymor.operators.numpy import NumpyGenericOperator
from pymor.vectorarrays.numpy import NumpyVectorSpace

mapping = lambda x: np.hstack((x[..., 1], x[..., 0]**2))

T = 1
operator = NumpyGener…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Ub3rJosh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants