Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Theresa Pollinger
MoSIS
Commits
6ae131b6
Commit
6ae131b6
authored
Feb 22, 2018
by
Theresa Pollinger
Browse files
an interview notebook!
parent
5626bfe8
Changes
1
Hide whitespace changes
Inline
Side-by-side
interview_kernel/interview_kernel/example_interview.ipynb
0 → 100644
View file @
6ae131b6
%% Cell type:code id: tags:
```
text
anything
```
%%%% Output: stream
Hello, user! I am TheInterview, your partial differential equations and simulations expert. Let's set up a simulation together.
How many dimensions does your model have?
I am just assuming it's 1, since that is all we can currently handle.
What is the domain you would like to simulate for? Ω : type ❘ = [?;?], e.g. Ω = [0.0;1.0]
By the way, you can always try and use LaTeX-type input.
%% Cell type:code id: tags:
```
text
Ω = [0.0;1.0]
```
%%%% Output: stream
we will just assume that the variable is called x for now.
Which variable(s) are you looking for? / What are the unknowns in your model? u : Ω → ??, e.g., u : Ω → ℝ ?
%% Cell type:code id: tags:
```
text
u : Ω → ℝ
```
%%%% Output: stream
Ok, u : Ω → ℝ
u : Ω → ℝ
Would you like to name additional parameters like constants or functions (that are independent of your unknowns)? c : ℝ = ? or f : Ω → ℝ = ?
%% Cell type:code id: tags:
```
text
f = x
```
%%%% Output: stream
Ok, f = [ x : Ω] x
Would you like to declare more parameters? [y/n]?
%% Cell type:code id: tags:
```
text
y
```
%%%% Output: stream
%% Cell type:code id: tags:
```
text
\alpha = -5.0
```
%%%% Output: stream
Ok, α = [ x : Ω] -5.0
Would you like to declare more parameters? [y/n]?
%% Cell type:code id: tags:
```
text
y
```
%%%% Output: stream
%% Cell type:code id: tags:
```
text
k = x \cdot x
```
%%%% Output: stream
I did not catch that. Could you please rephrase?
Details: MMT server error: unbound token: ·
%% Cell type:code id: tags:
```
text
n
```
%%%% Output: stream
f = x
α = -5.0
Let's talk about your partial differential equation(s). What do they look like? Δu = 0.0, or laplace_operator Ω ℝ u = f ?
%% Cell type:code id: tags:
```
text
Δu = \alpha
```
%%%% Output: stream
Ok, <result>
<xml>
<theory meta="http://mathhub.info/MitM/Foundation?Logic" base="http://mathhub.info/MitM/smglom/calculus" name="ephpde1">
<import from="http://mathhub.info/MitM/smglom/calculus?mDifferentialOperators"><metadata><link resource="http://mathhub.info/MitM/smglom/calculus#0.0.0:32.0.32" rel="http://cds.omdoc.org/mmt?metadata?sourceRef"/></metadata></import><import from="http://mathhub.info/MitM/smglom/calculus?u"><metadata><link resource="http://mathhub.info/MitM/smglom/calculus#0.0.0:11.0.11" rel="http://cds.omdoc.org/mmt?metadata?sourceRef"/></metadata></import><import from="http://mathhub.info/MitM/smglom/calculus?f"><metadata><link resource="http://mathhub.info/MitM/smglom/calculus#0.0.0:11.0.11" rel="http://cds.omdoc.org/mmt?metadata?sourceRef"/></metadata></import><import from="http://mathhub.info/MitM/smglom/calculus?α"><metadata><link resource="http://mathhub.info/MitM/smglom/calculus#0.0.0:11.0.11" rel="http://cds.omdoc.org/mmt?metadata?sourceRef"/></metadata></import><constant name="mylhs">
<metadata><link resource="http://mathhub.info/MitM/smglom/calculus#1.0.1:35.0.35" rel="http://cds.omdoc.org/mmt?metadata?sourceRef"/></metadata>
<type><om:OMOBJ xmlns:om="http://www.openmath.org/OpenMath"><om:OMBIND>
<om:OMS name="Pi" module="LambdaPi" base="http://cds.omdoc.org/urtheories"/>
<om:OMBVAR><om:OMV name="anyu"><type><om:OMA><metadata><link resource="http://mathhub.info/MitM/smglom/calculus#19.0.19:23.0.23" rel="http://cds.omdoc.org/mmt?metadata?sourceRef"/></metadata>
<om:OMS name="arrow" module="LambdaPi" base="http://cds.omdoc.org/urtheories"/>
<om:OMS name="Ω" module="ephdomain" base="http://mathhub.info/MitM/smglom/calculus"/><om:OMS name="real_lit" module="RealLiterals" base="http://mathhub.info/MitM/Foundation"/>
</om:OMA></type></om:OMV></om:OMBVAR>
<om:OMA>
<om:OMS name="arrow" module="LambdaPi" base="http://cds.omdoc.org/urtheories"/>
<om:OMS name="Ω" module="ephdomain" base="http://mathhub.info/MitM/smglom/calculus"/><om:OMS name="real_lit" module="RealLiterals" base="http://mathhub.info/MitM/Foundation"/>
</om:OMA>
</om:OMBIND></om:OMOBJ></type>
<definition><om:OMOBJ xmlns:om="http://www.openmath.org/OpenMath"><om:OMBIND><metadata><link resource="http://mathhub.info/MitM/smglom/calculus#10.0.10:32.0.32" rel="http://cds.omdoc.org/mmt?metadata?sourceRef"/></metadata>
<om:OMS name="lambda" module="LambdaPi" base="http://cds.omdoc.org/urtheories"/>
<om:OMBVAR><om:OMV name="anyu"><metadata><link resource="http://mathhub.info/MitM/smglom/calculus#12.0.12:15.0.15" rel="http://cds.omdoc.org/mmt?metadata?sourceRef"/></metadata><type><om:OMA><metadata><link resource="http://mathhub.info/MitM/smglom/calculus#19.0.19:23.0.23" rel="http://cds.omdoc.org/mmt?metadata?sourceRef"/></metadata>
<om:OMS name="arrow" module="LambdaPi" base="http://cds.omdoc.org/urtheories"/>
<om:OMS name="Ω" module="ephdomain" base="http://mathhub.info/MitM/smglom/calculus"/><om:OMS name="real_lit" module="RealLiterals" base="http://mathhub.info/MitM/Foundation"/>
</om:OMA></type></om:OMV></om:OMBVAR>
<om:OMA><metadata><link resource="http://mathhub.info/MitM/smglom/calculus#27.0.27:32.0.32" rel="http://cds.omdoc.org/mmt?metadata?sourceRef"/></metadata>
<om:OMS name="apply" module="LambdaPi" base="http://cds.omdoc.org/urtheories"/>
<om:OMS name="laplace_operator" module="mDifferentialOperators" base="http://mathhub.info/MitM/smglom/calculus"/><om:OMS name="Ω" module="ephdomain" base="http://mathhub.info/MitM/smglom/calculus"/><om:OMS name="real_lit" module="RealLiterals" base="http://mathhub.info/MitM/Foundation"/><om:OMV name="anyu"><metadata><link resource="http://mathhub.info/MitM/smglom/calculus#29.0.29:32.0.32" rel="http://cds.omdoc.org/mmt?metadata?sourceRef"/></metadata></om:OMV>
</om:OMA>
</om:OMBIND></om:OMOBJ></definition>
</constant><constant name="myrhs">
<metadata><link resource="http://mathhub.info/MitM/smglom/calculus#1.0.1:12.0.12" rel="http://cds.omdoc.org/mmt?metadata?sourceRef"/></metadata>
<type><om:OMOBJ xmlns:om="http://www.openmath.org/OpenMath"><om:OMBIND>
<om:OMS name="Pi" module="LambdaPi" base="http://cds.omdoc.org/urtheories"/>
<om:OMBVAR><om:OMV name="x"><type><om:OMS name="Ω" module="ephdomain" base="http://mathhub.info/MitM/smglom/calculus"/></type></om:OMV></om:OMBVAR>
<om:OMS name="real_lit" module="RealLiterals" base="http://mathhub.info/MitM/Foundation"/>
</om:OMBIND></om:OMOBJ></type>
<definition><om:OMOBJ xmlns:om="http://www.openmath.org/OpenMath"><om:OMS name="α" module="α" base="http://mathhub.info/MitM/smglom/calculus"><metadata><link resource="http://mathhub.info/MitM/smglom/calculus#10.0.10:10.0.10" rel="http://cds.omdoc.org/mmt?metadata?sourceRef"/></metadata></om:OMS></om:OMOBJ></definition>
</constant>
</theory>
</xml>
</result>
These are all the PDEs needed.
Let's discuss your boundary conditions. What do they look like? u(x) = f(x) or u(1.0) = \alpha ?
%% Cell type:code id: tags:
```
text
u = f
```
%%%% Output: stream
Ok
These are all the boundary conditions needed.
Would you like to try and solve the PDE using the Finite Difference Method in ExaStencils? [y/n]?
%% Cell type:code id: tags:
```
text
y
```
%%%% Output: stream
Generated ExaStencils input.
%% Cell type:code id: tags:
```
text
```
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment