Skip to content
Snippets Groups Projects
Commit f175628c authored by maaikedieuwertje's avatar maaikedieuwertje
Browse files

remove print from pdf-compile warning.

Former-commit-id: c4658ad5b328257c623ffd79a3d09153ccad3a7b
parent fbf6e5ee
No related branches found
No related tags found
No related merge requests found
Showing
with 1396 additions and 9 deletions
......@@ -27,7 +27,7 @@ mdao_definitions = ['unconverged-MDA-J', # 0
# Settings for scripting
mdao_definitions_loop_all = False # Option for looping through all MDAO definitions
mdao_definition_id = 13 # Option for selecting a MDAO definition (in case mdao_definitions_loop_all=False)
mdao_definition_id = 12 # Option for selecting a MDAO definition (in case mdao_definitions_loop_all=False)
# Settings for saving
pdf_dir = 'sellar_problem/(X)DSM'
......
No preview for this file type
File added
No preview for this file type
File added
......@@ -3,14 +3,14 @@
<header>
<creator>Imco van Gent</creator>
<description>FPG CMDOWS file of the well-known Sellar problem</description>
<timestamp>2018-03-31T20:52:59.063000</timestamp>
<timestamp>2018-04-06T08:39:03.008000</timestamp>
<fileVersion>0.1</fileVersion>
<cmdowsVersion>0.8</cmdowsVersion>
<updates>
<update>
<modification>KADMOS export of a fundamental problem graph (FPG).</modification>
<creator>Imco van Gent</creator>
<timestamp>2018-03-31T20:52:59.063000</timestamp>
<timestamp>2018-04-06T08:39:03.008000</timestamp>
<fileVersion>0.1</fileVersion>
<cmdowsVersion>0.8</cmdowsVersion>
</update>
......
<?xml version='1.0' encoding='UTF-8'?>
<cmdows xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://bitbucket.org/imcovangent/cmdows/raw/master/schema/0.8/cmdows.xsd">
<header>
<creator>Imco van Gent</creator>
<description>FPG CMDOWS file of the well-known Sellar problem</description>
<timestamp>2018-04-06T08:46:49.677000</timestamp>
<fileVersion>0.1</fileVersion>
<cmdowsVersion>0.8</cmdowsVersion>
<updates>
<update>
<modification>KADMOS export of a fundamental problem graph (FPG).</modification>
<creator>Imco van Gent</creator>
<timestamp>2018-04-06T08:46:49.677000</timestamp>
<fileVersion>0.1</fileVersion>
<cmdowsVersion>0.8</cmdowsVersion>
</update>
</updates>
<organization>
<contacts/>
</organization>
</header>
<executableBlocks>
<designCompetences>
<designCompetence uID="D2">
<ID>D2</ID>
<modeID>main</modeID>
<instanceID>1</instanceID>
<version>1.0</version>
<label>D2</label>
<inputs>
<input>
<parameterUID>/data_schema/analyses/y1</parameterUID>
</input>
<input>
<parameterUID>/data_schema/geometry/z1</parameterUID>
</input>
<input>
<parameterUID>/data_schema/settings/c</parameterUID>
</input>
<input>
<parameterUID>/data_schema/geometry/z2</parameterUID>
</input>
</inputs>
<outputs>
<output>
<parameterUID>/data_schema/analyses/y2</parameterUID>
</output>
</outputs>
</designCompetence>
<designCompetence uID="D1">
<ID>D1</ID>
<modeID>main</modeID>
<instanceID>1</instanceID>
<version>1.0</version>
<label>D1</label>
<inputs>
<input>
<parameterUID>/data_schema/geometry/x1</parameterUID>
</input>
<input>
<parameterUID>/data_schema/geometry/z2</parameterUID>
</input>
<input>
<parameterUID>/data_schema/analyses/y2</parameterUID>
</input>
<input>
<parameterUID>/data_schema/settings/c</parameterUID>
</input>
<input>
<parameterUID>/data_schema/geometry/z1</parameterUID>
<validRanges>
<limitRange>
<minimum>-5</minimum>
<maximum>5.0</maximum>
</limitRange>
<listRange>
<listRangeItem>7.5</listRangeItem>
<listRangeItem>8</listRangeItem>
</listRange>
</validRanges>
</input>
</inputs>
<outputs>
<output>
<parameterUID>/data_schema/analyses/y1</parameterUID>
</output>
</outputs>
</designCompetence>
</designCompetences>
<mathematicalFunctions>
<mathematicalFunction uID="A">
<label>A</label>
<functionType>regular</functionType>
<inputs>
<input>
<parameterUID>/data_schema/settings/a</parameterUID>
<equationLabel>a</equationLabel>
</input>
</inputs>
<outputs>
<output>
<parameterUID>/data_schema/settings/c</parameterUID>
<equations uID="A_equation">
<equation language="Python">a</equation>
<equation language="LaTeX">a</equation>
<equation language="MathML">&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;mi&gt;a&lt;/mi&gt;&lt;/math&gt;</equation>
</equations>
</output>
</outputs>
</mathematicalFunction>
<mathematicalFunction uID="F1">
<label>F1</label>
<functionType>regular</functionType>
<inputs>
<input>
<parameterUID>/data_schema/geometry/x1</parameterUID>
<equationLabel>x1</equationLabel>
</input>
<input>
<parameterUID>/data_schema/analyses/y1</parameterUID>
<equationLabel>y1</equationLabel>
</input>
<input>
<parameterUID>/data_schema/analyses/y2</parameterUID>
<equationLabel>y2</equationLabel>
</input>
<input>
<parameterUID>/data_schema/geometry/z2</parameterUID>
<equationLabel>z2</equationLabel>
</input>
</inputs>
<outputs>
<output>
<parameterUID>/data_schema/analyses/f</parameterUID>
<equations uID="F1_equation">
<equation language="Python">x1**2+z2+y1+exp(-y2)</equation>
<equation language="LaTeX">x1^2+z2+y1+e^{-y2}</equation>
<equation language="MathML">&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;mi&gt;x&lt;/mi&gt;&lt;msup&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/msup&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mi&gt;z&lt;/mi&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mi&gt;y&lt;/mi&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;msup&gt;&lt;mi&gt;e&lt;/mi&gt;&lt;mrow&gt;&lt;mo&gt;-&lt;/mo&gt;&lt;mi&gt;y&lt;/mi&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/mrow&gt;&lt;/msup&gt;&lt;/math&gt;</equation>
</equations>
</output>
</outputs>
</mathematicalFunction>
<mathematicalFunction uID="G2">
<label>G2</label>
<functionType>regular</functionType>
<inputs>
<input>
<parameterUID>/data_schema/analyses/y2</parameterUID>
<equationLabel>y2</equationLabel>
</input>
</inputs>
<outputs>
<output>
<parameterUID>/data_schema/analyses/g2</parameterUID>
<equations uID="G2_equation">
<equation language="Python">1-y2/24.0</equation>
<equation language="LaTeX">1-y2/24.0</equation>
<equation language="MathML">&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mo&gt;-&lt;/mo&gt;&lt;mi&gt;y&lt;/mi&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;mo&gt;/&lt;/mo&gt;&lt;mn&gt;24&lt;/mn&gt;&lt;mo&gt;.&lt;/mo&gt;&lt;mn&gt;0&lt;/mn&gt;&lt;/math&gt;</equation>
</equations>
</output>
</outputs>
</mathematicalFunction>
<mathematicalFunction uID="G1">
<label>G1</label>
<functionType>regular</functionType>
<inputs>
<input>
<parameterUID>/data_schema/analyses/y1</parameterUID>
<equationLabel>y1</equationLabel>
</input>
</inputs>
<outputs>
<output>
<parameterUID>/data_schema/analyses/g1</parameterUID>
<equations uID="G1_equation">
<equation language="Python">y1/3.16-1</equation>
<equation language="LaTeX">y1/3.16-1</equation>
<equation language="MathML">&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;mi&gt;y&lt;/mi&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mo&gt;/&lt;/mo&gt;&lt;mn&gt;3&lt;/mn&gt;&lt;mo&gt;.&lt;/mo&gt;&lt;mn&gt;16&lt;/mn&gt;&lt;mo&gt;-&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/math&gt;</equation>
</equations>
</output>
</outputs>
</mathematicalFunction>
</mathematicalFunctions>
</executableBlocks>
<parameters>
<parameter uID="/data_schema/analyses/y2">
<label>y2</label>
</parameter>
<parameter uID="/data_schema/analyses/y1">
<label>y1</label>
</parameter>
<parameter uID="/data_schema/settings/c">
<label>c</label>
</parameter>
<parameter uID="/data_schema/settings/a">
<label>a</label>
</parameter>
<parameter uID="/data_schema/geometry/x1">
<label>x1</label>
</parameter>
<parameter uID="/data_schema/geometry/z2">
<label>z2</label>
</parameter>
<parameter uID="/data_schema/geometry/z1">
<label>z1</label>
</parameter>
<parameter uID="/data_schema/analyses/f">
<label>f</label>
</parameter>
<parameter uID="/data_schema/analyses/g2">
<label>g2</label>
</parameter>
<parameter uID="/data_schema/analyses/g1">
<label>g1</label>
</parameter>
</parameters>
<problemDefinition uID="IDFNone">
<problemFormulation>
<mdaoArchitecture>IDF</mdaoArchitecture>
<executableBlocksOrder>
<executableBlock position="1">A</executableBlock>
<executableBlock position="2">D2</executableBlock>
<executableBlock position="3">D1</executableBlock>
<executableBlock position="4">F1</executableBlock>
<executableBlock position="5">G1</executableBlock>
<executableBlock position="6">G2</executableBlock>
</executableBlocksOrder>
<allowUnconvergedCouplings>false</allowUnconvergedCouplings>
</problemFormulation>
<problemRoles>
<parameters>
<designVariables>
<designVariable uID="__desVar__/data_schema/geometry/x1">
<parameterUID>/data_schema/geometry/x1</parameterUID>
<nominalValue>0.0</nominalValue>
<validRanges>
<limitRange>
<minimum>0.0</minimum>
<maximum>10</maximum>
</limitRange>
</validRanges>
</designVariable>
<designVariable uID="__desVar__/data_schema/geometry/z2">
<parameterUID>/data_schema/geometry/z2</parameterUID>
<nominalValue>0.0</nominalValue>
<validRanges>
<limitRange>
<minimum>0.0</minimum>
<maximum>10</maximum>
</limitRange>
</validRanges>
</designVariable>
<designVariable uID="__desVar__/data_schema/geometry/z1">
<parameterUID>/data_schema/geometry/z1</parameterUID>
<nominalValue>0.0</nominalValue>
<validRanges>
<limitRange>
<minimum>-10</minimum>
<maximum>10</maximum>
</limitRange>
</validRanges>
</designVariable>
</designVariables>
<objectiveVariables>
<objectiveVariable uID="__objVar__/data_schema/analyses/f">
<parameterUID>/data_schema/analyses/f</parameterUID>
</objectiveVariable>
</objectiveVariables>
<constraintVariables>
<constraintVariable uID="__conVar__/data_schema/analyses/g2">
<parameterUID>/data_schema/analyses/g2</parameterUID>
<constraintType>inequality</constraintType>
<constraintOperator>&gt;=</constraintOperator>
<referenceValue>0.0</referenceValue>
</constraintVariable>
<constraintVariable uID="__conVar__/data_schema/analyses/g1">
<parameterUID>/data_schema/analyses/g1</parameterUID>
<constraintType>inequality</constraintType>
<constraintOperator>&gt;=</constraintOperator>
<referenceValue>0.0</referenceValue>
</constraintVariable>
</constraintVariables>
</parameters>
<executableBlocks>
<preCouplingBlocks>
<preCouplingBlock>A</preCouplingBlock>
</preCouplingBlocks>
<coupledBlocks>
<coupledBlock>D2</coupledBlock>
<coupledBlock>D1</coupledBlock>
</coupledBlocks>
<postCouplingBlocks>
<postCouplingBlock>F1</postCouplingBlock>
<postCouplingBlock>G1</postCouplingBlock>
<postCouplingBlock>G2</postCouplingBlock>
</postCouplingBlocks>
</executableBlocks>
</problemRoles>
</problemDefinition>
<workflow>
<dataGraph>
<name>FPG - IDF</name>
<edges>
<edge>
<fromExecutableBlockUID>A</fromExecutableBlockUID>
<toParameterUID>/data_schema/settings/c</toParameterUID>
</edge>
<edge>
<fromExecutableBlockUID>F1</fromExecutableBlockUID>
<toParameterUID>/data_schema/analyses/f</toParameterUID>
</edge>
<edge>
<fromParameterUID>/data_schema/analyses/y2</fromParameterUID>
<toExecutableBlockUID>F1</toExecutableBlockUID>
</edge>
<edge>
<fromParameterUID>/data_schema/analyses/y2</fromParameterUID>
<toExecutableBlockUID>G2</toExecutableBlockUID>
</edge>
<edge>
<fromParameterUID>/data_schema/analyses/y2</fromParameterUID>
<toExecutableBlockUID>D1</toExecutableBlockUID>
</edge>
<edge>
<fromExecutableBlockUID>G2</fromExecutableBlockUID>
<toParameterUID>/data_schema/analyses/g2</toParameterUID>
</edge>
<edge>
<fromExecutableBlockUID>G1</fromExecutableBlockUID>
<toParameterUID>/data_schema/analyses/g1</toParameterUID>
</edge>
<edge>
<fromParameterUID>/data_schema/analyses/y1</fromParameterUID>
<toExecutableBlockUID>F1</toExecutableBlockUID>
</edge>
<edge>
<fromParameterUID>/data_schema/analyses/y1</fromParameterUID>
<toExecutableBlockUID>D2</toExecutableBlockUID>
</edge>
<edge>
<fromParameterUID>/data_schema/analyses/y1</fromParameterUID>
<toExecutableBlockUID>G1</toExecutableBlockUID>
</edge>
<edge>
<fromParameterUID>/data_schema/geometry/x1</fromParameterUID>
<toExecutableBlockUID>F1</toExecutableBlockUID>
</edge>
<edge>
<fromParameterUID>/data_schema/geometry/x1</fromParameterUID>
<toExecutableBlockUID>D1</toExecutableBlockUID>
</edge>
<edge>
<fromParameterUID>/data_schema/geometry/z2</fromParameterUID>
<toExecutableBlockUID>F1</toExecutableBlockUID>
</edge>
<edge>
<fromParameterUID>/data_schema/geometry/z2</fromParameterUID>
<toExecutableBlockUID>D2</toExecutableBlockUID>
</edge>
<edge>
<fromParameterUID>/data_schema/geometry/z2</fromParameterUID>
<toExecutableBlockUID>D1</toExecutableBlockUID>
</edge>
<edge>
<fromParameterUID>/data_schema/geometry/z1</fromParameterUID>
<toExecutableBlockUID>D2</toExecutableBlockUID>
</edge>
<edge>
<fromParameterUID>/data_schema/geometry/z1</fromParameterUID>
<toExecutableBlockUID>D1</toExecutableBlockUID>
</edge>
<edge>
<fromParameterUID>/data_schema/settings/c</fromParameterUID>
<toExecutableBlockUID>D2</toExecutableBlockUID>
</edge>
<edge>
<fromParameterUID>/data_schema/settings/c</fromParameterUID>
<toExecutableBlockUID>D1</toExecutableBlockUID>
</edge>
<edge>
<fromParameterUID>/data_schema/settings/a</fromParameterUID>
<toExecutableBlockUID>A</toExecutableBlockUID>
</edge>
<edge>
<fromExecutableBlockUID>D2</fromExecutableBlockUID>
<toParameterUID>/data_schema/analyses/y2</toParameterUID>
</edge>
<edge>
<fromExecutableBlockUID>D1</fromExecutableBlockUID>
<toParameterUID>/data_schema/analyses/y1</toParameterUID>
</edge>
</edges>
</dataGraph>
</workflow>
</cmdows>
This diff is collapsed.
......@@ -3,14 +3,14 @@
<header>
<creator>Imco van Gent</creator>
<description>RCG CMDOWS file of the well-known Sellar problem</description>
<timestamp>2018-03-31T20:52:59.063000</timestamp>
<timestamp>2018-04-06T08:46:49.677000</timestamp>
<fileVersion>0.1</fileVersion>
<cmdowsVersion>0.8</cmdowsVersion>
<updates>
<update>
<modification>KADMOS export of a repository connectivity graph (RCG).</modification>
<creator>Imco van Gent</creator>
<timestamp>2018-03-31T20:52:59.063000</timestamp>
<timestamp>2018-04-06T08:46:49.677000</timestamp>
<fileVersion>0.1</fileVersion>
<cmdowsVersion>0.8</cmdowsVersion>
</update>
......
File added
File added
File added
This diff is collapsed.
......@@ -14,11 +14,15 @@ import os
import shutil
import subprocess
import unicodedata
import logging
import threading
from kadmos.utilities.general import format_string_for_latex
from distutils.spawn import find_executable
# Settings for the logger
logger = logging.getLogger(__name__)
class XDSM(object):
......@@ -245,8 +249,8 @@ class XDSM(object):
thread.join(timeout)
if thread.is_alive():
print 'WARNING: Compiling PDF in create_dsm() function seems to be stuck. Check the compiling tex-file by' \
' setting keep_tex_file=True.'
logger.warning('Compiling PDF in create_dsm() function seems to be stuck. Check the compiling tex-file by '
'setting keep_tex_file=True.')
thread.join()
def create(self, file_path, keep_tex_file, compile_pdf):
......@@ -285,6 +289,7 @@ class XDSM(object):
pass
# In case latex not installed (properly) report error
else:
print 'WARNING: Path does not contain latex. Please make sure latex is installed and include it in the path to enable create_dsm() function.'
logger.warning('Path does not contain latex. Please make sure latex is installed and include it in the path '
'to enable create_dsm() function.')
# Delete the temporary directory
shutil.rmtree(directory)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment