54 row = (
double * ) calloc( size,
sizeof(
double ) );
55 column = (
double * ) calloc( size,
sizeof(
double ) );
98 if ( i < start || i >=
number ) {
108 int n, i, j, c, first =
start;
116 for ( i = 1; i <= n; i++ ) {
117 if ( ( first = loc.
at(i) ) ) {
123 for ( j = i + 1; j <= n; j++ ) {
124 if ( ( c = loc.
at(j) ) ) {
125 first =
min(c, first);
130 if ( first <
start && first ) {
144 i = last - first + 1;
156 answer += *p1++ * *p2++ ;
170 int newSize, size, i;
171 double *newRow, *newColumn, *p1, *p2;
173 if ( newStart ==
start ) {
178 if ( newStart <= 0 || newStart >
start ) {
179 OOFEM_ERROR(
"cannot enlarge RowCol %d (start=%d) to %d",
number, start, newStart);
184 newSize =
number - newStart;
185 newRow = (
double * ) calloc( newSize,
sizeof(
double ) );
186 newColumn = (
double * ) calloc( newSize,
sizeof(
double ) );
187 if ( !newRow || !newColumn ) {
194 p2 = newRow + ( start - newStart );
203 p2 = newColumn + ( start - newStart );
221 printf(
"Row-column %d : start = %d, diag = %.5f\n col : ",
224 printf(
" % .5f",
column [ i ]);
229 printf(
" % .5f",
row [ i ]);
244 for (
int i = 0; i < size; i++ ) {
255 double *newRow, *newColumn, *p1, *p2;
259 newRow = (
double * ) malloc( size *
sizeof(
double ) );
260 newColumn = (
double * ) malloc( size *
sizeof(
double ) );
261 if ( !newRow || !newColumn ) {
279 newRow = newColumn = NULL;
289 this->
start = istart;
void checkSizeTowards(const IntArray &)
This class implements a segment of a unsymmetric matrix stored in segmented form (skyline).
Class implementing an array of integers.
int & at(int i)
Coefficient access function.
Class representing vector of real numbers.
double dot(const FloatArray &, char, int, int)
const double * givePointer() const
Gives the pointer to the raw data, breaking encapsulation.
int min(int i, int j)
Returns smaller value from two given decimals.
the oofem namespace is to define a context or scope in which all oofem names are defined.