Changeset 12377
- Timestamp:
- 06/07/12 08:01:49 (13 years ago)
- Location:
- issm/trunk-jpl/src/c
- Files:
-
- 2 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/Container/Observations.cpp
r12368 r12377 21 21 #include "../include/include.h" 22 22 #include "../EnumDefinitions/EnumDefinitions.h" 23 #include "../io/io.h" 23 24 24 25 using namespace std; … … 71 72 72 73 /*Initialize Quadtree*/ 73 printf("Generating quadtree with a maximum box size %g (depth=%i)... ",minlength,maxdepth);74 _printf_(true,"Generating quadtree with a maximum box size %g (depth=%i)... ",minlength,maxdepth); 74 75 this->quadtree = new Quadtree(xmin,xmax,ymin,ymax,maxdepth); 75 76 … … 101 102 } 102 103 } 103 printf("done\n");104 printf("Initial number of observations: %i\n",n);105 printf(" Final number of observations: %i\n",this->quadtree->NbObs);104 _printf_(true,"done\n"); 105 _printf_(true,"Initial number of observations: %i\n",n); 106 _printf_(true," Final number of observations: %i\n",this->quadtree->NbObs); 106 107 } 107 108 /*}}}*/ -
issm/trunk-jpl/src/c/Makefile.am
r12355 r12377 633 633 ./modules/Krigingx/Krigingx.h 634 634 635 #For parallel kriging, only difference is ./modules/Krigingx/pKrigingx.cpp with no multithreading 636 pkriging_sources = ./Container/Observations.h\ 637 ./Container/Observations.cpp\ 638 ./objects/Kriging/Variogram.h \ 639 ./objects/Kriging/GaussianVariogram.h\ 640 ./objects/Kriging/GaussianVariogram.cpp\ 641 ./objects/Kriging/ExponentialVariogram.h\ 642 ./objects/Kriging/ExponentialVariogram.cpp\ 643 ./objects/Kriging/SphericalVariogram.h\ 644 ./objects/Kriging/SphericalVariogram.cpp\ 645 ./objects/Kriging/PowerVariogram.h\ 646 ./objects/Kriging/PowerVariogram.cpp\ 647 ./objects/Kriging/Quadtree.h\ 648 ./objects/Kriging/Quadtree.cpp\ 649 ./objects/Kriging/Observation.h\ 650 ./objects/Kriging/Observation.cpp\ 651 ./modules/Krigingx/pKrigingx.cpp\ 652 ./modules/Krigingx/Krigingx.h 653 635 654 #}}} 636 655 #Kml sources {{{1 … … 964 983 965 984 libISSMCore_a_SOURCES = $(issm_sources) 985 libISSMCore_a_SOURCES += $(pkriging_sources) 966 986 libISSMCore_a_CXXFLAGS = $(ALLCXXFLAGS) 967 987 … … 1005 1025 issm_SOURCES = solutions/issm.cpp 1006 1026 issm_CXXFLAGS= -fPIC $(CXXFLAGS) $(CXXOPTFLAGS) $(COPTFLAGS) 1027 1028 bin_PROGRAMS += kriging 1029 kriging_SOURCES = solutions/kriging.cpp 1030 kriging_CXXFLAGS= -fPIC $(CXXFLAGS) $(CXXOPTFLAGS) $(COPTFLAGS) 1007 1031 #}}} 1008 1032 #Automatic differentiation: append this fold to the end of the src/c/Makefile.am to get this Makefile.am {{{ -
issm/trunk-jpl/src/c/io/Disk/diskio.h
r11202 r12377 10 10 #include "../../include/include.h" 11 11 12 class DataSet;13 class Parameters;14 15 12 FILE* pfopen(char* filename,const char* format); 16 13 void pfclose(FILE* fid,char* filename); -
issm/trunk-jpl/src/c/io/io.h
r12365 r12377 6 6 #define _ISSM_IO_H_ 7 7 8 #ifdef HAVE_CONFIG_H //config.h {{{8 #ifdef HAVE_CONFIG_H 9 9 #include <config.h> 10 10 #else 11 11 #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!" 12 12 #endif 13 //}}}14 15 13 #include "./Disk/diskio.h" 16 14 -
issm/trunk-jpl/src/c/issm.h
r9761 r12377 22 22 #include "./modules/modules.h" 23 23 24 25 24 #endif //ifndef _ISSM_H_ -
issm/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp
r12292 r12377 10 10 #include "../../Container/Observations.h" 11 11 #include "../modules.h" 12 13 12 #ifdef _HAVE_GSL_ 14 13 #include <gsl/gsl_linalg.h> 15 14 #endif 16 17 #include "../../objects/Kriging/GaussianVariogram.h"18 15 /*FUNCTION Krigingx{{{*/ 19 16 int Krigingx(double** ppredictions,double **perror,double* obs_x, double* obs_y, double* obs_list, int obs_length,double* x_interp,double* y_interp,int n_interp,Options* options){ -
issm/trunk-jpl/src/c/modules/Krigingx/Krigingx.h
r12292 r12377 13 13 14 14 int Krigingx(double** ppredictions,double **perror,double* x, double* y, double* observations, int n_obs,double* x_interp,double* y_interp,int n_interp,Options* options); 15 int pKrigingx(double** ppredictions,double **perror,double* x, double* y, double* observations, int n_obs,double* x_interp,double* y_interp,int n_interp,Options* options); 15 16 void ProcessVariogram(Variogram **pvariogram,Options* options); 16 17 void GslSolve(double** pX,double* A,double* B,int n); -
issm/trunk-jpl/src/c/modules/OutputResultsx/OutputResultsx.cpp
r12011 r12377 16 16 #include "../../objects/objects.h" 17 17 18 void OutputResultsx( 18 void OutputResultsx(Elements* elements, Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,Results* results){ 19 19 20 20 extern int my_rank; -
issm/trunk-jpl/src/c/objects/IoModel.cpp
r12365 r12377 71 71 IoModel::~IoModel(){ 72 72 73 delete this->constants;73 if(this->constants) delete this->constants; 74 74 75 75 /*Some checks in debugging mode*/ 76 76 #ifdef _ISSM_DEBUG_ 77 for(int i=0;i<MaximumNumberOfEnums;i++){ 78 if(this->data[i]){ 79 _printf_("Info: previous pointer of %s has not been freed (DeleteData has not been called)",EnumToStringx(i)); 77 if(this->data){ 78 for(int i=0;i<MaximumNumberOfEnums;i++){ 79 if(this->data[i]){ 80 _printf_("Info: previous pointer of %s has not been freed (DeleteData has not been called)",EnumToStringx(i)); 81 } 80 82 } 81 83 } … … 83 85 84 86 xfree((void**)&this->data); 85 86 87 xfree((void**)&this->my_elements); 87 88 xfree((void**)&this->my_nodes); … … 98 99 int record_enum = 0; 99 100 100 101 101 /*Check that some fields have been allocated*/ 102 102 _assert_(this->fid || my_rank); 103 104 103 105 104 /*Go find in the binary file, the position of the data we want to fetch: */ -
issm/trunk-jpl/src/c/objects/IoModel.h
r12322 r12377 18 18 19 19 private: 20 FILE *fid; //pointer to input file21 20 IssmDouble **data; //this dataset holds temporary data, memory intensive. 22 21 Parameters *constants; //this dataset holds all IssmDouble, int, bool and char *parameters read in from the input file.* … … 24 23 public: 25 24 /*This data needs to stay memory resident at all time, even if it's memory intensive: */ 25 FILE *fid; //pointer to input file 26 26 bool *my_elements; 27 27 bool *my_nodes;
Note:
See TracChangeset
for help on using the changeset viewer.