![]() |
FrontISTR
5.7.0
Large-scale structural analysis program with finit element method
|
#include <assert.h>
#include <stdarg.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <hecmw_config.h>
#include <hecmw_comm.h>
Go to the source code of this file.
Data Structures | |
struct | st_ctrl_rec |
struct | st_fstr_ctrl_data |
Macros | |
#define | FSTR_CTRL_RCODE_PARAM_SUCCESS 0 |
#define | FSTR_CTRL_RCODE_PARAM_ERROR -1 |
#define | FSTR_CTRL_RCODE_PARAM_TYPE_ERROR -2 |
#define | FSTR_CTRL_RCODE_PARAM_RANGE_ERROR -3 |
#define | FSTR_CTRL_RCODE_PARAM_NOTHING 1 |
#define | FSTR_CTRL_RCODE_PARAM_VALUE_NOTHING 2 |
#define | FSTR_CTRL_RCODE_DATA_SUCCESS 0 |
#define | FSTR_CTRL_RCODE_DATA_ERROR -1 |
#define | FSTR_CTRL_RCODE_DATA_TYPE_ERROR -2 |
#define | FSTR_CTRL_RCODE_DATA_RANGE_ERROR -3 |
#define | FSTR_CTRL_RCODE_DATA_NOTHING 1 |
#define | FSTR_CTRL_RCODE_DATA_LINE_NOTHING 2 |
#define | ctrl_list_size 20 |
Typedefs | |
typedef struct st_ctrl_rec | ctrl_rec |
typedef struct st_fstr_ctrl_data | fstr_ctrl_data |
Variables | |
fstr_ctrl_data * | ctrl_list [ctrl_list_size] |
Utility for open/close and parse of fstr control file caution: define parameter 'ctrl' as integer for call from fortran
Definition in file fstr_ctrl_util.h.
#define ctrl_list_size 20 |
Definition at line 55 of file fstr_ctrl_util.h.
#define FSTR_CTRL_RCODE_DATA_ERROR -1 |
Definition at line 34 of file fstr_ctrl_util.h.
#define FSTR_CTRL_RCODE_DATA_LINE_NOTHING 2 |
Definition at line 38 of file fstr_ctrl_util.h.
#define FSTR_CTRL_RCODE_DATA_NOTHING 1 |
Definition at line 37 of file fstr_ctrl_util.h.
#define FSTR_CTRL_RCODE_DATA_RANGE_ERROR -3 |
Definition at line 36 of file fstr_ctrl_util.h.
#define FSTR_CTRL_RCODE_DATA_SUCCESS 0 |
Definition at line 33 of file fstr_ctrl_util.h.
#define FSTR_CTRL_RCODE_DATA_TYPE_ERROR -2 |
Definition at line 35 of file fstr_ctrl_util.h.
#define FSTR_CTRL_RCODE_PARAM_ERROR -1 |
Definition at line 27 of file fstr_ctrl_util.h.
#define FSTR_CTRL_RCODE_PARAM_NOTHING 1 |
Definition at line 30 of file fstr_ctrl_util.h.
#define FSTR_CTRL_RCODE_PARAM_RANGE_ERROR -3 |
Definition at line 29 of file fstr_ctrl_util.h.
#define FSTR_CTRL_RCODE_PARAM_SUCCESS 0 |
Definition at line 26 of file fstr_ctrl_util.h.
#define FSTR_CTRL_RCODE_PARAM_TYPE_ERROR -2 |
Definition at line 28 of file fstr_ctrl_util.h.
#define FSTR_CTRL_RCODE_PARAM_VALUE_NOTHING 2 |
Definition at line 31 of file fstr_ctrl_util.h.
typedef struct st_ctrl_rec ctrl_rec |
typedef struct st_fstr_ctrl_data fstr_ctrl_data |
int c_fstr_ctrl_close | ( | fstr_ctrl_data * | ctrl | ) |
Closing fstr control file
ctrl | Specify fstr_ctrl_data* pointer obtained from fstr_ctrl_open |
Definition at line 1050 of file fstr_ctrl_util.c.
int c_fstr_ctrl_copy_data_line | ( | fstr_ctrl_data * | ctrl, |
int | line_no, | ||
char * | data_line | ||
) |
Definition at line 744 of file fstr_ctrl_util.c.
int c_fstr_ctrl_get_current_header_line_no | ( | fstr_ctrl_data * | ctrl | ) |
Obtaining line number of current header in fstr control file
ctrl | Specify fstr_ctrl_data* pointer obtained from fstr_ctrl_open |
Definition at line 446 of file fstr_ctrl_util.c.
int c_fstr_ctrl_get_current_header_name | ( | fstr_ctrl_data * | ctrl, |
char * | header_name | ||
) |
Obtaining current header name
ctrl | Specify fstr_ctrl_data* pointer obtained from fstr_ctrl_open |
header_name | buffer for header name |
Definition at line 418 of file fstr_ctrl_util.c.
int c_fstr_ctrl_get_current_header_pos | ( | fstr_ctrl_data * | ctrl | ) |
Obtaining record line number of current header in fstr control file
ctrl | Specify fstr_ctrl_data* pointer obtained from fstr_ctrl_open |
Definition at line 461 of file fstr_ctrl_util.c.
int c_fstr_ctrl_get_data | ( | fstr_ctrl_data * | ctrl, |
int | line_no, | ||
const char * | format, | ||
... | |||
) |
int c_fstr_ctrl_get_data_array | ( | fstr_ctrl_data * | ctrl, |
const char * | format, | ||
... | |||
) |
int c_fstr_ctrl_get_data_array_ex | ( | fstr_ctrl_data * | ctrl, |
const char * | format, | ||
... | |||
) |
int c_fstr_ctrl_get_data_array_v | ( | fstr_ctrl_data * | ctrl, |
const char * | format, | ||
va_list | va | ||
) |
int c_fstr_ctrl_get_data_error_line | ( | void | ) |
int c_fstr_ctrl_get_data_error_pos | ( | void | ) |
Obtaining converting error position in previous fstr_ctrl_get_data execution
Definition at line 794 of file fstr_ctrl_util.c.
int c_fstr_ctrl_get_data_ex | ( | fstr_ctrl_data * | ctrl, |
int | line_no, | ||
const char * | format, | ||
... | |||
) |
int c_fstr_ctrl_get_data_line_n | ( | fstr_ctrl_data * | ctrl | ) |
Obtaining data line number of current header
ctrl | Specify fstr_ctrl_data* pointer obtained from fstr_ctrl_open |
Definition at line 724 of file fstr_ctrl_util.c.
int c_fstr_ctrl_get_data_n_in_line | ( | fstr_ctrl_data * | ctrl, |
int | line_no, | ||
const char * | delim | ||
) |
int c_fstr_ctrl_get_data_v | ( | fstr_ctrl_data * | ctrl, |
int | line_no, | ||
const char * | format, | ||
va_list | va | ||
) |
void c_fstr_ctrl_get_err_msg | ( | char * | buff | ) |
Get error message (for _ex function )
buff | buffer for copied message |
Definition at line 22 of file fstr_ctrl_util.c.
int c_fstr_ctrl_get_line | ( | fstr_ctrl_data * | ctrl, |
int | rec_no, | ||
char * | buff | ||
) |
Obtaining line
ctrl | Specify fstr_ctrl_data* pointer obtained from fstr_ctrl_open |
rec_no | Specify record no |
buff | Pointer to copy the record string line |
Definition at line 344 of file fstr_ctrl_util.c.
int c_fstr_ctrl_get_param | ( | fstr_ctrl_data * | ctrl, |
const char * | param_name, | ||
const char * | value_list, | ||
char | type, | ||
void * | val | ||
) |
Obtaining value of parameter in current header line
ctrl | Specify fstr_ctrl_data* pointer obtained from fstr_ctrl_open |
paran_name | Specify parameter name |
value_list | Specify value list by csv string |
type | Specify type of parameter's value as character 'I':integer(int), 'C' or 'S':string(char*), 'R':real(double), 'P':Pattern Input(first string in value_list is 0) (int) 'E':exist or not(int, 1 or 0) |
val | Put pointer to store the parameter's value |
Definition at line 581 of file fstr_ctrl_util.c.
int c_fstr_ctrl_get_param_ex | ( | fstr_ctrl_data * | ctrl, |
const char * | param_name, | ||
const char * | value_list, | ||
int | necessity, | ||
char | type, | ||
void * | val | ||
) |
Obtaining value of parameter in current header line This function uses "fstr_ctrl_get_param" and prints message in error occurrence.
ctrl | Specify fstr_ctrl_data* pointer obtained from fstr_ctrl_open |
paran_name | Specify parameter name |
necessity | Necessity of parameter (1 or 0) |
type | Specify type of parameter's value as character 'I':integer(int), 'C' or 'S':string(char*), 'R':real(double), 'P':Pattern Input(first string in value_list is 1) (int) 'E':exist or not(int, 1 or 0) |
val | Put pointer to store the parameter's value |
Definition at line 674 of file fstr_ctrl_util.c.
int c_fstr_ctrl_get_rec_number | ( | fstr_ctrl_data * | ctrl | ) |
Obtaining record number
ctrl | Specify fstr_ctrl_data* pointer obtained from fstr_ctrl_open |
Definition at line 333 of file fstr_ctrl_util.c.
fstr_ctrl_data* c_fstr_ctrl_open | ( | const char * | filename | ) |
Open FSTR control file
filename | Specify FSTR control file name (included path) |
Definition at line 250 of file fstr_ctrl_util.c.
int c_fstr_ctrl_seek_header | ( | fstr_ctrl_data * | ctrl, |
const char * | header_name | ||
) |
Seeking to specified header (current header)
ctrl | Specify fstr_ctrl_data* pointer obtained from fstr_ctrl_open |
header_name | Specify header name or NULL pointer to seek next header When this function is called from fortran, use blank string instead of NULL |
Definition at line 360 of file fstr_ctrl_util.c.
int c_fstr_ctrl_seek_next_header | ( | fstr_ctrl_data * | ctrl | ) |
Seeking next header (current header)
ctrl | Specify fstr_ctrl_data* pointer obtained from fstr_ctrl_open |
Definition at line 400 of file fstr_ctrl_util.c.
fstr_ctrl_data* ctrl_list[ctrl_list_size] |