|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectJava.generateFortran.GenerateFortran
public class GenerateFortran
Generates the Fortan program
Constructor Summary | |
---|---|
GenerateFortran(java.lang.String dir,
Problem p)
Generates the Fortan program in directory for a certain problem |
Method Summary | |
---|---|
static java.lang.String |
adaptEquationToParaest(java.lang.String ein,
ReactionType r)
Adapt an equation to the Fortran parameter estimation routine |
static java.lang.String |
adaptEquationToSim(java.lang.String ein,
ReactionType r)
Adapt an equation to the Fortran simulation routine |
static java.lang.String |
adaptEquationToSimSingle(java.lang.String ein,
ReactionType r,
int ivar)
Adapt an equation to the Fortran routine for simulation of a single variable |
static java.lang.String |
fixExponent(double d)
Java double to Fortran double, replace E by d, or add d0 at end |
void |
generate(Problem p,
java.lang.String fromDirectory,
java.lang.String toDirectory)
Generate Fortran files that are based on code skeletons in files |
static void |
prettyPrint(java.io.BufferedWriter out,
java.lang.String s,
int indent)
Pretty printout in Fortran program, no line number in column 1-6 |
static void |
prettyPrint(java.io.BufferedWriter out,
java.lang.String s,
int indent,
int linenumber)
Pretty printout in Fortran program |
static void |
printExperimentDefinition(java.io.BufferedWriter out,
boolean include_edata2,
boolean include_spline,
boolean include_useip)
Print definition for the experiments in Fortran program |
static void |
printMaxDefinition(java.io.BufferedWriter out,
Problem p)
Print max sizes of arrays in Fortran program |
static void |
printModelDefinition(java.io.BufferedWriter out,
boolean include_modkinit)
Print model definition in Fortran program |
static void |
printTempModelDefinition(java.io.BufferedWriter out,
boolean include_modkinit)
Print definition for temporary model variables in Fortran program |
static void |
printTempModelDefinition2(java.io.BufferedWriter out,
boolean include_modkinit)
Print definition for second temporary model variables in Fortran program |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GenerateFortran(java.lang.String dir, Problem p)
dir
- the directoryp
- the problemMethod Detail |
---|
public static void printMaxDefinition(java.io.BufferedWriter out, Problem p) throws java.io.IOException
out
- bufferedWriter to write inp
- the problem
java.io.IOException
public static void printModelDefinition(java.io.BufferedWriter out, boolean include_modkinit) throws java.io.IOException
out
- bufferedWriter to write ininclude_modkinit
- true if initial values are parameters, otherwise false
java.io.IOException
public static void printTempModelDefinition(java.io.BufferedWriter out, boolean include_modkinit) throws java.io.IOException
out
- bufferedWriter to write ininclude_modkinit
- true if initial values are parameters, otherwise false
java.io.IOException
public static void printTempModelDefinition2(java.io.BufferedWriter out, boolean include_modkinit) throws java.io.IOException
out
- bufferedWriter to write ininclude_modkinit
- true if initial values are parameters, otherwise false
java.io.IOException
public static void printExperimentDefinition(java.io.BufferedWriter out, boolean include_edata2, boolean include_spline, boolean include_useip) throws java.io.IOException
out
- bufferedWriter to write ininclude_edata2
- true if the variable edata2 is included, otherwise falseinclude_spline
- true if the variable spline is included, otherwise falseinclude_useip
- true if the variable useip is included, otherwise false
java.io.IOException
public static void prettyPrint(java.io.BufferedWriter out, java.lang.String s, int indent) throws java.io.IOException
out
- bufferedWriter to write ins
- the String to writeindent
- number of indented columns
java.io.IOException
public static void prettyPrint(java.io.BufferedWriter out, java.lang.String s, int indent, int linenumber) throws java.io.IOException
out
- bufferedWriter to write ins
- the String to writeindent
- number of indented columnslinenumber
- line number in column 1-6
java.io.IOException
public static java.lang.String fixExponent(double d)
d
- the input real number of Java type double
public static java.lang.String adaptEquationToParaest(java.lang.String ein, ReactionType r)
ein
- a String representing the equation of a certain reaction typer
- the current Reaction type
public static java.lang.String adaptEquationToSim(java.lang.String ein, ReactionType r)
ein
- a String representing the equation of a certain reaction typer
- the current Reaction type
public static java.lang.String adaptEquationToSimSingle(java.lang.String ein, ReactionType r, int ivar)
ein
- a String representing the equation of a certain reaction typer
- the current Reaction type
public void generate(Problem p, java.lang.String fromDirectory, java.lang.String toDirectory)
p
- the problemfromDirectory
- directory of code skeletonstoDirectory
- directory of generated code
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |