libsc
1.6.0
|
00001 /* 00002 This file is part of the SC Library. 00003 The SC Library provides support for parallel scientific applications. 00004 00005 Copyright (C) 2010 The University of Texas System 00006 00007 The SC Library is free software; you can redistribute it and/or 00008 modify it under the terms of the GNU Lesser General Public 00009 License as published by the Free Software Foundation; either 00010 version 2.1 of the License, or (at your option) any later version. 00011 00012 The SC Library is distributed in the hope that it will be useful, 00013 but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 Lesser General Public License for more details. 00016 00017 You should have received a copy of the GNU Lesser General Public 00018 License along with the SC Library; if not, write to the Free Software 00019 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 00020 02110-1301, USA. 00021 */ 00022 00023 #ifndef SC_AMR_H 00024 #define SC_AMR_H 00025 00026 #include <sc_statistics.h> 00027 00028 SC_EXTERN_C_BEGIN; 00029 00030 typedef struct sc_amr_control 00031 { 00032 const double *errors; 00033 sc_statinfo_t estats; 00034 sc_MPI_Comm mpicomm; 00035 long num_procs_long; 00036 long num_total_elements; 00037 double coarsen_threshold; 00038 double refine_threshold; 00039 long num_total_coarsen; 00040 long num_total_refine; 00041 long num_total_estimated; 00042 } 00043 sc_amr_control_t; 00044 00052 void sc_amr_error_stats (sc_MPI_Comm mpicomm, 00053 long num_local_elements, 00054 const double *errors, 00055 sc_amr_control_t * amr); 00056 00065 typedef long (*sc_amr_count_coarsen_fn) (sc_amr_control_t * amr, 00066 void *user_data); 00067 00076 typedef long (*sc_amr_count_refine_fn) (sc_amr_control_t * amr, 00077 void *user_data); 00078 00087 void sc_amr_coarsen_specify (int package_id, 00088 sc_amr_control_t * amr, 00089 double coarsen_threshold, 00090 sc_amr_count_coarsen_fn cfn, 00091 void *user_data); 00092 00104 void sc_amr_coarsen_search (int package_id, 00105 sc_amr_control_t * amr, 00106 long num_total_ideal, 00107 double coarsen_threshold_high, 00108 double target_window, 00109 int max_binary_steps, 00110 sc_amr_count_coarsen_fn cfn, 00111 void *user_data); 00112 00124 void sc_amr_refine_search (int package_id, 00125 sc_amr_control_t * amr, 00126 long num_total_ideal, 00127 double refine_threshold_low, 00128 double target_window, 00129 int max_binary_steps, 00130 sc_amr_count_refine_fn rfn, 00131 void *user_data); 00132 00133 SC_EXTERN_C_END; 00134 00135 #endif /* !SC_AMR_H */