Added buffer for HDF5 output.

Added E-Field container.
This commit is contained in:
Christian
2019-09-03 16:35:55 +02:00
parent 794bfb2b98
commit 1978039630
15 changed files with 1000185 additions and 69 deletions
+10 -4
View File
@@ -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) {