Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Operator composition question for constant multiplication #24

Closed
jlperla opened this issue May 12, 2018 · 2 comments
Closed

Operator composition question for constant multiplication #24

jlperla opened this issue May 12, 2018 · 2 comments

Comments

@jlperla
Copy link
Contributor

jlperla commented May 12, 2018

I just want to double-check the domains for multiplicative constants.

Consider the stochastic process $d x_t = \tilde{\sigma}(x_t) d W_t$. For simplicity, assume it is reflected at 0 and 2.

We know that the infinitesimal generator is $\tilde{L} = \tilde{\sigma}(x)^2/2 \partial_{xx}$.

The question I have is to make sure we are precisely is how compose the multiplicative $\tilde{\sigma}(x)^2/2$ term... especially if $\tilde{\sigma}(x)$ is not defined below 0. Lets say that we let $\Delta x = 1$ so that the interior is $x \equiv$ [0, 1, 2] and the extension is $\bar{x} \equiv$ [-1, 0, 1, 2, 3].

In all cases, the discretized boundary operator is

B =
1  -1  0   0  0
0   0  0  -1  1

and we also know that

Q =
1 0 0
1 0 0
0 1 0
0 0 1
0 0 1

First the easy case. is if $\tilde{\sigma}(x) = \sqrt{2}$, then we know that the discretization in central differences of the $\partial_{xx}$ operator is

L_2 =
	1 -2   1 0   0
	0  1  -2  1  0
	0  0   1  -2 1	

and then $L = L_2$ and there is an appropriate $L Q$ for the composed operator which we can apply to $u \in R^3$.

Next, let $\tilde{\sigma}(x) = \sqrt{2}(1+x)$ and $\sigma(x)$ is undefined for $x$ outside of the $[0,2]$ domain. Then just to make sure we are thinking this through correctly... define the vector of this applied to the domain (and not the extended domain, since it is meaningless) as
$$
\sigma =\sqrt{2} \begin{bmatrix} 1\ 2\ 3 \end{bmatrix}
$$
Then put this into a diagonal matrix,
$$
C_1 = diag(\sigma.^2/2) \in R^{3\times 3}
$$

Finally, to compose this, we have
$$
L = C L_2
$$
Do I have that correct? Does this generalize, that if the domain is of size $M$ and the extended domain is of size $\bar{M}$ that all multiplicative constants are diagonal and of size $M \times M$?

Finally, is there any case in the composition of operators where you do would not want this as a diagonal, and what is the interpretation if you don't? This may be helpful to figure out before we make it lazy

@ChrisRackauckas
Copy link
Member

Finally, is there any case in the composition of operators where you do would not want this as a diagonal, and what is the interpretation if you don't?

This can happen in spectral discretizations since the basis isn't local but global.

But this is one of the reasons that a pre-restriction seems to be the easier way to go. This can actually be easily achieved with a view. We will want the result of Q to be a special type anyways so that way we are just allocating two Refs on the ends, in which case it will have the information for the view.

@jlperla
Copy link
Contributor Author

jlperla commented May 19, 2018

Closing this because I think the answer is confirmed.

@jlperla jlperla closed this as completed May 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants