From 486497eb8e483b582c16e433327160eacf96c5bc Mon Sep 17 00:00:00 2001 From: Simon Rochester Date: Thu, 27 Sep 2012 23:37:48 -0700 Subject: Added list of DM variables to output, and comments at the beginning and end of each text file. --- mathemathica_fwm/RbXMDSSetup.nb | 237 +++++++++++++++++++++++++++------------- 1 file changed, 160 insertions(+), 77 deletions(-) diff --git a/mathemathica_fwm/RbXMDSSetup.nb b/mathemathica_fwm/RbXMDSSetup.nb index 74e4394..7b10959 100755 --- a/mathemathica_fwm/RbXMDSSetup.nb +++ b/mathemathica_fwm/RbXMDSSetup.nb @@ -727,7 +727,6 @@ Cell[BoxData[ "\"\<\!\(\*SuperscriptBox[\(\[VeryThinSpace]\), \ \(2\)]\)\!\(\*SubscriptBox[\(S\), \(1/2\)]\)\>\"", ",", RowBox[{"SingleLetterItalics", "\[Rule]", "False"}]}], "]"}], ",", - RowBox[{"{", RowBox[{ RowBox[{"-", "2.9"}], ",", "0"}], "}"}]}], "]"}], ",", @@ -738,7 +737,6 @@ Cell[BoxData[ "\"\<\!\(\*SuperscriptBox[\(\[VeryThinSpace]\), \ \(2\)]\)\!\(\*SubscriptBox[\(P\), \(1/2\)]\)\>\"", ",", RowBox[{"SingleLetterItalics", "\[Rule]", "False"}]}], "]"}], ",", - RowBox[{"{", RowBox[{ RowBox[{"-", "2.9"}], ",", "1.6"}], "}"}]}], "]"}], ",", @@ -749,7 +747,6 @@ Cell[BoxData[ "\"\<\!\(\*SuperscriptBox[\(\[VeryThinSpace]\), \ \(2\)]\)\!\(\*SubscriptBox[\(P\), \(3/2\)]\)\>\"", ",", RowBox[{"SingleLetterItalics", "\[Rule]", "False"}]}], "]"}], ",", - RowBox[{"{", RowBox[{ RowBox[{"-", "2.9"}], ",", "2.7"}], "}"}]}], "]"}]}], "}"}]}], ",", @@ -1377,7 +1374,6 @@ Cell[BoxData[{ RowBox[{"{", RowBox[{ RowBox[{"-", "2.9"}], ",", "2.7"}], "}"}]}], "]"}]}], "}"}]}], ",", - RowBox[{"ImageSize", "\[Rule]", RowBox[{"3.5", " ", "72"}]}], ",", RowBox[{"ImagePadding", "\[Rule]", @@ -1418,8 +1414,8 @@ Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"Position", "[", - RowBox[{"vars", ",", "#"}], "]"}], "&"}], "/@", "%"}], ",", "1"}], - "]"}]}], "\[IndentingNewLine]", + RowBox[{"vars", ",", "#"}], "]"}], "&"}], "/@", "delvars1"}], ",", + "1"}], "]"}]}], "\[IndentingNewLine]", RowBox[{"vars1", "=", RowBox[{"Delete", "[", RowBox[{"vars", ",", "delpos1"}], "]"}]}]}], "Input"], @@ -1509,13 +1505,17 @@ Cell[BoxData[{ "}"}]}], "\[IndentingNewLine]", RowBox[{"StringReplace", "[", RowBox[{ - RowBox[{"StringJoin", "[", - RowBox[{ + RowBox[{ + "\"\\"", "<>", + RowBox[{"StringJoin", "[", RowBox[{ - RowBox[{"\"\\"", "<>", - RowBox[{"ToString", "@", - RowBox[{"CForm", "[", "#", "]"}]}], "<>", "\"\<;\\n\>\""}], "&"}], "/@", - "%"}], "]"}], ",", + RowBox[{ + RowBox[{"\"\\"", "<>", + RowBox[{"ToString", "@", + RowBox[{"CForm", "[", "#", "]"}]}], "<>", "\"\<;\\n\>\""}], "&"}], "/@", + "%"}], "]"}], "<>", + "\"\\""}], + ",", RowBox[{"{", RowBox[{ RowBox[{"\"\<==\>\"", "\[Rule]", "\"\<=\>\""}], ",", @@ -1690,15 +1690,19 @@ Cell[BoxData[{ RowBox[{"1", "/", SqrtBox["2"]}], "\[Rule]", RowBox[{"1", "/", "rt2"}]}]}], "}"}]}], "\[IndentingNewLine]", - RowBox[{"StringReplace", "[", + RowBox[{"StringReplace", "[", "\[IndentingNewLine]", RowBox[{ - RowBox[{"StringJoin", "[", - RowBox[{ + RowBox[{ + "\"\\"", "<>", + RowBox[{"StringJoin", "[", RowBox[{ RowBox[{ - RowBox[{"ToString", "@", - RowBox[{"CForm", "[", "#", "]"}]}], "<>", "\"\<;\\n\>\""}], "&"}], "/@", - "%"}], "]"}], ",", + RowBox[{ + RowBox[{"ToString", "@", + RowBox[{"CForm", "[", "#", "]"}]}], "<>", "\"\<;\\n\>\""}], "&"}], "/@", + "%"}], "]"}], "<>", "\[IndentingNewLine]", + "\"\\""}], + ",", RowBox[{"{", RowBox[{ RowBox[{"\"\<==\>\"", "\[Rule]", "\"\<=\>\""}], ",", @@ -1738,8 +1742,7 @@ Cell[BoxData[{ RowBox[{"\"\\"", "<>", "a"}]}], ",", RowBox[{ RowBox[{"\"\\"", "~~", "a_", "~~", "\"\<)\>\""}], "\[RuleDelayed]", - RowBox[{"\"\\"", "<>", "a"}]}]}], "}"}]}], "]"}]}], "Input", - CellChangeTimes->{{3.557696286875835*^9, 3.557696298394461*^9}}], + RowBox[{"\"\\"", "<>", "a"}]}]}], "}"}]}], "]"}]}], "Input"], Cell[BoxData[ RowBox[{"Export", "[", @@ -1749,6 +1752,80 @@ Cell[BoxData[ RowBox[{"NotebookDirectory", "[", "]"}], ",", "\"\\""}], "]"}], ",", "%"}], "]"}]], "Input"], +Cell["List of variables", "Text"], + +Cell[BoxData[ + RowBox[{"StringReplace", "[", "\[IndentingNewLine]", + RowBox[{ + RowBox[{ + "\"\\"", "<>", + RowBox[{"StringJoin", "[", + RowBox[{ + RowBox[{ + RowBox[{ + RowBox[{"ToString", "@", + RowBox[{"CForm", "[", "#", "]"}]}], "<>", "\"\< \>\""}], "&"}], "/@", + RowBox[{"(", + RowBox[{ + RowBox[{"vars1", "/.", "labelrep"}], "/.", + RowBox[{ + RowBox[{ + SubscriptBox["\[Rho]", + RowBox[{"s1_", ",", "s2_"}]], "[", "t_", "]"}], "\[RuleDelayed]", + RowBox[{"r", "[", + RowBox[{"s1", ",", "s2"}], "]"}]}]}], ")"}]}], "]"}], "<>", + "\[IndentingNewLine]", + "\"\<\n//---------------- RbChosenRho.txt ends ------------------\n\ +\>\""}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"\"\<==\>\"", "\[Rule]", "\"\<=\>\""}], ",", + RowBox[{ + RowBox[{"Shortest", "[", + RowBox[{ + "\"\\"", "~~", "a__", "~~", "\"\<\\\",\\\"\>\"", "~~", "b__", + "~~", "\"\<\\\")\>\""}], "]"}], ":>", + RowBox[{"\"\\"", "<>", "a", "<>", "b", "<>", "\"\<_dt\>\""}]}], + ",", + RowBox[{ + RowBox[{"Shortest", "[", + RowBox[{ + "\"\\"", "~~", "a__", "~~", "\"\<\\\",\\\"\>\"", "~~", "b__", + "~~", "\"\<\\\")\>\""}], "]"}], ":>", + RowBox[{"\"\\"", "<>", "a", "<>", "b"}]}], ",", + RowBox[{ + RowBox[{"\"\\"", "~~", "a_", "~~", "\"\<)\>\""}], + "\[RuleDelayed]", + RowBox[{"\"\\"", "<>", "a"}]}], ",", + RowBox[{ + RowBox[{"\"\\"", "~~", "a_", "~~", "\"\<)\>\""}], + "\[RuleDelayed]", + RowBox[{"\"\\"", "<>", "a"}]}], ",", + RowBox[{ + RowBox[{"\"\\"", "~~", "a_", "~~", "\"\<)\>\""}], "\[RuleDelayed]", + RowBox[{"\"\\"", "<>", "a"}]}], ",", + RowBox[{ + RowBox[{"\"\\"", "~~", "a_", "~~", "\"\<)\>\""}], "\[RuleDelayed]", + RowBox[{"\"\\"", "<>", "a"}]}], ",", + RowBox[{ + RowBox[{"\"\\"", "~~", "a_", "~~", "\"\<)\>\""}], + "\[RuleDelayed]", + RowBox[{"\"\\"", "<>", "a"}]}], ",", + RowBox[{ + RowBox[{"\"\\"", "~~", "a_", "~~", "\"\<)\>\""}], "\[RuleDelayed]", + RowBox[{"\"\\"", "<>", "a"}]}], ",", + RowBox[{ + RowBox[{"\"\\"", "~~", "a_", "~~", "\"\<)\>\""}], "\[RuleDelayed]", + RowBox[{"\"\\"", "<>", "a"}]}]}], "}"}]}], "]"}]], "Input"], + +Cell[BoxData[ + RowBox[{"Export", "[", + RowBox[{ + RowBox[{"ToFileName", "[", + RowBox[{ + RowBox[{"NotebookDirectory", "[", "]"}], ",", + "\"\\""}], "]"}], ",", "%"}], "]"}]], "Input"], + Cell["Convert initial conditions to c form.", "Text"], Cell[BoxData[{ @@ -1838,15 +1915,19 @@ Cell[BoxData[{ RowBox[{"1", "/", SqrtBox["2"]}], "\[Rule]", RowBox[{"1", "/", "rt2"}]}]}], "}"}]}], "\[IndentingNewLine]", - RowBox[{"StringReplace", "[", + RowBox[{"StringReplace", "[", "\[IndentingNewLine]", RowBox[{ - RowBox[{"StringJoin", "[", - RowBox[{ + RowBox[{ + "\"\\"", "<>", + RowBox[{"StringJoin", "[", RowBox[{ RowBox[{ - RowBox[{"ToString", "@", - RowBox[{"CForm", "[", "#", "]"}]}], "<>", "\"\<;\\n\>\""}], "&"}], "/@", - "%"}], "]"}], ",", + RowBox[{ + RowBox[{"ToString", "@", + RowBox[{"CForm", "[", "#", "]"}]}], "<>", "\"\<;\\n\>\""}], "&"}], "/@", + "%"}], "]"}], "<>", "\[IndentingNewLine]", + "\"\\""}], + ",", RowBox[{"{", RowBox[{ RowBox[{"\"\<==\>\"", "\[Rule]", "\"\<=\>\""}], ",", @@ -1886,8 +1967,7 @@ Cell[BoxData[{ RowBox[{"\"\\"", "<>", "a"}]}], ",", RowBox[{ RowBox[{"\"\\"", "~~", "a_", "~~", "\"\<)\>\""}], "\[RuleDelayed]", - RowBox[{"\"\\"", "<>", "a"}]}]}], "}"}]}], "]"}]}], "Input", - CellChangeTimes->{{3.557577072451949*^9, 3.557577074196031*^9}}], + RowBox[{"\"\\"", "<>", "a"}]}]}], "}"}]}], "]"}]}], "Input"], Cell[BoxData[ RowBox[{"Export", "[", @@ -2100,7 +2180,6 @@ Cell[BoxData[ RowBox[{ RowBox[{ "subsys", "\[LeftDoubleBracket]", "k", "\[RightDoubleBracket]"}], ",", - RowBox[{ RowBox[{"4", "\[Pi]", " ", "\[ImaginaryI]", " ", RowBox[{"Energy", "[", @@ -2110,7 +2189,6 @@ Cell[BoxData[ "]"}], "]"}], " ", "n0", " ", RowBox[{ "rmes", "\[LeftDoubleBracket]", "k", "\[RightDoubleBracket]"}], " ", - RowBox[{ "polarizationcomponents1", "\[LeftDoubleBracket]", "k", "\[RightDoubleBracket]"}]}], "/.", "delreps1"}]}], "]"}], "]"}], @@ -2257,7 +2335,6 @@ Cell[BoxData[{ RowBox[{"Power", "[", RowBox[{ RowBox[{"_", "?", "NumericQ"}], ",", "_"}], "]"}]}], "\[RuleDelayed]", - RowBox[{"N", "[", "a", "]"}]}]}], "//", "Simplify"}], "\[IndentingNewLine]", RowBox[{"StringJoin", "[", @@ -2271,51 +2348,57 @@ Cell[BoxData[{ RowBox[{"ToString", "@", "j"}], "<>", "\"\<];\\n\>\""}], ",", RowBox[{"{", RowBox[{"j", ",", "4"}], "}"}]}], "]"}], "]"}], "\[IndentingNewLine]", - RowBox[{"StringReplace", "[", - RowBox[{"%", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"\"\<==\>\"", "\[Rule]", "\"\<=\>\""}], ",", - RowBox[{ - RowBox[{"\"\\"", "~~", "a_", "~~", "\"\<)\>\""}], - "\[RuleDelayed]", - RowBox[{"\"\\"", "<>", "a"}]}], ",", - RowBox[{ - RowBox[{"Shortest", "[", - RowBox[{ - "\"\\"", "~~", "a__", "~~", "\"\<\\\",\\\"\>\"", "~~", "b__", - "~~", "\"\<\\\")\>\""}], "]"}], ":>", - RowBox[{"\"\\"", "<>", "a", "<>", "b", "<>", "\"\<_dt\>\""}]}], - ",", - RowBox[{ - RowBox[{"Shortest", "[", - RowBox[{ - "\"\\"", "~~", "a__", "~~", "\"\<\\\",\\\"\>\"", "~~", "b__", - "~~", "\"\<\\\")\>\""}], "]"}], ":>", - RowBox[{"\"\\"", "<>", "a", "<>", "b"}]}], ",", - RowBox[{ - RowBox[{"\"\\"", "~~", "a_", "~~", "\"\<)\>\""}], - "\[RuleDelayed]", - RowBox[{"\"\\"", "<>", "a"}]}], ",", - RowBox[{ - RowBox[{"\"\\"", "~~", "a_", "~~", "\"\<)\>\""}], - "\[RuleDelayed]", - RowBox[{"\"\\"", "<>", "a"}]}], ",", - RowBox[{ - RowBox[{"\"\\"", "~~", "a_", "~~", "\"\<)\>\""}], "\[RuleDelayed]", - RowBox[{"\"\\"", "<>", "a"}]}], ",", - RowBox[{ - RowBox[{"\"\\"", "~~", "a_", "~~", "\"\<)\>\""}], - "\[RuleDelayed]", - RowBox[{"\"\\"", "<>", "a", "<>", "\"\<_dz\>\""}]}], ",", - RowBox[{ - RowBox[{"\"\\"", "~~", "a_", "~~", "\"\<)\>\""}], - "\[RuleDelayed]", - RowBox[{"\"\\"", "<>", "a"}]}], ",", + RowBox[{"\"\\"", "<>", + RowBox[{"StringReplace", "[", + RowBox[{"%", ",", + RowBox[{"{", RowBox[{ - RowBox[{"\"\\"", "~~", "a_", "~~", "\"\<)\>\""}], "\[RuleDelayed]", - RowBox[{"\"\\"", "<>", "a"}]}]}], "}"}]}], - "]"}], "\[IndentingNewLine]", + RowBox[{"\"\<==\>\"", "\[Rule]", "\"\<=\>\""}], ",", + RowBox[{ + RowBox[{"\"\\"", "~~", "a_", "~~", "\"\<)\>\""}], + "\[RuleDelayed]", + RowBox[{"\"\\"", "<>", "a"}]}], ",", + RowBox[{ + RowBox[{"Shortest", "[", + RowBox[{ + "\"\\"", "~~", "a__", "~~", "\"\<\\\",\\\"\>\"", "~~", + "b__", "~~", "\"\<\\\")\>\""}], "]"}], ":>", + RowBox[{"\"\\"", "<>", "a", "<>", "b", "<>", "\"\<_dt\>\""}]}], + ",", + RowBox[{ + RowBox[{"Shortest", "[", + RowBox[{ + "\"\\"", "~~", "a__", "~~", "\"\<\\\",\\\"\>\"", "~~", "b__", + "~~", "\"\<\\\")\>\""}], "]"}], ":>", + RowBox[{"\"\\"", "<>", "a", "<>", "b"}]}], ",", + RowBox[{ + RowBox[{"\"\\"", "~~", "a_", "~~", "\"\<)\>\""}], + "\[RuleDelayed]", + RowBox[{"\"\\"", "<>", "a"}]}], ",", + RowBox[{ + RowBox[{"\"\\"", "~~", "a_", "~~", "\"\<)\>\""}], + "\[RuleDelayed]", + RowBox[{"\"\\"", "<>", "a"}]}], ",", + RowBox[{ + RowBox[{"\"\\"", "~~", "a_", "~~", "\"\<)\>\""}], + "\[RuleDelayed]", + RowBox[{"\"\\"", "<>", "a"}]}], ",", + RowBox[{ + RowBox[{"\"\\"", "~~", "a_", "~~", "\"\<)\>\""}], + "\[RuleDelayed]", + RowBox[{"\"\\"", "<>", "a", "<>", "\"\<_dz\>\""}]}], ",", + RowBox[{ + RowBox[{"\"\\"", "~~", "a_", "~~", "\"\<)\>\""}], + "\[RuleDelayed]", + RowBox[{"\"\\"", "<>", "a"}]}], ",", + RowBox[{ + RowBox[{"\"\\"", "~~", "a_", "~~", "\"\<)\>\""}], + "\[RuleDelayed]", + RowBox[{"\"\\"", "<>", "a"}]}]}], "}"}]}], "]"}], "<>", + "\[IndentingNewLine]", + "\"\\""}], "\[IndentingNewLine]", RowBox[{"Export", "[", RowBox[{ RowBox[{"ToFileName", "[", @@ -2325,10 +2408,10 @@ Cell[BoxData[{ }, Open ]] }, WindowSize->{956, 1004}, -WindowMargins->{{0, Automatic}, {26, Automatic}}, +WindowMargins->{{0, Automatic}, {Automatic, 0}}, PrivateNotebookOptions->{"FileOutlineCache"->False}, ShowSelection->True, -FrontEndVersion->"8.0 for Linux x86 (32-bit) (February 23, 2011)", +FrontEndVersion->"8.0 for Microsoft Windows (64-bit) (October 6, 2011)", StyleDefinitions->"Default.nb" ] -- cgit v1.2.3