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 ResultWriterpublic void close()
close in interface ResultWriterpublic File outputFile()
outputFile in interface ResultWriterprotected ResultWriterHDF5.Trial getTrial(int trial) throws Exception
Exceptionprotected ResultWriterHDF5.Trial createTrial(int trial) throws Exception
Exceptionprotected void closeTrial(int trial,
IGridCalc source)
throws Exception
Exceptionpublic void closeTrial(IGridCalc source)
closeTrial in interface ResultWriterpublic void writeGrid(VolumeGrid vgrid, double startTime, IGridCalc source)
writeGrid in interface ResultWriterprotected void _writeGrid(VolumeGrid vgrid, double startTime, IGridCalc source) throws Exception
Exceptionpublic void writeOutputInterval(double time,
IGridCalc source)
writeOutputInterval in interface ResultWriterpublic void writeOutputScheme(int i,
double time,
IGridCalc source)
writeOutputScheme in interface ResultWriterpublic void writeEventStatistics(double time,
IGridCalc source)
writeEventStatistics in interface ResultWriterprotected static ResultWriterHDF5.LoadModelResult _loadModel(File filename, int trial, Double pop_from_time) throws Exception
Exceptionpublic 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
Exceptionprotected static void setAttribute(hdf.object.HObject obj,
String name,
long value)
throws Exception
Exceptionprotected static <T> T getAttribute(hdf.object.h5.H5File h5,
String path,
String name)
throws Exception
Exceptionprotected hdf.object.Dataset _writeArray(String name, hdf.object.Group parent, hdf.object.h5.H5Datatype type, long[] dims, Object data) throws Exception
Exceptionprotected hdf.object.Dataset writeArray(String name, hdf.object.Group parent, double[][] items) throws Exception
Exceptionprotected hdf.object.Dataset writeArray(String name, hdf.object.Group parent, int[][] items, int fill) throws Exception
Exceptionprotected hdf.object.Dataset writeVector(String name, hdf.object.Group parent, String... items) throws Exception
Exceptionprotected void writeMap(hdf.object.Group element,
Set<Map.Entry<Object,Object>> set)
throws Exception
Exceptionprotected hdf.object.Dataset writeVector(String name, hdf.object.Group parent, double... items) throws Exception
Exceptionprotected hdf.object.Dataset writeVector(String name, hdf.object.Group parent, int... items) throws Exception
Exceptionprotected hdf.object.Dataset writeVector(String name, hdf.object.Group parent, long... items) throws Exception
Exceptionprotected void writeSpeciesVector(String name, String title, hdf.object.Group parent, String[] species, int[] which) throws Exception
Exceptionprotected 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
Exceptionprotected static void extendExtensibleArray(hdf.object.h5.H5ScalarDS ds,
long howmuch)
throws Exception
Exceptionprotected static void getGridNumbers(int[][] dst,
int[] elements,
int[] ispecout,
IGridCalc source)
Copyright © 2020. All rights reserved.