ScaFaCoS  1.0.1
Scalable Fast Coulomb Solvers
fcs_vmg_p.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2011-2012 Rene Halver, Frederik Heber, Julian Iseringhausen
3 
4  This file is part of ScaFaCoS.
5 
6  ScaFaCoS is free software: you can redistribute it and/or modify
7  it under the terms of the GNU Lesser Public License as published by
8  the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  ScaFaCoS is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU Lesser Public License for more details.
15 
16  You should have received a copy of the GNU Lesser Public License
17  along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19 
20 
21 
22 #ifndef FCS_VMG_P_INCLUDED
23 #define FCS_VMG_P_INCLUDED
24 
25 #include "fcs_definitions.h"
26 #include "fcs_result_p.h"
27 #include "fcs_interface_p.h"
28 
35 typedef struct fcs_vmg_parameters_t *fcs_vmg_parameters;
36 
52 FCSResult fcs_vmg_setup(FCS handle, fcs_int max_level, fcs_int max_iterations,
53  fcs_int smoothing_steps, fcs_int cycle_type,
54  fcs_float precision, fcs_int near_field_cells,
55  fcs_int interpolation_order,
56  fcs_int discretization_order);
57 
68 FCSResult fcs_vmg_set_max_level(FCS handle, fcs_int max_level);
69 
80 FCSResult fcs_vmg_get_max_level(FCS handle, fcs_int* max_level);
81 
90 FCSResult fcs_vmg_set_max_iterations(FCS handle, fcs_int max_iterations);
91 
100 FCSResult fcs_vmg_get_max_iterations(FCS handle, fcs_int* max_iterations);
101 
110 FCSResult fcs_vmg_set_smoothing_steps(FCS handle, fcs_int smoothing_steps);
111 
120 FCSResult fcs_vmg_get_smoothing_steps(FCS handle, fcs_int *smoothing_steps);
121 
131 FCSResult fcs_vmg_set_cycle_type(FCS handle, fcs_int cycle_type);
132 
142 FCSResult fcs_vmg_get_cycle_type(FCS handle, fcs_int *cycle_type);
143 
153 FCSResult fcs_vmg_set_precision(FCS handle, fcs_float precision);
154 
164 FCSResult fcs_vmg_get_precision(FCS handle, fcs_float *precision);
165 
175 FCSResult fcs_vmg_set_near_field_cells(FCS handle, fcs_int near_field_cells);
176 
186 FCSResult fcs_vmg_get_near_field_cells(FCS handle, fcs_int *near_field_cells);
187 
197 FCSResult fcs_vmg_set_interpolation_order(FCS handle, fcs_int interpolation_order);
198 
208 FCSResult fcs_vmg_get_interpolation_order(FCS handle, fcs_int *interpolation_order);
209 
221 FCSResult fcs_vmg_set_discretization_order(FCS handle, fcs_int discretization_order);
222 
234 FCSResult fcs_vmg_get_discretization_order(FCS handle, fcs_int *discretization_order);
235 
241 void vmg_fcs_print_timer();
242 
243 #endif
FCSResult fcs_vmg_setup(FCS handle, fcs_int max_level, fcs_int max_iterations, fcs_int smoothing_steps, fcs_int cycle_type, fcs_float precision, fcs_int near_field_cells, fcs_int interpolation_order, fcs_int discretization_order)
Function to set all vmg parameters with a single call.
FCSResult fcs_vmg_set_interpolation_order(FCS handle, fcs_int interpolation_order)
Set the interpolation order for interpolating the gridded potential to the particle positions...
FCSResult fcs_vmg_set_precision(FCS handle, fcs_float precision)
Set the precision of the vmg algorithm.
struct fcs_vmg_parameters_t * fcs_vmg_parameters
Definition: fcs_vmg_p.h:35
FCSResult fcs_vmg_get_smoothing_steps(FCS handle, fcs_int *smoothing_steps)
Get the number of pre/postsmoothing steps on each level.
FCSResult fcs_vmg_get_precision(FCS handle, fcs_float *precision)
Get the precision of the vmg algorithm.
FCSResult fcs_vmg_get_interpolation_order(FCS handle, fcs_int *interpolation_order)
Get the interpolation order for interpolating the gridded potential to the particle positions...
FCSResult fcs_vmg_get_cycle_type(FCS handle, fcs_int *cycle_type)
Get the cycle_type-number of the multigrid cycle used.
FCSResult fcs_vmg_get_near_field_cells(FCS handle, fcs_int *near_field_cells)
Get the number of near field cells for separating the near/far field part of the potential.
FCSResult fcs_vmg_get_max_iterations(FCS handle, fcs_int *max_iterations)
Get the maximum number of multigrid iterations.
FCSResult fcs_vmg_get_max_level(FCS handle, fcs_int *max_level)
Get the maximum level of the multigrid algorithm.
FCSResult fcs_vmg_set_max_iterations(FCS handle, fcs_int max_iterations)
Set the maximum number of multigrid iterations.
FCSResult fcs_vmg_set_discretization_order(FCS handle, fcs_int discretization_order)
Set the discretization order.
void vmg_fcs_print_timer()
Print runtimes of various vmg subsystems.
public interface definitions for the FCSResult-object that is used for handling the return state of t...
struct FCSResult_t * FCSResult
FCSResult-object that is used for handling the return state of the ScaFaCoS library functions...
Definition: fcs_result_p.h:42
FCSResult fcs_vmg_set_cycle_type(FCS handle, fcs_int cycle_type)
Set the cycle_type-number of the multigrid cycle used.
FCSResult fcs_vmg_set_max_level(FCS handle, fcs_int max_level)
Set the maximum level of the multigrid algorithm.
public interface definitions for the main solver-independent functionality of the ScaFaCoS library ...
FCSResult fcs_vmg_set_near_field_cells(FCS handle, fcs_int near_field_cells)
Set the number of near field cells for separating the near/far field part of the potential.
FCSResult fcs_vmg_set_smoothing_steps(FCS handle, fcs_int smoothing_steps)
Set the number of pre/postsmoothing steps on each level.
FCSResult fcs_vmg_get_discretization_order(FCS handle, fcs_int *discretization_order)
Get the discretization order.
struct _FCS_t * FCS
FCS-object representing an FCS solver.