GRASS Programmer's Manual  6.4.2(2012)
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
N_les_pivot.c File Reference
#include <math.h>
#include <unistd.h>
#include <stdio.h>
#include <string.h>
#include "grass/N_pde.h"
#include "solvers_local_proto.h"
Include dependency graph for N_les_pivot.c:

Go to the source code of this file.

Macros

#define TINY   1.0e-20

Functions

int N_les_pivot_create (N_les *les)
 Optimize the structure of the linear equation system with a common pivoting strategy.

Macro Definition Documentation

#define TINY   1.0e-20

Definition at line 27 of file N_les_pivot.c.

Referenced by N_les_pivot_create().

Function Documentation

int N_les_pivot_create ( N_les les)

Optimize the structure of the linear equation system with a common pivoting strategy.

Create a optimized linear equation system for direct solvers: gauss and lu decomposition.

The rows are permuted based on the pivot elements.

This algorithm will modify the provided linear equation system and should only be used with the gauss elimination and lu decomposition solver.

Parameters
les* N_les – the linear equation system
Returns
int - the number of swapped rows

Definition at line 47 of file N_les_pivot.c.

References N_les::A, N_les::b, G_debug(), G_warning(), max, NULL, N_les::rows, gui_modules.psmap_dialogs::s, and TINY.

Referenced by N_solver_gauss(), and N_solver_lu().