use of gov.sandia.n2a.eqset.EquationSet in project n2a by frothga.
the class BackendC method getOutputVariables.
@Override
public ParameterDomain getOutputVariables(MNode model) {
try {
if (model == null)
return null;
EquationSet s = new EquationSet(model);
if (s.name.length() < 1)
s.name = "Model";
s.resolveLHS();
return s.getOutputParameters();
} catch (Exception error) {
return null;
}
}
use of gov.sandia.n2a.eqset.EquationSet in project n2a by frothga.
the class BackendDataC method analyzeLastT.
public void analyzeLastT(EquationSet s) {
boolean hasIntegrated = localIntegrated.size() > 0;
for (EquationSet p : s.parts) {
if (hasIntegrated)
break;
hasIntegrated = ((BackendDataC) p.backendData).globalIntegrated.size() > 0;
}
boolean dtCanChange = dt != null && dt.equations.size() > 0 && !dt.hasAttribute("initOnly");
// dt could also change if we use a variable-step integrator. There are currently no plans to implement one.
lastT = hasIntegrated && (eventTargets.size() > 0 || dtCanChange);
}
use of gov.sandia.n2a.eqset.EquationSet in project n2a by frothga.
the class BackendDataC method setLocalNeedPath.
public void setLocalNeedPath(EquationSet s) {
EquationSet c = s.container;
// Don't set flag, because we know that path() will return "".
if (c == null && s.isSingleton())
return;
needLocalPath = true;
setParentNeedPath(s);
}
use of gov.sandia.n2a.eqset.EquationSet in project n2a by frothga.
the class JobC method analyzeEvents.
public void analyzeEvents(EquationSet s) throws Backend.AbortRun {
BackendDataC bed = (BackendDataC) s.backendData;
bed.analyzeEvents(s);
for (EquationSet p : s.parts) analyzeEvents(p);
}
use of gov.sandia.n2a.eqset.EquationSet in project n2a by frothga.
the class JobC method findLiveReferences.
public void findLiveReferences(EquationSet s) {
for (EquationSet p : s.parts) {
findLiveReferences(p);
}
if (s.lethalConnection || s.lethalContainer) {
ArrayList<Object> resolution = new ArrayList<Object>();
NavigableSet<EquationSet> touched = new TreeSet<EquationSet>();
if (!(s.backendData instanceof BackendDataC))
s.backendData = new BackendDataC();
findLiveReferences(s, resolution, touched, ((BackendDataC) s.backendData).localReference, false);
}
}
Aggregations