Added buffer for HDF5 output.
Added E-Field container.
This commit is contained in:
@@ -32,7 +32,7 @@ const hid_t H5TB_Particle_Interface::fieldTypes[8] = {
|
||||
H5T_NATIVE_DOUBLE,
|
||||
H5T_NATIVE_DOUBLE,
|
||||
H5T_NATIVE_DOUBLE};
|
||||
const hsize_t H5TB_Particle_Interface::chunkSize = 4096;
|
||||
const hsize_t H5TB_Particle_Interface::chunkSize = 145;
|
||||
const size_t H5TB_Particle_Interface::sizes[8] = {
|
||||
sizeof( samplelogParticle.Id),
|
||||
sizeof( samplelogParticle.parentId),
|
||||
@@ -56,9 +56,15 @@ void H5TB_Particle_Interface::create() {
|
||||
}
|
||||
|
||||
void H5TB_Particle_Interface::write(const Particle &logPart) {
|
||||
logParticle logParticle_buffer = transform(logPart);
|
||||
// Maybe add real buffer here....
|
||||
H5TBappend_records(*loc_id, table_name.c_str() , 1, size, offset, sizes, &logParticle_buffer );
|
||||
buffer[buffer_count] = transform(logPart);
|
||||
buffer_count = buffer_count + 1;
|
||||
if (buffer_count == buffer_size) {
|
||||
H5TBappend_records(*loc_id, table_name.c_str() , buffer_size, size, offset, sizes, &buffer);
|
||||
buffer_count = 0;
|
||||
}
|
||||
}
|
||||
H5TB_Particle_Interface::~H5TB_Particle_Interface() {
|
||||
H5TBappend_records(*loc_id, table_name.c_str() , buffer_count, size, offset, sizes, &buffer);
|
||||
}
|
||||
|
||||
loggerParticle H5TB_Particle_Interface::transform(const Particle &logPart) {
|
||||
|
||||
Reference in New Issue
Block a user