Attention: Maintenance on monday 19.04.2021 from 07:00 - 13:00 (Gitlab and Mattermost are offline!)

Commit 3dda0e52 authored by Theresa Pollinger's avatar Theresa Pollinger

output updated

parent 8e8e28e3
......@@ -82,11 +82,10 @@ class ExaOutput:
pde_rhs = self.replace_x(self.replace_cdot(simdata["pdes"]["pdes"][-1]["rhsstring_expanded"]))
unknowns = [*simdata["unknowns"]]
first_unknown = unknowns[0]
with open(l1path, 'w') as l1:
l1.write(
self.l1_string = str(
"/// inline knowledge \n"
"Knowledge { \n"
" dimensionality = " + str(simdata["num_dimensions"]) + " \n"
" dimensionality = " + str(simdata["num_dimensions"]) + " \n"
" \n"
" minLevel = 5 \n"
" maxLevel = 15 \n"
......@@ -94,15 +93,15 @@ class ExaOutput:
" \n"
"/// problem specification \n"
" \n"
"Domain \Omega = ( " + str(simdata["domain"]["from"]) + ", " + str(simdata["domain"]["to"]) + " ) \n"
"Domain \Omega = ( " + str(simdata["domain"]["from"]) + ", " + str(simdata["domain"]["to"]) + " ) \n"
" \n"
"Field f@finest \in \Omega = " + pde_rhs + " \n"
"Field " + first_unknown + " \in \Omega = 0.0 \n"
"Field f@finest \in \Omega = " + pde_rhs + " \n"
"Field " + first_unknown + " \in \Omega = 0.0 \n"
" \n"
"Field " + first_unknown + "@finest \in \partial \Omega = " + bc_rhs + " \n" #"sin ( 0.5 * PI * vf_boundaryCoord_x ) \n" #TODO expand
"Field " + first_unknown + "@(all but finest) \in \partial \Omega = 0.0 \n"
" \n"
"Operator op = " + op + " // alt: - \partial_{xx} \n"
"Operator op = " + op + " // alt: - \partial_{xx} \n"
" \n"
"Equation " + first_unknown + "Eq@finest op * " + first_unknown + " == f \n" #insert pde
"Equation " + first_unknown + "Eq@(all but finest) op * " + first_unknown + " == 0.0 \n"
......@@ -132,8 +131,9 @@ class ExaOutput:
" // parameters \n"
" l4_genDefaultApplication = true \n"
" l4_defAppl_FieldToPrint = \"" + first_unknown + "\" \n" #TODO
"} \n"
)
"} \n")
with open(l1path, 'w') as l1:
l1.write(self.l1_string)
def replace_x(self, string):
return string.replace("x", "vf_nodePosition_x@current")
......
......@@ -26,9 +26,9 @@ from distutils.util import strtobool
class Interview(MetaKernel):
implementation = 'Interview'
implementation_version = '0.1'
implementation_version = '1.0'
language = 'text'
language_version = '0.1'
language_version = '1.0'
language_info = {
'name': 'text',
'mimetype': 'text/plain',
......@@ -40,13 +40,13 @@ class Interview(MetaKernel):
"""**Hello, """ + getpass.getuser() + """! I am MoSIS 1.0, your partial differential equations and simulations tool.**
Let's set up a model and simulation.
To get explanations, enter `explain <optional keyword>`.
To see a recap of what we know so far, enter `recap <optional keyword>`.
To interactively visualize the current theory graph, enter `tgwiev` or `tgview mpd`.
Otherwise, you can always answer with \LaTeX-type input.
"""
#To get explanations, enter `explain <optional keyword>`.
#You can inspect the currently loaded MMT theories under http://localhost:43397 #TODO
def __init__(self, install_run=False, **kwargs):
......
......@@ -958,7 +958,8 @@ class PDE_States:
def recap(self, userstring=None): # TODO
self.print_simdata()
self.print_empty_line()
self.poutput("You can inspect the persistently loaded MMT theories under " + self.mmtinterface.mmt_base_url)
# self.poutput("You can inspect the persistently loaded MMT theories under " + self.mmtinterface.mmt_base_url)
#TODO
def print_simdata(self):
self.poutput("These are the things we know so far about your problem:")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment