FrontISTR 5.2.0
Large-scale structural analysis program with finit element method
Loading...
Searching...
No Matches
hecmw_couple_startup_if.c
Go to the documentation of this file.
1/*****************************************************************************
2 * Copyright (c) 2019 FrontISTR Commons
3 * This software is released under the MIT License, see LICENSE.txt
4 *****************************************************************************/
5
6#include <stdio.h>
7#include <stdlib.h>
8#include <string.h>
9
10#include "hecmw_struct.h"
11#include "hecmw_lib_fc.h"
12
15
16static struct hecmw_couple_value *couple_value;
17
18/*================================================================================================*/
19
20extern void hecmw_couple_startup_init_if(char *boundary_id, int *err, int len) {
21 char cname[HECMW_NAME_LEN + 1];
22
23 *err = 1;
24
25 if (HECMW_strcpy_f2c_r(boundary_id, len, cname, sizeof(cname)) == NULL)
26 return;
27 if ((couple_value = HECMW_couple_startup(cname)) == NULL) return;
28 if (HECMW_couple_copy_c2f_init(couple_value)) return;
29
30 *err = 0;
31}
32
33extern void hecmw_couple_startup_init_if_(char *boundary_id, int *err,
34 int len) {
35 hecmw_couple_startup_init_if(boundary_id, err, len);
36}
37
38extern void hecmw_couple_startup_init_if__(char *boundary_id, int *err,
39 int len) {
40 hecmw_couple_startup_init_if(boundary_id, err, len);
41}
42
43extern void HECMW_COUPLE_STARTUP_INIT_IF(char *boundary_id, int *err, int len) {
44 hecmw_couple_startup_init_if(boundary_id, err, len);
45}
46
47/*------------------------------------------------------------------------------------------------*/
48
49extern void hecmw_couple_startup_final_if(int *err) {
50 *err = 1;
51
53
55 couple_value = NULL;
56
57 *err = 0;
58}
59
60extern void hecmw_couple_startup_final_if_(int *err) {
62}
63
64extern void hecmw_couple_startup_final_if__(int *err) {
66}
67
68extern void HECMW_COUPLE_STARTUP_FINAL_IF(int *err) {
70}
#define HECMW_NAME_LEN
Definition: hecmw_config.h:70
int HECMW_couple_copy_c2f_finalize(void)
int HECMW_couple_copy_c2f_init(struct hecmw_couple_value *_couple_value)
void HECMW_couple_free_couple_value(struct hecmw_couple_value *couple_value)
struct hecmw_couple_value * HECMW_couple_startup(const char *boundary_id)
void hecmw_couple_startup_init_if_(char *boundary_id, int *err, int len)
void hecmw_couple_startup_init_if__(char *boundary_id, int *err, int len)
void hecmw_couple_startup_final_if_(int *err)
void HECMW_COUPLE_STARTUP_FINAL_IF(int *err)
void hecmw_couple_startup_final_if__(int *err)
void hecmw_couple_startup_final_if(int *err)
void hecmw_couple_startup_init_if(char *boundary_id, int *err, int len)
void HECMW_COUPLE_STARTUP_INIT_IF(char *boundary_id, int *err, int len)
#define NULL
char * HECMW_strcpy_f2c_r(const char *fstr, int flen, char *buf, int bufsize)
Definition: hecmw_lib_fc.c:45