<commit_before>#include "helper.h"
#include "init.h"
#include <math.h>
#include "boundary_val.h"



int read_parameters( const char *szFileName,       /* name of the file */
		double *Re,                /* reynolds number   */
		double *UI,                /* velocity x-direction */
		double *VI,                /* velocity y-direction */
		double *WI,                /* velocity z-direction */
		double *PI,                /* pressure */
		double *GX,                /* gravitation x-direction */
		double *GY,                /* gravitation y-direction */
		double *GZ,                /* gravitation z-direction */
		double *t_end,             /* end time */
		double *xlength,           /* length of the domain x-dir.*/
		double *ylength,           /* length of the domain y-dir.*/
		double *zlength,           /* length of the domain z-dir.*/
		double *dt,                /* time step */
		double *dx,                /* length of a cell x-dir. */
		double *dy,                /* length of a cell y-dir. */
		double *dz,                /* length of a cell z-dir. */
		int  *imax,                /* number of cells x-direction*/
		int  *jmax,                /* number of cells y-direction*/
		int  *kmax,                /* number of cells z-direction*/
		double *alpha,             /* uppwind differencing factor*/
		double *omg,               /* relaxation factor */
		double *tau,               /* safety factor for time step*/
		int  *itermax,             /* max. number of iterations for pressure per time step */
		double *eps,               /* accuracy bound for pressure*/
		double *dt_value,          /* time for output */
		int *wl,              		 /*initial boundary for left wall*/
		int *wr,              		 /*initial boundary for right wall*/
		int *wf,		               /*initial boundary for front wall*/
		int *wh,			             /*initial boundary for back wall*/
		int *wt,			             /*initial boundary for top wall*/
		int *wb,			             /*initial boundary for bottom wall*/
		char *problemGeometry,     /*problem to solve*/
		//                  double *presLeft,		       /*pressure at the left wall*/
		//                  double *presRight,		     /*pressure at the right wall*/
		//                  double *presDelta,		     /*pressure difference across the domain*/
		double *velIN,             /*velocity of inflow*/
		double *velMW )		         /*velocity of wall (in U direction)*/
{
	READ_DOUBLE( szFileName, *xlength );
	READ_DOUBLE( szFileName, *ylength );
	READ_DOUBLE( szFileName, *zlength );

	READ_INT   ( szFileName, *imax );
	READ_INT   ( szFileName, *jmax );
	READ_INT   ( szFileName, *kmax );

	READ_DOUBLE( szFileName, *dt    );
	READ_DOUBLE( szFileName, *t_end );
	READ_DOUBLE( szFileName, *tau   );

	READ_DOUBLE( szFileName, *dt_value );
	READ_INT   ( szFileName, *itermax );

	READ_DOUBLE( szFileName, *eps   );
	READ_DOUBLE( szFileName, *omg   );
	READ_DOUBLE( szFileName, *alpha );

	READ_DOUBLE( szFileName, *Re    );

	READ_DOUBLE( szFileName, *GX );
	READ_DOUBLE( szFileName, *GY );
	READ_DOUBLE( szFileName, *GZ );

	READ_DOUBLE( szFileName, *PI );
	READ_DOUBLE( szFileName, *UI );
	READ_DOUBLE( szFileName, *VI );
	READ_DOUBLE( szFileName, *WI );

	READ_INT   ( szFileName, *wl );
	READ_INT   ( szFileName, *wr );
	READ_INT   ( szFileName, *wf );
	READ_INT   ( szFileName, *wh );
	READ_INT   ( szFileName, *wt );
	READ_INT   ( szFileName, *wb );

	READ_STRING( szFileName, problemGeometry );

	/*   READ_DOUBLE( szFileName, *presLeft);
   READ_DOUBLE( szFileName, *presRight);
   READ_DOUBLE( szFileName, *presDelta); */

	READ_DOUBLE( szFileName, *velIN );

	double *velMWx = &velMW[0], *velMWy = &velMW[1], *velMWz = &velMW[2];
	READ_DOUBLE( szFileName, *velMWx );
	READ_DOUBLE( szFileName, *velMWy );
	READ_DOUBLE( szFileName, *velMWz );
	/*velMW[0] = velMWx;
   velMW[1] = velMWy;<commit_msg>added some scenarios<commit_after>#include "helper.h"
#include "init.h"
#include <math.h>
#include "boundary_val.h"



int read_parameters( const char *szFileName,       /* name of the file */
		double *Re,                /* reynolds number   */
		double *UI,                /* velocity x-direction */
		double *VI,                /* velocity y-direction */
		double *WI,                /* velocity z-direction */
		double *PI,                /* pressure */
		double *GX,                /* gravitation x-direction */
		double *GY,                /* gravitation y-direction */
		double *GZ,                /* gravitation z-direction */
		double *t_end,             /* end time */
		double *xlength,           /* length of the domain x-dir.*/
		double *ylength,           /* length of the domain y-dir.*/
		double *zlength,           /* length of the domain z-dir.*/
		double *dt,                /* time step */
		double *dx,                /* length of a cell x-dir. */
		double *dy,                /* length of a cell y-dir. */
		double *dz,                /* length of a cell z-dir. */
		int  *imax,                /* number of cells x-direction*/
		int  *jmax,                /* number of cells y-direction*/
		int  *kmax,                /* number of cells z-direction*/
		double *alpha,             /* uppwind differencing factor*/
		double *omg,               /* relaxation factor */
		double *tau,               /* safety factor for time step*/
		int  *itermax,             /* max. number of iterations for pressure per time step */
		double *eps,               /* accuracy bound for pressure*/
		double *dt_value,          /* time for output */
		int *wl,              		 /*initial boundary for left wall*/
		int *wr,              		 /*initial boundary for right wall*/
		int *wf,		               /*initial boundary for front wall*/
		int *wh,			             /*initial boundary for back wall*/
		int *wt,			             /*initial boundary for top wall*/
		int *wb,			             /*initial boundary for bottom wall*/
		char *problemGeometry,     /*problem to solve*/
		//                  double *presLeft,		       /*pressure at the left wall*/
		//                  double *presRight,		     /*pressure at the right wall*/
		//                  double *presDelta,		     /*pressure difference across the domain*/
		int inflows,
		int movingwalls,
		double *velIN,             /*velocity of inflow*/
		double *velMW )		         /*velocity of wall (in U direction)*/
{
	READ_DOUBLE( szFileName, *xlength );
	READ_DOUBLE( szFileName, *ylength );
	READ_DOUBLE( szFileName, *zlength );

	READ_INT   ( szFileName, *imax );
	READ_INT   ( szFileName, *jmax );
	READ_INT   ( szFileName, *kmax );

	READ_DOUBLE( szFileName, *dt    );
	READ_DOUBLE( szFileName, *t_end );
	READ_DOUBLE( szFileName, *tau   );

	READ_DOUBLE( szFileName, *dt_value );
	READ_INT   ( szFileName, *itermax );

	READ_DOUBLE( szFileName, *eps   );
	READ_DOUBLE( szFileName, *omg   );
	READ_DOUBLE( szFileName, *alpha );

	READ_DOUBLE( szFileName, *Re    );

	READ_DOUBLE( szFileName, *GX );
	READ_DOUBLE( szFileName, *GY );
	READ_DOUBLE( szFileName, *GZ );

	READ_DOUBLE( szFileName, *PI );
	READ_DOUBLE( szFileName, *UI );
	READ_DOUBLE( szFileName, *VI );
	READ_DOUBLE( szFileName, *WI );

	READ_INT   ( szFileName, *wl );
	READ_INT   ( szFileName, *wr );
	READ_INT   ( szFileName, *wf );
	READ_INT   ( szFileName, *wh );
	READ_INT   ( szFileName, *wt );
	READ_INT   ( szFileName, *wb );

	READ_STRING( szFileName, problemGeometry );

	/*   READ_DOUBLE( szFileName, *presLeft);
   READ_DOUBLE( szFileName, *presRight);
   READ_DOUBLE( szFileName, *presDelta); */

	READ_INT   ( szFileName, *inflows );
	READ_INT   ( szFileName, *movingwalls );

	for (int i=0; i<inflows; i++){
		READ_DOUBLE( szFileName, *velIN );
	}
	for (int i=0; i<inflows; i++){
		//TODO read mw velocities as many times as needed
	}
	//TODO think about allocating memory in the loop.... hm. :S
	double *velMWx = &velMW[0], *velMWy = &velMW[1], *velMWz = &velMW[2];
	for (int i=0; i<inflows; i++){
	READ_DOUBLE( szFileName, *velMWx );
	READ_DOUBLE( szFileName, *velMWy );
	READ_DOUBLE( szFileName, *velMWz );
	/*velMW[0] = velMWx;
   velMW[1] = velMWy;
{'fraction_non_alphanumeric': 0.1281541330018645, 'fraction_numerical': 0.0016159105034182723, 'mean_word_length': 2.0604792696842904, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5352280', 'n_tokens_mistral': 2682, 'n_tokens_neox': 2516, 'n_words': 753}