source: issm/oecreview/Archive/14312-15392/ISSM-14956-14957.diff@ 15393

Last change on this file since 15393 was 15393, checked in by Mathieu Morlighem, 12 years ago

NEW: adding Archive/14312-15392 for oecreview

File size: 3.7 KB
RevLine 
[15393]1Index: ../trunk-jpl/src/c/Container/Parameters.h
2===================================================================
3--- ../trunk-jpl/src/c/Container/Parameters.h (revision 14956)
4+++ ../trunk-jpl/src/c/Container/Parameters.h (revision 14957)
5@@ -11,8 +11,8 @@
6 class Vertices;
7 class Loads;
8 class Nodes;
9-class DataSet;
10 class Inputs;
11+#include "./DataSet.h"
12 #include "../shared/Numerics/types.h"
13
14 /*!\brief Declaration of Parameters class.
15Index: ../trunk-jpl/src/c/Container/DataSet.cpp
16===================================================================
17--- ../trunk-jpl/src/c/Container/DataSet.cpp (revision 14956)
18+++ ../trunk-jpl/src/c/Container/DataSet.cpp (revision 14957)
19@@ -285,30 +285,3 @@
20
21 return 1;
22 }/*}}}*/
23-template <class doubletype> DataSet* ExpRead(char* domainname){ /*{{{*/
24-
25- /*intermediary: */
26- int nprof;
27- int *profnvertices = NULL;
28- doubletype **pprofx = NULL;
29- doubletype **pprofy = NULL;
30-
31- /*output: */
32- DataSet *domain = NULL;
33-
34- /*If domainname is an empty string, return empty dataset*/
35- if (strcmp(domainname,"")==0){
36- nprof=0;
37- }
38- else{
39- ExpRead(&nprof,&profnvertices,&pprofx, &pprofy, NULL,domainname);
40- }
41-
42- /*now create dataset of contours: */
43- domain=new DataSet(0);
44-
45- for(int i=0;i<nprof;i++){
46- domain->AddObject(new Contour<doubletype>(i,profnvertices[i],pprofx[i],pprofy[i],1));
47- }
48- return domain;
49-} /*}}}*/
50Index: ../trunk-jpl/src/c/Container/DataSet.h
51===================================================================
52--- ../trunk-jpl/src/c/Container/DataSet.h (revision 14956)
53+++ ../trunk-jpl/src/c/Container/DataSet.h (revision 14957)
54@@ -2,6 +2,8 @@
55 #define _CONTAINER_DATASET_H_
56
57 #include <vector>
58+#include <cstring>
59+#include "../classes/objects/Contour.h"
60
61 /*forward declarations */
62 class Object;
63@@ -61,6 +63,32 @@
64
65 /*Methods that relate to datasets: */
66 int ExpWrite(DataSet* contours,char* domainname);
67-template <class doubletype> DataSet* ExpRead(char* domainname);
68+template <class doubletype> DataSet* ExpRead(char* domainname){ /*{{{*/
69
70+ /*intermediary: */
71+ int nprof;
72+ int *profnvertices = NULL;
73+ doubletype **pprofx = NULL;
74+ doubletype **pprofy = NULL;
75+
76+ /*output: */
77+ DataSet *domain = NULL;
78+
79+ /*If domainname is an empty string, return empty dataset*/
80+ if (strcmp(domainname,"")==0){
81+ nprof=0;
82+ }
83+ else{
84+ ExpRead(&nprof,&profnvertices,&pprofx, &pprofy, NULL,domainname);
85+ }
86+
87+ /*now create dataset of contours: */
88+ domain=new DataSet(0);
89+
90+ for(int i=0;i<nprof;i++){
91+ domain->AddObject(new Contour<doubletype>(i,profnvertices[i],pprofx[i],pprofy[i],1));
92+ }
93+ return domain;
94+} /*}}}*/
95+
96 #endif
97Index: ../trunk-jpl/src/c/toolkits/mpi/mpiincludes.h
98===================================================================
99--- ../trunk-jpl/src/c/toolkits/mpi/mpiincludes.h (revision 14956)
100+++ ../trunk-jpl/src/c/toolkits/mpi/mpiincludes.h (revision 14957)
101@@ -5,10 +5,19 @@
102 #ifndef _MPI_INCLUDES_H_
103 #define _MPI_INCLUDES_H_
104
105+#ifdef HAVE_CONFIG_H
106+ #include <config.h>
107+#else
108+#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
109+#endif
110+
111+#ifdef _HAVE_MPI_
112+
113 /*MPI includes: */
114 #include <mpi.h>
115
116 /*Patches: */
117 #include "./patches/mpipatches.h"
118+#endif
119
120 #endif
121Index: ../trunk-jpl/src/wrappers/matlab/io/FetchMatlabData.cpp
122===================================================================
123--- ../trunk-jpl/src/wrappers/matlab/io/FetchMatlabData.cpp (revision 14956)
124+++ ../trunk-jpl/src/wrappers/matlab/io/FetchMatlabData.cpp (revision 14957)
125@@ -9,6 +9,7 @@
126 #endif
127
128 #include "./matlabio.h"
129+#include "../../c/Container/Container.h"
130 #include "../../c/shared/shared.h"
131
132 /*Primitive data types*/
Note: See TracBrowser for help on using the repository browser.