FrontISTR  5.7.0
Large-scale structural analysis program with finit element method
hecmw_ML_helper_nn_c.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 #ifdef HECMW_WITH_ML
7 
8 #include "hecmw_ML_helper_nn.h"
9 
10 int hecmw_ML_getrow_nn(ML_Operator *mat_in, int N_requested_rows,
11  int requested_rows[], int allocated_space,
12  int cols[], double values[], int row_lengths[]) {
13  int *id, ierr;
14  id = (int *)ML_Get_MyGetrowData(mat_in);
15  hecmw_ml_getrow_nn_(id, &N_requested_rows, requested_rows, &allocated_space,
16  cols, values, row_lengths, &ierr);
17  return ierr;
18 }
19 
20 int hecmw_ML_matvec_nn(ML_Operator *mat_in, int in_length, double p[],
21  int out_length, double ap[]) {
22  int *id, ierr;
23  id = (int *)ML_Get_MyGetrowData(mat_in);
24  hecmw_ml_matvec_nn_(id, &in_length, p, &out_length, ap, &ierr);
25  return ierr;
26 }
27 
28 int hecmw_ML_comm_nn(double x[], void *A_data) {
29  int *id, ierr;
30  id = (int *)A_data;
31  hecmw_ml_comm_nn_(id, x, &ierr);
32  return ierr;
33 }
34 
35 int hecmw_ML_smoother_diag_apply_nn(ML_Smoother *data, int x_length, double x[],
36  int rhs_length, double rhs[]) {
37  int *id, ierr;
38  id = (int *)ML_Get_MySmootherData(data);
39  hecmw_ml_smoother_diag_apply_nn_(id, &x_length, x, &rhs_length, rhs, &ierr);
40  return ierr;
41 }
42 
43 int hecmw_ML_smoother_ssor_apply_nn(ML_Smoother *data, int x_length, double x[],
44  int rhs_length, double rhs[]) {
45  int *id, ierr;
46  id = (int *)ML_Get_MySmootherData(data);
47  hecmw_ml_smoother_ssor_apply_nn_(id, &x_length, x, &rhs_length, rhs, &ierr);
48  return ierr;
49 }
50 
51 #endif /* HECMW_WITH_ML */
hecmw_ML_helper_nn.h
data
CNFData data
Definition: neu_reporter.cpp:18
m_set_arrays_directsolver_contact::values
real(kind=kreal), dimension(:), allocatable values
a
Definition: set_arrays_DirectSolver.f90:16