Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SWIFT
SWIFTsim
Commits
63848443
Commit
63848443
authored
Feb 07, 2019
by
Loic Hausammann
Browse files
Add comments
parent
0b43546a
Changes
6
Hide whitespace changes
Inline
Side-by-side
logger/logger_header.h
View file @
63848443
...
...
@@ -30,6 +30,17 @@
#define LOGGER_OFFSET_SIZE 7
#define LOGGER_MASK_SIZE 1
/**
* @brief This structure contains everything from the file header.
*
* This structure is initialized by @header_read and need to be freed
* with @header_free.
*
* The information contained by the header can be easily access with
* the functions @header_get_mask_size and @header_get_field_index.
*
* The only function that modify the file is @header_change_offset_direction.
*/
struct
header
{
/* Logger version */
char
version
[
STRING_SIZE
];
...
...
logger/logger_io.h
View file @
63848443
...
...
@@ -16,6 +16,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
******************************************************************************/
/**
* @brief This file contains basic IO function.
*/
#ifndef __LOGGER_LOGGER_IO_H__
#define __LOGGER_LOGGER_IO_H__
...
...
logger/logger_particle.h
View file @
63848443
...
...
@@ -28,6 +28,22 @@
#define DIM 3
/**
* @brief Store the data from a chunk.
*
* This structure contains all the required fields
* present in a file.
*
* As we need only a single particle, no need to keep
* it small.
*
* The particle is initialized with @logger_particle_init
* and can be updated with a chunk through @logger_particle_read.
*
* In @logger_particle_read, we use @logger_particle_read_field on
* each field and @logger_particle_interpolate if a linear
* interpolation is required.
*/
struct
logger_particle
{
/* position */
double
pos
[
DIM
];
...
...
@@ -57,9 +73,12 @@ struct logger_particle {
double
time
;
};
/**
* @brief Defines the type of interpolation
*/
enum
logger_reader_type
{
logger_reader_const
,
logger_reader_lin
,
logger_reader_const
,
/* Constant interpolation */
logger_reader_lin
,
/* Linear interpolation */
};
void
logger_particle_print
(
const
struct
logger_particle
*
p
);
...
...
logger/logger_reader.h
View file @
63848443
...
...
@@ -16,6 +16,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
******************************************************************************/
/**
* @brief This file contains the C function shown to the external user.
*/
#ifndef __LOGGER_LOGGER_READER_H__
#define __LOGGER_LOGGER_READER_H__
...
...
logger/logger_time.h
View file @
63848443
...
...
@@ -25,6 +25,23 @@
typedef
char
timebin_t
;
typedef
long
long
integertime_t
;
/**
* @brief This structure contains all the timestamp.
*
* In order to obtain easily the time step of a chunk,
* this structure is required. It contains all the time step
* with their timestamp and position in the file.
*
* This structure is initialized with @time_array_init and
* freed with @time_array_free.
*
* The time step of an offset can be obtained with
* @time_array_get_integertime, @time_array_get_time and
* @time_array_get_time_array.
*
* The size of the time array can be accessed with
* @time_array_count.
*/
struct
time_array
{
/* Pointer to next element */
void
*
next
;
...
...
@@ -42,8 +59,6 @@ struct time_array {
size_t
offset
;
};
double
time_convert_to_double
(
const
integertime_t
ti
,
const
double
timeBase
);
integertime_t
time_convert_to_integer
(
const
double
ti
,
const
double
timeBase
);
void
time_read
(
integertime_t
*
timestamp
,
double
*
time
,
const
struct
header
*
h
,
void
*
map
,
size_t
*
offset
);
void
time_array_init
(
struct
time_array
*
t
,
const
struct
header
*
h
,
void
*
map
,
...
...
logger/logger_tools.h
View file @
63848443
...
...
@@ -16,6 +16,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
******************************************************************************/
/**
* @brief This file contains functions that help to navigate in the dumps.
*/
#ifndef __LOGGER_LOGGER_TOOLS_H__
#define __LOGGER_LOGGER_TOOLS_H__
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment