Commit a39cb8f1 authored by thomas.forbriger's avatar thomas.forbriger

libseife [TASK]: increase array size in least solver

parent d53cb277
......@@ -7,8 +7,6 @@
* This algorithm was part of seife.f. A current version of seife.f can be
* obtained from http://www.software-for-seismometry.de/
*
* $Id$
*
* ----
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -32,13 +30,13 @@
* REVISIONS and CHANGES
* - 28/06/2005 V1.0 Thomas Forbriger
* - 15/11/2010 V1.1 do not use tfmacros.h
* - 22/06/2020 V1.2 increase array size to allow for more tidal
* frequencies
*
* ============================================================================
*/
#define TF_CSEIFE_GAUSS_C_VERSION \
"TF_CSEIFE_GAUSS_C V1.1"
#define TF_CSEIFE_GAUSS_C_CVSID \
"$Id$"
"TF_CSEIFE_GAUSS_C V1.2"
#include <cseife.h>
#include <stdio.h>
......@@ -51,6 +49,7 @@
the code was derived through f2c, but modified thereafter
*/
#define C_MSIZE 20
void seife_gauss(double *aik, int m, int n, double* rs, double* f)
{
/* System generated locals */
......@@ -58,15 +57,15 @@ void seife_gauss(double *aik, int m, int n, double* rs, double* f)
double d__1;
/* Local variables */
int imax[14];
double h__[15];
int imax[(C_MSIZE+1)];
double h__[(C_MSIZE+2)];
int j, k, l;
double q;
int index;
double aikmax;
SEIFE_CHECKERROR( m>13 , "seife_gauss", "matrix is too large" )
SEIFE_CHECKERROR( n>13 , "seife_gauss", "matrix is too large" )
SEIFE_CHECKERROR( m>C_MSIZE , "seife_gauss", "matrix is too large" )
SEIFE_CHECKERROR( n>C_MSIZE , "seife_gauss", "matrix is too large" )
/* solve linear equations */
/* Parameter adjustments */
--f;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment