FrontISTR 5.2.0
Large-scale structural analysis program with finit element method
Loading...
Searching...
No Matches
fstr_sort_index.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 *****************************************************************************/
9/*
10 Index Sorting for FSTR
11 2004.10.18 by N.Imai
12 -------------------------
13 [Fortran]
14 integer(kind=4) :: index_data(2,:), n
15 call fstr_sort_index( index_data, n )
16*/
17
18#include <stdlib.h>
19
20static int my_comp(const void *a, const void *b) {
21 return (*(int *)a - *(int *)b);
22}
23
24void c_fstr_sort_index(int *index_data, int n) {
25 qsort(index_data, n, sizeof(int) * 2, my_comp);
26}
27
28/*----------- Fortran Interface ---------------*/
29
30void fstr_sort_index(int *index_data, int *n) {
31 c_fstr_sort_index(index_data, *n);
32}
33
34void fstr_sort_index_(int *index_data, int *n) {
35 c_fstr_sort_index(index_data, *n);
36}
37
38void fstr_sort_index__(int *index_data, int *n) {
39 c_fstr_sort_index(index_data, *n);
40}
41
42void FSTR_SORT_INDEX(int *index_data, int *n) {
43 c_fstr_sort_index(index_data, *n);
44}
45
46void FSTR_SORT_INDEX_(int *index_data, int *n) {
47 c_fstr_sort_index(index_data, *n);
48}
49
50void FSTR_SORT_INDEX__(int *index_data, int *n) {
51 c_fstr_sort_index(index_data, *n);
52}
void fstr_sort_index__(int *index_data, int *n)
void fstr_sort_index(int *index_data, int *n)
void FSTR_SORT_INDEX(int *index_data, int *n)
void c_fstr_sort_index(int *index_data, int n)
I/O and Utility.
void FSTR_SORT_INDEX_(int *index_data, int *n)
void FSTR_SORT_INDEX__(int *index_data, int *n)
void fstr_sort_index_(int *index_data, int *n)