Fixed some issues occuring using 1 level only and special smoothers
This commit is contained in:
parent
935c2090c6
commit
ca904c2246
@ -185,6 +185,11 @@ HYPRE_Int hypre_BoomerAMGBlockRelax( hypre_ParCSRBlockMatrix *A,
|
||||
out_vec = hypre_CTAlloc(HYPRE_Real, block_size);
|
||||
tmp_vec = hypre_CTAlloc(HYPRE_Real, block_size);
|
||||
|
||||
if (!comm_pkg)
|
||||
{
|
||||
hypre_BlockMatvecCommPkgCreate(A);
|
||||
comm_pkg = hypre_ParCSRBlockMatrixCommPkg(A);
|
||||
}
|
||||
/*-----------------------------------------------------------------------
|
||||
* Switch statement to direct control based on relax_type:
|
||||
* relax_type = 20 -> Jacobi or CF-Jacobi
|
||||
|
||||
@ -537,8 +537,6 @@ hypre_BoomerAMGDestroy( void *data )
|
||||
}
|
||||
if (smooth_num_levels)
|
||||
{
|
||||
if (smooth_num_levels > num_levels-1)
|
||||
smooth_num_levels = num_levels -1;
|
||||
if (hypre_ParAMGDataSmoothType(amg_data) == 7)
|
||||
{
|
||||
for (i=0; i < smooth_num_levels; i++)
|
||||
|
||||
@ -2065,7 +2065,7 @@ hypre_BoomerAMGSetup( void *amg_vdata,
|
||||
num_levels = level+1;
|
||||
hypre_ParAMGDataNumLevels(amg_data) = num_levels;
|
||||
if (hypre_ParAMGDataSmoothNumLevels(amg_data) > num_levels-1)
|
||||
hypre_ParAMGDataSmoothNumLevels(amg_data) = num_levels-1;
|
||||
hypre_ParAMGDataSmoothNumLevels(amg_data) = num_levels;
|
||||
smooth_num_levels = hypre_ParAMGDataSmoothNumLevels(amg_data);
|
||||
|
||||
/*-----------------------------------------------------------------------
|
||||
|
||||
@ -1083,6 +1083,15 @@ hypre_BoomerAMGSetupStats( void *amg_vdata,
|
||||
for (j=0; j < smooth_num_levels; j++)
|
||||
hypre_printf( " Schwarz Relaxation Weight %f level %d\n",
|
||||
hypre_ParAMGDataSchwarzRlxWeight(amg_data),j);
|
||||
if (smooth_type == 7)
|
||||
for (j=0; j < smooth_num_levels; j++)
|
||||
hypre_printf( " Pilut smoother level %d\n", j);
|
||||
if (smooth_type == 8)
|
||||
for (j=0; j < smooth_num_levels; j++)
|
||||
hypre_printf( " ParaSails smoother level %d\n", j);
|
||||
if (smooth_type == 9)
|
||||
for (j=0; j < smooth_num_levels; j++)
|
||||
hypre_printf( " Euclid smoother level %d\n", j);
|
||||
for (j=0; j < num_levels; j++)
|
||||
if (relax_weight[j] != 1)
|
||||
hypre_printf( " Relaxation Weight %f level %d\n",relax_weight[j],j);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user