Skip to content

Commit

Permalink
Merge pull request i-RIC#68 from scharlton2/issue-63
Browse files Browse the repository at this point in the history
Issue 63
  • Loading branch information
kskinoue0612 authored Oct 29, 2019
2 parents 7cc7034 + 31e2df5 commit fc13dbf
Show file tree
Hide file tree
Showing 14 changed files with 819 additions and 61 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
51 changes: 50 additions & 1 deletion iriclib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
#include <stdlib.h>
#include <sys/stat.h>

#if !defined(_MSC_VER)
#if defined(_MSC_VER)
#define unlink _unlink // warning C4996
#else
#define _stat stat
#include <unistd.h> // unlink
#endif
Expand Down Expand Up @@ -763,6 +765,18 @@ int cg_iRIC_Read_Sol_Cell_Integer_Mul(int fid, int step, const char *name, int*
return f->Sol_Read_Cell_Integer(step, name, data);
}

int cg_iRIC_Read_Sol_IFace_Integer_Mul(int fid, int step, const char *name, int* data)
{
GET_F(fid);
return f->Sol_Read_IFace_Integer(step, name, data);
}

int cg_iRIC_Read_Sol_JFace_Integer_Mul(int fid, int step, const char *name, int* data)
{
GET_F(fid);
return f->Sol_Read_JFace_Integer(step, name, data);
}

int cg_iRIC_Read_Sol_Real_Mul(int fid, int step, const char *name, double* data)
{
GET_F(fid);
Expand All @@ -775,6 +789,18 @@ int cg_iRIC_Read_Sol_Cell_Real_Mul(int fid, int step, const char *name, double*
return f->Sol_Read_Cell_Real(step, name, data);
}

int cg_iRIC_Read_Sol_IFace_Real_Mul(int fid, int step, const char *name, double* data)
{
GET_F(fid);
return f->Sol_Read_IFace_Real(step, name, data);
}

int cg_iRIC_Read_Sol_JFace_Real_Mul(int fid, int step, const char *name, double* data)
{
GET_F(fid);
return f->Sol_Read_JFace_Real(step, name, data);
}

int cg_iRIC_Write_Sol_Time_Mul(int fid, double time){
GET_F(fid);
return f->Sol_Write_Time(time);
Expand Down Expand Up @@ -819,6 +845,18 @@ int cg_iRIC_Write_Sol_Cell_Integer_Mul(int fid, const char *name, int* data)
return f->Sol_Write_Cell_Integer(name, data);
}

int cg_iRIC_Write_Sol_IFace_Integer_Mul(int fid, const char *name, int* data)
{
GET_F(fid);
return f->Sol_Write_IFace_Integer(name, data);
}

int cg_iRIC_Write_Sol_JFace_Integer_Mul(int fid, const char *name, int* data)
{
GET_F(fid);
return f->Sol_Write_JFace_Integer(name, data);
}

int cg_iRIC_Write_Sol_Real_Mul(int fid, const char *name, double* data)
{
GET_F(fid);
Expand All @@ -831,6 +869,17 @@ int cg_iRIC_Write_Sol_Cell_Real_Mul(int fid, const char *name, double* data)
return f->Sol_Write_Cell_Real(name, data);
}

int cg_iRIC_Write_Sol_IFace_Real_Mul(int fid, const char *name, double* data)
{
GET_F(fid);
return f->Sol_Write_IFace_Real(name, data);
}

int cg_iRIC_Write_Sol_JFace_Real_Mul(int fid, const char *name, double* data)
{
GET_F(fid);
return f->Sol_Write_JFace_Real(name, data);
}

int cg_iRIC_Write_ErrorCode_Mul(int fid, int errorcode)
{
Expand Down
Loading

0 comments on commit fc13dbf

Please sign in to comment.