FrontISTR 5.2.0
Large-scale structural analysis program with finit element method
Loading...
Searching...
No Matches
hecmw_io_put_mesh.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 "hecmw_struct.h"
9#include "hecmw_util.h"
10#include "hecmw_io_put_mesh.h"
11#include "hecmw_io_dist.h"
12
13int HECMW_put_mesh(struct hecmwST_local_mesh *mesh, char *name_ID) {
14 struct hecmw_ctrl_meshfile *file;
15 struct hecmw_ctrl_meshfiles *files;
16 char filename[HECMW_FILENAME_LEN + 1];
17
18 files = HECMW_ctrl_get_meshfiles(name_ID);
19 if (files == NULL) return -1;
20
21 file = &files->meshfiles[0];
22
23 strcpy(filename, files->meshfiles[0].filename);
24 if (HECMW_put_dist_mesh(mesh, filename)) return -1;
25
27
28 return 0;
29}
#define HECMW_FILENAME_LEN
Definition: hecmw_config.h:72
void HECMW_ctrl_free_meshfiles(struct hecmw_ctrl_meshfiles *meshfiles)
struct hecmw_ctrl_meshfiles * HECMW_ctrl_get_meshfiles(char *name_ID)
struct hecmwST_local_mesh * mesh
Definition: hecmw_repart.h:71
int HECMW_put_dist_mesh(const struct hecmwST_local_mesh *mesh, char *fname)
#define NULL
int HECMW_put_mesh(struct hecmwST_local_mesh *mesh, char *name_ID)
struct hecmw_ctrl_meshfile * meshfiles
Definition: hecmw_control.h:42