accelerInt  v0.1
Functions
read_initial_conditions.c File Reference

the generic initial condition reader More...

#include "header.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <sys/time.h>
Include dependency graph for read_initial_conditions.c:

Go to the source code of this file.

Functions

void read_initial_conditions (const char *filename, int NUM, double **y_host, double **variable_host)
 Reads initial conditions for IVPs from binary file. More...
 

Detailed Description

the generic initial condition reader

Author
Nicholas Curtis
Date
03/10/2015

Definition in file read_initial_conditions.c.

Function Documentation

◆ read_initial_conditions()

void read_initial_conditions ( const char *  filename,
int  NUM,
double **  y_host,
double **  variable_host 
)

Reads initial conditions for IVPs from binary file.

Parameters
[in]filenamethe file to read from
[in]NUMthe number of IVP initial conditions to read
[in,out]y_hostAddress of the host state vector pointer. This is initialized and populated by this method
[in,out]variable_hostAddress of the host pressure/density pointer. This is initialized and populated by this method

Note: the data file is expected to be in the following format:
time, Temperature, Pressure, mass fractions (State #1)
time, Temperature, Pressure, mass fractions (State #2) ...

Definition at line 30 of file read_initial_conditions.c.