Skip to content

Commit

Permalink
updated for fortran
Browse files Browse the repository at this point in the history
  • Loading branch information
scharlton2 committed Oct 28, 2019
1 parent 4d68446 commit 31e2df5
Show file tree
Hide file tree
Showing 3 changed files with 186 additions and 14 deletions.
160 changes: 152 additions & 8 deletions iric_ftoc.c
Original file line number Diff line number Diff line change
Expand Up @@ -791,22 +791,40 @@ void IRICLIBDLL FMNAME(cg_iric_read_sol_integer_mul_f, CG_IRIC_READ_SOL_INTEGER_
*ier = cg_iRIC_Read_Sol_Integer_Mul(*fid, *step, c_name, data);
}

void IRICLIBDLL FMNAME(cg_iric_read_sol_real_mul_f, CG_IRIC_READ_SOL_REAL_MUL_F) (int *fid, int *step, STR_PSTR(name), double *data, int *ier STR_PLEN(name)) {
void IRICLIBDLL FMNAME(cg_iric_read_sol_cell_integer_mul_f, CG_IRIC_READ_SOL_CELL_INTEGER_MUL_F) (int *fid, int *step, STR_PSTR(name), int *data, int *ier STR_PLEN(name)) {
char c_name[CGIO_MAX_NAME_LENGTH+1];
string_2_C_string(STR_PTR(name), STR_LEN(name),
c_name, CGIO_MAX_NAME_LENGTH, ier);
if (*ier) return;

*ier = cg_iRIC_Read_Sol_Real_Mul(*fid, *step, c_name, data);
*ier = cg_iRIC_Read_Sol_Cell_Integer_Mul(*fid, *step, c_name, data);
}

void IRICLIBDLL FMNAME(cg_iric_read_sol_cell_integer_mul_f, CG_IRIC_READ_SOL_CELL_INTEGER_MUL_F) (int *fid, int *step, STR_PSTR(name), int *data, int *ier STR_PLEN(name)) {
void IRICLIBDLL FMNAME(cg_iric_read_sol_iface_integer_mul_f, CG_IRIC_READ_SOL_IFACE_INTEGER_MUL_F) (int *fid, int *step, STR_PSTR(name), int *data, int *ier STR_PLEN(name)) {
char c_name[CGIO_MAX_NAME_LENGTH+1];
string_2_C_string(STR_PTR(name), STR_LEN(name),
c_name, CGIO_MAX_NAME_LENGTH, ier);
if (*ier) return;

*ier = cg_iRIC_Read_Sol_Cell_Integer_Mul(*fid, *step, c_name, data);
*ier = cg_iRIC_Read_Sol_IFace_Integer_Mul(*fid, *step, c_name, data);
}

void IRICLIBDLL FMNAME(cg_iric_read_sol_jface_integer_mul_f, CG_IRIC_READ_SOL_JFACE_INTEGER_MUL_F) (int *fid, int *step, STR_PSTR(name), int *data, int *ier STR_PLEN(name)) {
char c_name[CGIO_MAX_NAME_LENGTH+1];
string_2_C_string(STR_PTR(name), STR_LEN(name),
c_name, CGIO_MAX_NAME_LENGTH, ier);
if (*ier) return;

*ier = cg_iRIC_Read_Sol_JFace_Integer_Mul(*fid, *step, c_name, data);
}

void IRICLIBDLL FMNAME(cg_iric_read_sol_real_mul_f, CG_IRIC_READ_SOL_REAL_MUL_F) (int *fid, int *step, STR_PSTR(name), double *data, int *ier STR_PLEN(name)) {
char c_name[CGIO_MAX_NAME_LENGTH+1];
string_2_C_string(STR_PTR(name), STR_LEN(name),
c_name, CGIO_MAX_NAME_LENGTH, ier);
if (*ier) return;

*ier = cg_iRIC_Read_Sol_Real_Mul(*fid, *step, c_name, data);
}

void IRICLIBDLL FMNAME(cg_iric_read_sol_cell_real_mul_f, CG_IRIC_READ_SOL_CELL_REAL_MUL_F) (int *fid, int *step, STR_PSTR(name), double *data, int *ier STR_PLEN(name)) {
Expand All @@ -818,6 +836,24 @@ void IRICLIBDLL FMNAME(cg_iric_read_sol_cell_real_mul_f, CG_IRIC_READ_SOL_CELL_R
*ier = cg_iRIC_Read_Sol_Cell_Real_Mul(*fid, *step, c_name, data);
}

void IRICLIBDLL FMNAME(cg_iric_read_sol_iface_real_mul_f, CG_IRIC_READ_SOL_IFACE_REAL_MUL_F) (int *fid, int *step, STR_PSTR(name), double *data, int *ier STR_PLEN(name)) {
char c_name[CGIO_MAX_NAME_LENGTH+1];
string_2_C_string(STR_PTR(name), STR_LEN(name),
c_name, CGIO_MAX_NAME_LENGTH, ier);
if (*ier) return;

*ier = cg_iRIC_Read_Sol_IFace_Real_Mul(*fid, *step, c_name, data);
}

void IRICLIBDLL FMNAME(cg_iric_read_sol_jface_real_mul_f, CG_IRIC_READ_SOL_JFACE_REAL_MUL_F) (int *fid, int *step, STR_PSTR(name), double *data, int *ier STR_PLEN(name)) {
char c_name[CGIO_MAX_NAME_LENGTH+1];
string_2_C_string(STR_PTR(name), STR_LEN(name),
c_name, CGIO_MAX_NAME_LENGTH, ier);
if (*ier) return;

*ier = cg_iRIC_Read_Sol_JFace_Real_Mul(*fid, *step, c_name, data);
}

void IRICLIBDLL FMNAME(cg_iric_write_sol_time_mul_f, CG_IRIC_WRITE_SOL_TIME_MUL_F) (int *fid, double *time, int *ier) {
*ier = cg_iRIC_Write_Sol_Time_Mul(*fid, *time);
}
Expand Down Expand Up @@ -870,6 +906,24 @@ void IRICLIBDLL FMNAME(cg_iric_write_sol_cell_integer_mul_f, CG_IRIC_WRITE_SOL_C
*ier = cg_iRIC_Write_Sol_Cell_Integer_Mul(*fid, c_name, data);
}

void IRICLIBDLL FMNAME(cg_iric_write_sol_iface_integer_mul_f, CG_IRIC_WRITE_SOL_IFACE_INTEGER_MUL_F) (int *fid, STR_PSTR(name), int *data, int *ier STR_PLEN(name)) {
char c_name[CGIO_MAX_NAME_LENGTH+1];
string_2_C_string(STR_PTR(name), STR_LEN(name),
c_name, CGIO_MAX_NAME_LENGTH, ier);
if (*ier) return;

*ier = cg_iRIC_Write_Sol_IFace_Integer_Mul(*fid, c_name, data);
}

void IRICLIBDLL FMNAME(cg_iric_write_sol_jface_integer_mul_f, CG_IRIC_WRITE_SOL_JFACE_INTEGER_MUL_F) (int *fid, STR_PSTR(name), int *data, int *ier STR_PLEN(name)) {
char c_name[CGIO_MAX_NAME_LENGTH+1];
string_2_C_string(STR_PTR(name), STR_LEN(name),
c_name, CGIO_MAX_NAME_LENGTH, ier);
if (*ier) return;

*ier = cg_iRIC_Write_Sol_JFace_Integer_Mul(*fid, c_name, data);
}

void IRICLIBDLL FMNAME(cg_iric_write_sol_real_mul_f, CG_IRIC_WRITE_SOL_REAL_MUL_F) (int *fid, STR_PSTR(name), double *data, int *ier STR_PLEN(name)) {
char c_name[CGIO_MAX_NAME_LENGTH+1];
string_2_C_string(STR_PTR(name), STR_LEN(name),
Expand All @@ -888,6 +942,24 @@ void IRICLIBDLL FMNAME(cg_iric_write_sol_cell_real_mul_f, CG_IRIC_WRITE_SOL_CELL
*ier = cg_iRIC_Write_Sol_Cell_Real_Mul(*fid, c_name, data);
}

void IRICLIBDLL FMNAME(cg_iric_write_sol_iface_real_mul_f, CG_IRIC_WRITE_SOL_IFACE_REAL_MUL_F) (int *fid, STR_PSTR(name), double *data, int *ier STR_PLEN(name)) {
char c_name[CGIO_MAX_NAME_LENGTH+1];
string_2_C_string(STR_PTR(name), STR_LEN(name),
c_name, CGIO_MAX_NAME_LENGTH, ier);
if (*ier) return;

*ier = cg_iRIC_Write_Sol_IFace_Real_Mul(*fid, c_name, data);
}

void IRICLIBDLL FMNAME(cg_iric_write_sol_jface_real_mul_f, CG_IRIC_WRITE_SOL_JFACE_REAL_MUL_F) (int *fid, STR_PSTR(name), double *data, int *ier STR_PLEN(name)) {
char c_name[CGIO_MAX_NAME_LENGTH+1];
string_2_C_string(STR_PTR(name), STR_LEN(name),
c_name, CGIO_MAX_NAME_LENGTH, ier);
if (*ier) return;

*ier = cg_iRIC_Write_Sol_JFace_Real_Mul(*fid, c_name, data);
}

void IRICLIBDLL FMNAME(cg_iric_write_errorcode_mul_f, CG_IRIC_WRITE_ERRORCODE_MUL_F) (int *fid, int *errorcode, int *ier) {
*ier = cg_iRIC_Write_ErrorCode_Mul(*fid, *errorcode);
}
Expand Down Expand Up @@ -1979,22 +2051,40 @@ void IRICLIBDLL FMNAME(cg_iric_read_sol_integer_f, CG_IRIC_READ_SOL_INTEGER_F) (
*ier = cg_iRIC_Read_Sol_Integer(*step, c_name, data);
}

void IRICLIBDLL FMNAME(cg_iric_read_sol_real_f, CG_IRIC_READ_SOL_REAL_F) (int *step, STR_PSTR(name), double *data, int *ier STR_PLEN(name)) {
void IRICLIBDLL FMNAME(cg_iric_read_sol_cell_integer_f, CG_IRIC_READ_SOL_CELL_INTEGER_F) (int *step, STR_PSTR(name), int *data, int *ier STR_PLEN(name)) {
char c_name[CGIO_MAX_NAME_LENGTH+1];
string_2_C_string(STR_PTR(name), STR_LEN(name),
c_name, CGIO_MAX_NAME_LENGTH, ier);
if (*ier) return;

*ier = cg_iRIC_Read_Sol_Real(*step, c_name, data);
*ier = cg_iRIC_Read_Sol_Cell_Integer(*step, c_name, data);
}

void IRICLIBDLL FMNAME(cg_iric_read_sol_cell_integer_f, CG_IRIC_READ_SOL_CELL_INTEGER_F) (int *step, STR_PSTR(name), int *data, int *ier STR_PLEN(name)) {
void IRICLIBDLL FMNAME(cg_iric_read_sol_iface_integer_f, CG_IRIC_READ_SOL_IFACE_INTEGER_F) (int *step, STR_PSTR(name), int *data, int *ier STR_PLEN(name)) {
char c_name[CGIO_MAX_NAME_LENGTH+1];
string_2_C_string(STR_PTR(name), STR_LEN(name),
c_name, CGIO_MAX_NAME_LENGTH, ier);
if (*ier) return;

*ier = cg_iRIC_Read_Sol_Cell_Integer(*step, c_name, data);
*ier = cg_iRIC_Read_Sol_IFace_Integer(*step, c_name, data);
}

void IRICLIBDLL FMNAME(cg_iric_read_sol_jface_integer_f, CG_IRIC_READ_SOL_JFACE_INTEGER_F) (int *step, STR_PSTR(name), int *data, int *ier STR_PLEN(name)) {
char c_name[CGIO_MAX_NAME_LENGTH+1];
string_2_C_string(STR_PTR(name), STR_LEN(name),
c_name, CGIO_MAX_NAME_LENGTH, ier);
if (*ier) return;

*ier = cg_iRIC_Read_Sol_JFace_Integer(*step, c_name, data);
}

void IRICLIBDLL FMNAME(cg_iric_read_sol_real_f, CG_IRIC_READ_SOL_REAL_F) (int *step, STR_PSTR(name), double *data, int *ier STR_PLEN(name)) {
char c_name[CGIO_MAX_NAME_LENGTH+1];
string_2_C_string(STR_PTR(name), STR_LEN(name),
c_name, CGIO_MAX_NAME_LENGTH, ier);
if (*ier) return;

*ier = cg_iRIC_Read_Sol_Real(*step, c_name, data);
}

void IRICLIBDLL FMNAME(cg_iric_read_sol_cell_real_f, CG_IRIC_READ_SOL_CELL_REAL_F) (int *step, STR_PSTR(name), double *data, int *ier STR_PLEN(name)) {
Expand All @@ -2006,6 +2096,24 @@ void IRICLIBDLL FMNAME(cg_iric_read_sol_cell_real_f, CG_IRIC_READ_SOL_CELL_REAL_
*ier = cg_iRIC_Read_Sol_Cell_Real(*step, c_name, data);
}

void IRICLIBDLL FMNAME(cg_iric_read_sol_iface_real_f, CG_IRIC_READ_SOL_IFACE_REAL_F) (int *step, STR_PSTR(name), double *data, int *ier STR_PLEN(name)) {
char c_name[CGIO_MAX_NAME_LENGTH+1];
string_2_C_string(STR_PTR(name), STR_LEN(name),
c_name, CGIO_MAX_NAME_LENGTH, ier);
if (*ier) return;

*ier = cg_iRIC_Read_Sol_IFace_Real(*step, c_name, data);
}

void IRICLIBDLL FMNAME(cg_iric_read_sol_jface_real_f, CG_IRIC_READ_SOL_JFACE_REAL_F) (int *step, STR_PSTR(name), double *data, int *ier STR_PLEN(name)) {
char c_name[CGIO_MAX_NAME_LENGTH+1];
string_2_C_string(STR_PTR(name), STR_LEN(name),
c_name, CGIO_MAX_NAME_LENGTH, ier);
if (*ier) return;

*ier = cg_iRIC_Read_Sol_JFace_Real(*step, c_name, data);
}

void IRICLIBDLL FMNAME(cg_iric_write_sol_time_f, CG_IRIC_WRITE_SOL_TIME_F) (double *time, int *ier) {
*ier = cg_iRIC_Write_Sol_Time(*time);
}
Expand Down Expand Up @@ -2058,6 +2166,24 @@ void IRICLIBDLL FMNAME(cg_iric_write_sol_cell_integer_f, CG_IRIC_WRITE_SOL_CELL_
*ier = cg_iRIC_Write_Sol_Cell_Integer(c_name, data);
}

void IRICLIBDLL FMNAME(cg_iric_write_sol_iface_integer_f, CG_IRIC_WRITE_SOL_IFACE_INTEGER_F) (STR_PSTR(name), int *data, int *ier STR_PLEN(name)) {
char c_name[CGIO_MAX_NAME_LENGTH+1];
string_2_C_string(STR_PTR(name), STR_LEN(name),
c_name, CGIO_MAX_NAME_LENGTH, ier);
if (*ier) return;

*ier = cg_iRIC_Write_Sol_IFace_Integer(c_name, data);
}

void IRICLIBDLL FMNAME(cg_iric_write_sol_jface_integer_f, CG_IRIC_WRITE_SOL_JFACE_INTEGER_F) (STR_PSTR(name), int *data, int *ier STR_PLEN(name)) {
char c_name[CGIO_MAX_NAME_LENGTH+1];
string_2_C_string(STR_PTR(name), STR_LEN(name),
c_name, CGIO_MAX_NAME_LENGTH, ier);
if (*ier) return;

*ier = cg_iRIC_Write_Sol_JFace_Integer(c_name, data);
}

void IRICLIBDLL FMNAME(cg_iric_write_sol_real_f, CG_IRIC_WRITE_SOL_REAL_F) (STR_PSTR(name), double *data, int *ier STR_PLEN(name)) {
char c_name[CGIO_MAX_NAME_LENGTH+1];
string_2_C_string(STR_PTR(name), STR_LEN(name),
Expand All @@ -2076,6 +2202,24 @@ void IRICLIBDLL FMNAME(cg_iric_write_sol_cell_real_f, CG_IRIC_WRITE_SOL_CELL_REA
*ier = cg_iRIC_Write_Sol_Cell_Real(c_name, data);
}

void IRICLIBDLL FMNAME(cg_iric_write_sol_iface_real_f, CG_IRIC_WRITE_SOL_IFACE_REAL_F) (STR_PSTR(name), double *data, int *ier STR_PLEN(name)) {
char c_name[CGIO_MAX_NAME_LENGTH+1];
string_2_C_string(STR_PTR(name), STR_LEN(name),
c_name, CGIO_MAX_NAME_LENGTH, ier);
if (*ier) return;

*ier = cg_iRIC_Write_Sol_IFace_Real(c_name, data);
}

void IRICLIBDLL FMNAME(cg_iric_write_sol_jface_real_f, CG_IRIC_WRITE_SOL_JFACE_REAL_F) (STR_PSTR(name), double *data, int *ier STR_PLEN(name)) {
char c_name[CGIO_MAX_NAME_LENGTH+1];
string_2_C_string(STR_PTR(name), STR_LEN(name),
c_name, CGIO_MAX_NAME_LENGTH, ier);
if (*ier) return;

*ier = cg_iRIC_Write_Sol_JFace_Real(c_name, data);
}

void IRICLIBDLL FMNAME(cg_iric_write_errorcode_f, CG_IRIC_WRITE_ERRORCODE_F) (int *errorcode, int *ier) {
*ier = cg_iRIC_Write_ErrorCode(*errorcode);
}
Expand Down
12 changes: 10 additions & 2 deletions iriclib.h
Original file line number Diff line number Diff line change
Expand Up @@ -580,12 +580,20 @@ int IRICLIBDLL cg_iRIC_Read_Sol_GridCoord3d(int step, double* x, double* y, doub

int IRICLIBDLL cg_iRIC_Read_Sol_Integer(int step, const char *name, int* data);

int IRICLIBDLL cg_iRIC_Read_Sol_Real(int step, const char *name, double* data);

int IRICLIBDLL cg_iRIC_Read_Sol_Cell_Integer(int step, const char *name, int* data);

int IRICLIBDLL cg_iRIC_Read_Sol_IFace_Integer(int step, const char *name, int* data);

int IRICLIBDLL cg_iRIC_Read_Sol_JFace_Integer(int step, const char *name, int* data);

int IRICLIBDLL cg_iRIC_Read_Sol_Real(int step, const char *name, double* data);

int IRICLIBDLL cg_iRIC_Read_Sol_Cell_Real(int step, const char *name, double* data);

int IRICLIBDLL cg_iRIC_Read_Sol_IFace_Real(int step, const char *name, double* data);

int IRICLIBDLL cg_iRIC_Read_Sol_JFace_Real(int step, const char *name, double* data);

int IRICLIBDLL cg_iRIC_Write_Sol_Time(double time);

int IRICLIBDLL cg_iRIC_Write_Sol_Iteration(int index);
Expand Down
28 changes: 24 additions & 4 deletions iriclib_single.c
Original file line number Diff line number Diff line change
Expand Up @@ -387,21 +387,41 @@ int cg_iRIC_Read_Sol_Integer(int step, const char* name, int* data)
return cg_iRIC_Read_Sol_Integer_Mul(lastfileid, step, name, data);
}

int cg_iRIC_Read_Sol_Real(int step, const char* name, double* data)
int cg_iRIC_Read_Sol_Cell_Integer(int step, const char* name, int* data)
{
return cg_iRIC_Read_Sol_Real_Mul(lastfileid, step, name, data);
return cg_iRIC_Read_Sol_Cell_Integer_Mul(lastfileid, step, name, data);
}

int cg_iRIC_Read_Sol_Cell_Integer(int step, const char* name, int* data)
int cg_iRIC_Read_Sol_IFace_Integer(int step, const char* name, int* data)
{
return cg_iRIC_Read_Sol_Cell_Integer_Mul(lastfileid, step, name, data);
return cg_iRIC_Read_Sol_IFace_Integer_Mul(lastfileid, step, name, data);
}

int cg_iRIC_Read_Sol_JFace_Integer(int step, const char* name, int* data)
{
return cg_iRIC_Read_Sol_JFace_Integer_Mul(lastfileid, step, name, data);
}

int cg_iRIC_Read_Sol_Real(int step, const char* name, double* data)
{
return cg_iRIC_Read_Sol_Real_Mul(lastfileid, step, name, data);
}

int cg_iRIC_Read_Sol_Cell_Real(int step, const char* name, double* data)
{
return cg_iRIC_Read_Sol_Cell_Real_Mul(lastfileid, step, name, data);
}

int cg_iRIC_Read_Sol_IFace_Real(int step, const char* name, double* data)
{
return cg_iRIC_Read_Sol_IFace_Real_Mul(lastfileid, step, name, data);
}

int cg_iRIC_Read_Sol_JFace_Real(int step, const char* name, double* data)
{
return cg_iRIC_Read_Sol_JFace_Real_Mul(lastfileid, step, name, data);
}

int cg_iRIC_Write_Sol_Time(double time)
{
return cg_iRIC_Write_Sol_Time_Mul(lastfileid, time);
Expand Down

0 comments on commit 31e2df5

Please sign in to comment.