public class ResultWriterHDF5 extends Object implements ResultWriter
Modifier and Type | Class and Description |
---|---|
static class |
ResultWriterHDF5.LoadModelResult |
protected class |
ResultWriterHDF5.PopulationOutput |
protected class |
ResultWriterHDF5.Trial |
Modifier and Type | Field and Description |
---|---|
static ncsa.hdf.object.h5.H5Datatype |
double_t |
static ncsa.hdf.object.h5.H5Datatype |
int_t |
static org.apache.logging.log4j.Logger |
log |
static ncsa.hdf.object.h5.H5Datatype |
long_t |
protected ncsa.hdf.object.Group |
model |
protected ncsa.hdf.object.h5.H5File |
output |
protected File |
outputFile |
protected ncsa.hdf.object.Group |
root |
static ncsa.hdf.object.h5.H5Datatype |
short_str_t |
protected Map<Integer,ResultWriterHDF5.Trial> |
trials |
Constructor and Description |
---|
ResultWriterHDF5(File output,
IOutputSet primary,
List<? extends IOutputSet> outputSets,
String[] species,
VolumeGrid grid) |
Modifier and Type | Method and Description |
---|---|
protected void |
_init() |
protected static ResultWriterHDF5.LoadModelResult |
_loadModel(File filename,
int trial,
Double pop_from_time) |
protected void |
_writeGrid(VolumeGrid vgrid,
double startTime,
IGridCalc source) |
void |
close() |
void |
closeTrial(IGridCalc source) |
protected void |
closeTrial(int trial,
IGridCalc source) |
protected ncsa.hdf.object.h5.H5ScalarDS |
createExtensibleArray(String name,
ncsa.hdf.object.Group parent,
ncsa.hdf.object.Datatype type,
String TITLE,
String LAYOUT,
String UNITS,
long... dims) |
protected ResultWriterHDF5.Trial |
createTrial(int trial) |
protected static void |
extendExtensibleArray(ncsa.hdf.object.h5.H5ScalarDS ds,
long howmuch) |
protected static void |
getGridNumbers(int[][] dst,
int[] elements,
int[] ispecout,
IGridCalc source) |
protected ResultWriterHDF5.Trial |
getTrial(int trial) |
void |
init(String magic) |
static ResultWriterHDF5.LoadModelResult |
loadModel(File filename,
int trial,
double pop_from_time) |
protected ncsa.hdf.object.Group |
model() |
File |
outputFile() |
protected static void |
setAttribute(ncsa.hdf.object.HObject obj,
String name,
String value)
Utility functions ******************
|
protected ncsa.hdf.object.Dataset |
writeArray(String name,
ncsa.hdf.object.Group parent,
double[][] items) |
protected ncsa.hdf.object.Dataset |
writeArray(String name,
ncsa.hdf.object.Group parent,
int[][] items,
int fill) |
void |
writeEventStatistics(double time,
IGridCalc source) |
void |
writeGrid(VolumeGrid vgrid,
double startTime,
IGridCalc source) |
protected void |
writeManifest() |
protected ncsa.hdf.object.Group |
writeMap(String name,
ncsa.hdf.object.Group parent,
Set<Map.Entry<Object,Object>> set,
String title) |
void |
writeOutputInterval(double time,
IGridCalc source) |
void |
writeOutputScheme(int i,
double time,
IGridCalc source) |
protected void |
writeSpeciesVector(String name,
String title,
ncsa.hdf.object.Group parent,
String[] species,
int[] which) |
protected ncsa.hdf.object.Dataset |
writeVector(String name,
ncsa.hdf.object.Group parent,
double... items) |
protected ncsa.hdf.object.Dataset |
writeVector(String name,
ncsa.hdf.object.Group parent,
int... items) |
protected ncsa.hdf.object.Dataset |
writeVector(String name,
ncsa.hdf.object.Group parent,
long... items) |
protected ncsa.hdf.object.Dataset |
writeVector(String name,
ncsa.hdf.object.Group parent,
String... items) |
public static final org.apache.logging.log4j.Logger log
protected final File outputFile
protected ncsa.hdf.object.h5.H5File output
protected ncsa.hdf.object.Group root
protected final Map<Integer,ResultWriterHDF5.Trial> trials
public static final ncsa.hdf.object.h5.H5Datatype double_t
public static final ncsa.hdf.object.h5.H5Datatype int_t
public static final ncsa.hdf.object.h5.H5Datatype long_t
public static final ncsa.hdf.object.h5.H5Datatype short_str_t
protected ncsa.hdf.object.Group model
public ResultWriterHDF5(File output, IOutputSet primary, List<? extends IOutputSet> outputSets, String[] species, VolumeGrid grid)
public void init(String magic)
init
in interface ResultWriter
public void close()
close
in interface ResultWriter
public File outputFile()
outputFile
in interface ResultWriter
protected ResultWriterHDF5.Trial getTrial(int trial) throws Exception
Exception
protected ResultWriterHDF5.Trial createTrial(int trial) throws Exception
Exception
protected void closeTrial(int trial, IGridCalc source) throws Exception
Exception
public void closeTrial(IGridCalc source)
closeTrial
in interface ResultWriter
public void writeGrid(VolumeGrid vgrid, double startTime, IGridCalc source)
writeGrid
in interface ResultWriter
protected void _writeGrid(VolumeGrid vgrid, double startTime, IGridCalc source) throws Exception
Exception
public void writeOutputInterval(double time, IGridCalc source)
writeOutputInterval
in interface ResultWriter
public void writeOutputScheme(int i, double time, IGridCalc source)
writeOutputScheme
in interface ResultWriter
public void writeEventStatistics(double time, IGridCalc source)
writeEventStatistics
in interface ResultWriter
protected static ResultWriterHDF5.LoadModelResult _loadModel(File filename, int trial, Double pop_from_time) throws Exception
Exception
public static ResultWriterHDF5.LoadModelResult loadModel(File filename, int trial, double pop_from_time)
protected static void setAttribute(ncsa.hdf.object.HObject obj, String name, String value) throws Exception
Exception
protected ncsa.hdf.object.Dataset writeArray(String name, ncsa.hdf.object.Group parent, double[][] items) throws Exception
Exception
protected ncsa.hdf.object.Dataset writeArray(String name, ncsa.hdf.object.Group parent, int[][] items, int fill) throws Exception
Exception
protected ncsa.hdf.object.Dataset writeVector(String name, ncsa.hdf.object.Group parent, String... items) throws Exception
Exception
protected ncsa.hdf.object.Group writeMap(String name, ncsa.hdf.object.Group parent, Set<Map.Entry<Object,Object>> set, String title) throws Exception
Exception
protected ncsa.hdf.object.Dataset writeVector(String name, ncsa.hdf.object.Group parent, double... items) throws Exception
Exception
protected ncsa.hdf.object.Dataset writeVector(String name, ncsa.hdf.object.Group parent, int... items) throws Exception
Exception
protected ncsa.hdf.object.Dataset writeVector(String name, ncsa.hdf.object.Group parent, long... items) throws Exception
Exception
protected void writeSpeciesVector(String name, String title, ncsa.hdf.object.Group parent, String[] species, int[] which) throws Exception
Exception
protected ncsa.hdf.object.h5.H5ScalarDS createExtensibleArray(String name, ncsa.hdf.object.Group parent, ncsa.hdf.object.Datatype type, String TITLE, String LAYOUT, String UNITS, long... dims) throws Exception
Exception
protected static void extendExtensibleArray(ncsa.hdf.object.h5.H5ScalarDS ds, long howmuch) throws Exception
Exception
protected static void getGridNumbers(int[][] dst, int[] elements, int[] ispecout, IGridCalc source)
Copyright © 2016. All rights reserved.