1999-03-19 08:40:52 +08:00
|
|
|
/*BHEADER**********************************************************************
|
2008-07-18 09:34:48 +08:00
|
|
|
* Copyright (c) 2008, Lawrence Livermore National Security, LLC.
|
2006-07-28 07:26:57 +08:00
|
|
|
* Produced at the Lawrence Livermore National Laboratory.
|
2008-07-18 09:34:48 +08:00
|
|
|
* This file is part of HYPRE. See file COPYRIGHT for details.
|
1999-03-19 08:40:52 +08:00
|
|
|
*
|
2008-07-18 09:34:48 +08:00
|
|
|
* HYPRE is free software; you can redistribute it and/or modify it under the
|
|
|
|
|
* terms of the GNU Lesser General Public License (as published by the Free
|
|
|
|
|
* Software Foundation) version 2.1 dated February 1999.
|
1999-03-19 08:40:52 +08:00
|
|
|
*
|
|
|
|
|
* $Revision$
|
2006-07-28 07:26:57 +08:00
|
|
|
***********************************************************************EHEADER*/
|
|
|
|
|
|
2006-09-23 06:06:21 +08:00
|
|
|
|
|
|
|
|
|
2007-11-14 03:56:09 +08:00
|
|
|
|
1999-03-19 08:40:52 +08:00
|
|
|
/******************************************************************************
|
|
|
|
|
*
|
|
|
|
|
* Header info for the PFMG solver
|
|
|
|
|
*
|
|
|
|
|
*****************************************************************************/
|
|
|
|
|
|
|
|
|
|
#ifndef hypre_PFMG_HEADER
|
|
|
|
|
#define hypre_PFMG_HEADER
|
|
|
|
|
|
2003-10-18 06:30:23 +08:00
|
|
|
#include <assert.h>
|
|
|
|
|
|
1999-03-19 08:40:52 +08:00
|
|
|
/*--------------------------------------------------------------------------
|
|
|
|
|
* hypre_PFMGData:
|
|
|
|
|
*--------------------------------------------------------------------------*/
|
|
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
|
{
|
|
|
|
|
MPI_Comm comm;
|
|
|
|
|
|
|
|
|
|
double tol;
|
2010-12-23 09:25:40 +08:00
|
|
|
HYPRE_Int max_iter;
|
|
|
|
|
HYPRE_Int rel_change;
|
|
|
|
|
HYPRE_Int zero_guess;
|
|
|
|
|
HYPRE_Int max_levels; /* max_level <= 0 means no limit */
|
1999-03-19 08:40:52 +08:00
|
|
|
|
2010-12-23 09:25:40 +08:00
|
|
|
HYPRE_Int relax_type; /* type of relaxation to use */
|
2007-03-10 02:05:37 +08:00
|
|
|
double jacobi_weight; /* weighted jacobi weight */
|
2010-12-23 09:25:40 +08:00
|
|
|
HYPRE_Int usr_jacobi_weight; /* indicator flag for user weight */
|
2007-03-10 02:05:37 +08:00
|
|
|
|
2010-12-23 09:25:40 +08:00
|
|
|
HYPRE_Int rap_type; /* controls choice of RAP codes */
|
|
|
|
|
HYPRE_Int num_pre_relax; /* number of pre relaxation sweeps */
|
|
|
|
|
HYPRE_Int num_post_relax; /* number of post relaxation sweeps */
|
|
|
|
|
HYPRE_Int skip_relax; /* flag to allow skipping relaxation */
|
2007-03-10 02:05:37 +08:00
|
|
|
double relax_weight;
|
1999-03-19 08:40:52 +08:00
|
|
|
double dxyz[3]; /* parameters used to determine cdir */
|
|
|
|
|
|
2010-12-23 09:25:40 +08:00
|
|
|
HYPRE_Int num_levels;
|
1999-03-19 08:40:52 +08:00
|
|
|
|
2010-12-23 09:25:40 +08:00
|
|
|
HYPRE_Int *cdir_l; /* coarsening directions */
|
|
|
|
|
HYPRE_Int *active_l; /* flags to relax on level l*/
|
1999-03-19 08:40:52 +08:00
|
|
|
|
|
|
|
|
hypre_StructGrid **grid_l;
|
|
|
|
|
hypre_StructGrid **P_grid_l;
|
|
|
|
|
|
|
|
|
|
double *data;
|
|
|
|
|
hypre_StructMatrix **A_l;
|
|
|
|
|
hypre_StructMatrix **P_l;
|
|
|
|
|
hypre_StructMatrix **RT_l;
|
|
|
|
|
hypre_StructVector **b_l;
|
|
|
|
|
hypre_StructVector **x_l;
|
|
|
|
|
|
|
|
|
|
/* temp vectors */
|
|
|
|
|
hypre_StructVector **tx_l;
|
|
|
|
|
hypre_StructVector **r_l;
|
|
|
|
|
hypre_StructVector **e_l;
|
|
|
|
|
|
|
|
|
|
void **relax_data_l;
|
|
|
|
|
void **matvec_data_l;
|
|
|
|
|
void **restrict_data_l;
|
|
|
|
|
void **interp_data_l;
|
|
|
|
|
|
|
|
|
|
/* log info (always logged) */
|
2010-12-23 09:25:40 +08:00
|
|
|
HYPRE_Int num_iterations;
|
|
|
|
|
HYPRE_Int time_index;
|
1999-03-19 08:40:52 +08:00
|
|
|
|
2010-12-23 09:25:40 +08:00
|
|
|
HYPRE_Int print_level;
|
1999-03-19 08:40:52 +08:00
|
|
|
/* additional log info (logged when `logging' > 0) */
|
2010-12-23 09:25:40 +08:00
|
|
|
HYPRE_Int logging;
|
1999-03-19 08:40:52 +08:00
|
|
|
double *norms;
|
|
|
|
|
double *rel_norms;
|
|
|
|
|
|
|
|
|
|
} hypre_PFMGData;
|
|
|
|
|
|
|
|
|
|
#endif
|