Changeset 19563
- Timestamp:
- 09/19/15 14:51:32 (10 years ago)
- Location:
- issm/trunk-jpl/src/c/shared/Matrix
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/shared/Matrix/MatrixUtils.cpp
r19554 r19563 9 9 #include <math.h> 10 10 #include <float.h> /* DBL_EPSILON */ 11 #include <cstdarg> 12 #include <iostream> 11 13 12 14 #include "./matrix.h" 13 15 #include "../Exceptions/exceptions.h" 14 16 #include "../MemOps/MemOps.h" 17 #include "../io/io.h" 15 18 /*}}}*/ 16 19 … … 627 630 *pcell=newcell; 628 631 } /*}}}*/ 632 void cellecho(int numcells, int m, ...) { /*{{{*/ 633 634 va_list arguments; 635 IssmDouble** celllist= NULL; 636 637 /*allocate variable length array: */ 638 celllist=xNew<IssmDouble*>(numcells); 639 640 va_start(arguments,m); 641 642 for ( int x = 0; x < numcells; x++ ){ 643 celllist[x]= va_arg ( arguments, IssmDouble*); 644 } 645 va_end ( arguments ); 646 647 _printf_("Echo of cell: \n"); 648 for(int i=0;i<m;i++){ 649 _printf_(i << ": "); 650 for (int j=0;j<numcells;j++)_printf_(celllist[j][i] << " "); 651 _printf_("\n"); 652 } 653 654 /*deallocate:*/ 655 xDelete<IssmDouble*>(celllist); 656 657 } /*}}}*/ -
issm/trunk-jpl/src/c/shared/Matrix/matrix.h
r19554 r19563 29 29 IssmDouble cellsum(IssmDouble* cell, int m); 30 30 void celldelete(IssmDouble** pcell, int m, int* indices, int nind); 31 void cellsplit(IssmDouble** pcell, int m, int i,IssmDouble scale) ; 31 void cellsplit(IssmDouble** pcell, int m, int i,IssmDouble scale); 32 void cellecho(int numcells, int m, ...); 32 33 #endif //ifndef _MATRIXUTILS_H_
Note:
See TracChangeset
for help on using the changeset viewer.