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 hdf.object.h5.H5Datatype |
double_t |
static hdf.object.h5.H5Datatype |
int_t |
static org.apache.logging.log4j.Logger |
log |
static hdf.object.h5.H5Datatype |
long_t |
protected hdf.object.Group |
model |
protected hdf.object.h5.H5File |
output |
protected File |
outputFile |
protected hdf.object.Group |
root |
static 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 hdf.object.Dataset |
_writeArray(String name,
hdf.object.Group parent,
hdf.object.h5.H5Datatype type,
long[] dims,
Object data) |
protected void |
_writeGrid(VolumeGrid vgrid,
double startTime,
IGridCalc source) |
void |
close() |
void |
closeTrial(IGridCalc source) |
protected void |
closeTrial(int trial,
IGridCalc source) |
protected hdf.object.h5.H5ScalarDS |
createExtensibleArray(String name,
hdf.object.Group parent,
hdf.object.Datatype type,
String TITLE,
String LAYOUT,
String UNITS,
long... dims) |
protected ResultWriterHDF5.Trial |
createTrial(int trial) |
protected static void |
extendExtensibleArray(hdf.object.h5.H5ScalarDS ds,
long howmuch) |
protected static <T> T |
getAttribute(hdf.object.h5.H5File h5,
String path,
String name) |
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 hdf.object.Group |
model() |
File |
outputFile() |
protected static void |
setAttribute(hdf.object.HObject obj,
String name,
long value) |
protected static void |
setAttribute(hdf.object.HObject obj,
String name,
String value)
Utility functions ******************
|
protected hdf.object.Dataset |
writeArray(String name,
hdf.object.Group parent,
double[][] items) |
protected hdf.object.Dataset |
writeArray(String name,
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 void |
writeMap(hdf.object.Group element,
Set<Map.Entry<Object,Object>> set) |
void |
writeOutputInterval(double time,
IGridCalc source) |
void |
writeOutputScheme(int i,
double time,
IGridCalc source) |
protected void |
writeSpeciesVector(String name,
String title,
hdf.object.Group parent,
String[] species,
int[] which) |
protected hdf.object.Dataset |
writeVector(String name,
hdf.object.Group parent,
double... items) |
protected hdf.object.Dataset |
writeVector(String name,
hdf.object.Group parent,
int... items) |
protected hdf.object.Dataset |
writeVector(String name,
hdf.object.Group parent,
long... items) |
protected hdf.object.Dataset |
writeVector(String name,
hdf.object.Group parent,
String... items) |
public static final org.apache.logging.log4j.Logger log
protected final File outputFile
protected hdf.object.h5.H5File output
protected hdf.object.Group root
protected final Map<Integer,ResultWriterHDF5.Trial> trials
public static final hdf.object.h5.H5Datatype double_t
public static final hdf.object.h5.H5Datatype int_t
public static final hdf.object.h5.H5Datatype long_t
public static final hdf.object.h5.H5Datatype short_str_t
protected 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(hdf.object.HObject obj, String name, String value) throws Exception
Exception
protected static void setAttribute(hdf.object.HObject obj, String name, long value) throws Exception
Exception
protected static <T> T getAttribute(hdf.object.h5.H5File h5, String path, String name) throws Exception
Exception
protected hdf.object.Dataset _writeArray(String name, hdf.object.Group parent, hdf.object.h5.H5Datatype type, long[] dims, Object data) throws Exception
Exception
protected hdf.object.Dataset writeArray(String name, hdf.object.Group parent, double[][] items) throws Exception
Exception
protected hdf.object.Dataset writeArray(String name, hdf.object.Group parent, int[][] items, int fill) throws Exception
Exception
protected hdf.object.Dataset writeVector(String name, hdf.object.Group parent, String... items) throws Exception
Exception
protected void writeMap(hdf.object.Group element, Set<Map.Entry<Object,Object>> set) throws Exception
Exception
protected hdf.object.Dataset writeVector(String name, hdf.object.Group parent, double... items) throws Exception
Exception
protected hdf.object.Dataset writeVector(String name, hdf.object.Group parent, int... items) throws Exception
Exception
protected hdf.object.Dataset writeVector(String name, hdf.object.Group parent, long... items) throws Exception
Exception
protected void writeSpeciesVector(String name, String title, hdf.object.Group parent, String[] species, int[] which) throws Exception
Exception
protected hdf.object.h5.H5ScalarDS createExtensibleArray(String name, hdf.object.Group parent, hdf.object.Datatype type, String TITLE, String LAYOUT, String UNITS, long... dims) throws Exception
Exception
protected static void extendExtensibleArray(hdf.object.h5.H5ScalarDS ds, long howmuch) throws Exception
Exception
protected static void getGridNumbers(int[][] dst, int[] elements, int[] ispecout, IGridCalc source)
Copyright © 2017. All rights reserved.