... | @@ -6,10 +6,10 @@ In order to compile examples (optionally you will need to modify Makefile): |
... | @@ -6,10 +6,10 @@ In order to compile examples (optionally you will need to modify Makefile): |
|
[wtools@dell ~]$ cd wdata
|
|
[wtools@dell ~]$ cd wdata
|
|
[wtools@dell wdata]$ make examples
|
|
[wtools@dell wdata]$ make examples
|
|
```
|
|
```
|
|
Folder [wdata](https://gitlab.fizyka.pw.edu.pl/wtools/wdata/-/tree/master/) contains library that provides support for w-data processing.
|
|
Folder [wdata](https://gitlab.fizyka.pw.edu.pl/wtools/wdata/-/tree/master/) contains the library that provides support for w-data processing.
|
|
List of examples demonstrating how to use this library are presented below. One can see more detailed descritption of each of it in [Examples](Examples/Examples)
|
|
A list of examples demonstrating how to use this library is presented below.
|
|
* [example-write.c](https://gitlab.fizyka.pw.edu.pl/wtools/wdata/-/tree/master/c-examples/example-write.c): code creates artificial set of variables and writes them to wdat files.
|
|
* [example-write.c](https://gitlab.fizyka.pw.edu.pl/wtools/wdata/-/tree/master/c-examples/example-write.c): code creates an artificial set of variables and writes them to wdat files.
|
|
* [example-write-many.c](https://gitlab.fizyka.pw.edu.pl/wtools/wdata/-/tree/master/c-examples/example-write-many.c): code creates artificial set of variables and writes them do wdat files. The differnence between the above is the non repeating parts of the code, however it introduces some limitations.
|
|
* [example-write-many.c](https://gitlab.fizyka.pw.edu.pl/wtools/wdata/-/tree/master/c-examples/example-write-many.c): code creates an artificial set of variables and writes them to wdat files. The difference between the above is the non-repeating parts of the code, however, it introduces some limitations.
|
|
* [example-write-many-t_varying.c](https://gitlab.fizyka.pw.edu.pl/wtools/wdata/-/tree/master/c-examples/example-write-many-t_varying.c): code creates artificial set of variables and writes them do wdat files.
|
|
* [example-write-many-t_varying.c](https://gitlab.fizyka.pw.edu.pl/wtools/wdata/-/tree/master/c-examples/example-write-many-t_varying.c): code creates artificial set of variables and writes them do wdat files.
|
|
* [example-read.c](https://gitlab.fizyka.pw.edu.pl/wtools/wdata/-/tree/master/c-examples/example-read.c): code reads data from wdat files (created by [example-write.c](https://gitlab.fizyka.pw.edu.pl/wtools/wdata/-/tree/master/example-write.c)).
|
|
* [example-read.c](https://gitlab.fizyka.pw.edu.pl/wtools/wdata/-/tree/master/c-examples/example-read.c): code reads data from wdat files (created by [example-write.c](https://gitlab.fizyka.pw.edu.pl/wtools/wdata/-/tree/master/example-write.c)).
|
|
* [example-addvar.c](https://gitlab.fizyka.pw.edu.pl/wtools/wdata/-/tree/master/c-examples/example-addvar.c): code adds new variable to existing data set (created by [example-write.c](https://gitlab.fizyka.pw.edu.pl/wtools/wdata/-/tree/master/example-write.c)).
|
|
* [example-addvar.c](https://gitlab.fizyka.pw.edu.pl/wtools/wdata/-/tree/master/c-examples/example-addvar.c): code adds new variable to existing data set (created by [example-write.c](https://gitlab.fizyka.pw.edu.pl/wtools/wdata/-/tree/master/example-write.c)).
|
... | @@ -46,7 +46,7 @@ if(test_ele != 1) |
... | @@ -46,7 +46,7 @@ if(test_ele != 1) |
|
fclose(pFile); // close file
|
|
fclose(pFile); // close file
|
|
```
|
|
```
|
|
|
|
|
|
The above code demonstrates the idea behind the library, however we want to introduce some abstraction, and the code that uses the library function looks like that:
|
|
The above code demonstrates the idea behind the library, however, we want to introduce some abstraction, and the code that uses the library function looks like that:
|
|
```c
|
|
```c
|
|
double *dataR; // pointer to real data
|
|
double *dataR; // pointer to real data
|
|
int cycleid; // id of cycle to be loaded
|
|
int cycleid; // id of cycle to be loaded
|
... | @@ -82,7 +82,7 @@ if(test_ele != 1) |
... | @@ -82,7 +82,7 @@ if(test_ele != 1) |
|
fclose(pFile); // close file
|
|
fclose(pFile); // close file
|
|
```
|
|
```
|
|
|
|
|
|
Using WData library:
|
|
Using W-data library:
|
|
```c
|
|
```c
|
|
double *dataR; // real data
|
|
double *dataR; // real data
|
|
|
|
|
... | | ... | |