main
|
Last change
on this file was ea777aa, checked in by Alex Wilton <awilton@…>, 3 years ago |
|
Moved examples, include, build_default.properties, common.xml, and README out from dev.civl.com into the root of the repo.
git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@5704 fb995dde-84ed-4084-dfe6-e5aef3e2452c
|
-
Property mode
set to
100644
|
|
File size:
3.1 KB
|
| Line | |
|---|
| 1 | /*BHEADER**********************************************************************
|
|---|
| 2 | * Copyright (c) 2008, Lawrence Livermore National Security, LLC.
|
|---|
| 3 | * Produced at the Lawrence Livermore National Laboratory.
|
|---|
| 4 | * This file is part of HYPRE. See file COPYRIGHT for details.
|
|---|
| 5 | *
|
|---|
| 6 | * HYPRE is free software; you can redistribute it and/or modify it under the
|
|---|
| 7 | * terms of the GNU Lesser General Public License (as published by the Free
|
|---|
| 8 | * Software Foundation) version 2.1 dated February 1999.
|
|---|
| 9 | *
|
|---|
| 10 | * $Revision: 2.4 $
|
|---|
| 11 | ***********************************************************************EHEADER*/
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 | /******************************************************************************
|
|---|
| 17 | *
|
|---|
| 18 | * Relaxation scheme
|
|---|
| 19 | *
|
|---|
| 20 | *****************************************************************************/
|
|---|
| 21 |
|
|---|
| 22 | #include "headers.h"
|
|---|
| 23 |
|
|---|
| 24 |
|
|---|
| 25 | /*--------------------------------------------------------------------------
|
|---|
| 26 | * hypre_BoomerAMGRelax
|
|---|
| 27 | *--------------------------------------------------------------------------*/
|
|---|
| 28 |
|
|---|
| 29 | int hypre_BoomerAMGRelaxIF( hypre_ParCSRMatrix *A,
|
|---|
| 30 | hypre_ParVector *f,
|
|---|
| 31 | int *cf_marker,
|
|---|
| 32 | int relax_type,
|
|---|
| 33 | int relax_order,
|
|---|
| 34 | int cycle_type,
|
|---|
| 35 | double relax_weight,
|
|---|
| 36 | double omega,
|
|---|
| 37 | double *l1_norms,
|
|---|
| 38 | hypre_ParVector *u,
|
|---|
| 39 | hypre_ParVector *Vtemp,
|
|---|
| 40 | hypre_ParVector *Ztemp )
|
|---|
| 41 | {
|
|---|
| 42 | int i, Solve_err_flag = 0;
|
|---|
| 43 | int relax_points[2];
|
|---|
| 44 | if (relax_order == 1 && cycle_type < 3)
|
|---|
| 45 | {
|
|---|
| 46 | if (cycle_type < 2)
|
|---|
| 47 | {
|
|---|
| 48 | relax_points[0] = 1;
|
|---|
| 49 | relax_points[1] = -1;
|
|---|
| 50 | }
|
|---|
| 51 | else
|
|---|
| 52 | {
|
|---|
| 53 | relax_points[0] = -1;
|
|---|
| 54 | relax_points[1] = 1;
|
|---|
| 55 | }
|
|---|
| 56 |
|
|---|
| 57 | {
|
|---|
| 58 | for (i=0; i < 2; i++)
|
|---|
| 59 | Solve_err_flag = hypre_BoomerAMGRelax(A,
|
|---|
| 60 | f,
|
|---|
| 61 | cf_marker,
|
|---|
| 62 | relax_type,
|
|---|
| 63 | relax_points[i],
|
|---|
| 64 | relax_weight,
|
|---|
| 65 | omega,
|
|---|
| 66 | l1_norms,
|
|---|
| 67 | u,
|
|---|
| 68 | Vtemp, Ztemp);
|
|---|
| 69 | }
|
|---|
| 70 | }
|
|---|
| 71 | else
|
|---|
| 72 | {
|
|---|
| 73 |
|
|---|
| 74 | Solve_err_flag = hypre_BoomerAMGRelax(A,
|
|---|
| 75 | f,
|
|---|
| 76 | cf_marker,
|
|---|
| 77 | relax_type,
|
|---|
| 78 | 0,
|
|---|
| 79 | relax_weight,
|
|---|
| 80 | omega,
|
|---|
| 81 | l1_norms,
|
|---|
| 82 | u,
|
|---|
| 83 | Vtemp, Ztemp);
|
|---|
| 84 | }
|
|---|
| 85 |
|
|---|
| 86 | return Solve_err_flag;
|
|---|
| 87 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.