Changeset 14953
- Timestamp:
- 05/07/13 22:35:09 (12 years ago)
- Location:
- issm/trunk-jpl/src/c
- Files:
-
- 1 added
- 3 deleted
- 26 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/Container/Constraints.cpp
r14917 r14953 11 11 #endif 12 12 13 #include <vector> 14 #include <functional> 15 #include <algorithm> 16 #include <iostream> 17 18 #include "./DataSet.h" 19 #include "../shared/shared.h" 20 #include "../EnumDefinitions/EnumDefinitions.h" 13 #include "./Constraints.h" 14 #include "../shared/io/Print/Print.h" 15 #include "../toolkits/mpi/mpiincludes.h" 21 16 22 17 using namespace std; 23 18 /*}}}*/ 24 19 25 /*Object constructors and destructor*/26 /*FUNCTION Constraints::Constraints(){{{*/27 Constraints::Constraints(){28 enum_type=ConstraintsEnum;29 return;30 }31 /*}}}*/32 /*FUNCTION Constraints::~Constraints(){{{*/33 Constraints::~Constraints(){34 return;35 }36 /*}}}*/37 20 38 21 /*Numerics: */ -
issm/trunk-jpl/src/c/Container/Constraints.h
r14476 r14953 3 3 4 4 /*forward declarations */ 5 #include "./DataSet.h" 5 6 class Materials; 6 7 class Parameters; … … 9 10 class Loads; 10 11 class Nodes; 11 class DataSet;12 12 class Inputs; 13 14 #include "../EnumDefinitions/EnumDefinitions.h" 13 15 14 16 /*! \brief Declaration of Constraints class. … … 21 23 public: 22 24 23 /*constructors, destructors*/ 24 Constraints(); 25 ~Constraints(); 25 /*Object constructors and destructor*/ 26 /*FUNCTION Constraints::Constraints(){{{*/ 27 Constraints(){ 28 enum_type=ConstraintsEnum; 29 return; 30 } 31 /*}}}*/ 32 /*FUNCTION Constraints::~Constraints(){{{*/ 33 ~Constraints(){ 34 return; 35 } 36 /*}}}*/ 37 26 38 27 39 /*numerics*/ -
issm/trunk-jpl/src/c/Container/DataSet.cpp
r14950 r14953 251 251 } 252 252 /*}}}*/ 253 254 /*Routines that relate to datasets, but which are not methods: */ 255 int ExpWrite(DataSet* contours,char* domainname){/*{{{*/ 256 257 /*I/O: */ 258 FILE* fid=NULL; 259 Contour<double>* contour = NULL; 260 261 /*open domain outline file for writing: */ 262 if((fid=fopen(domainname,"w"))==NULL) _error_("could not open domain file " << domainname); 263 264 for(int counter=0;counter<contours->Size();counter++){ 265 contour=(Contour<double>*)contours->GetObjectByOffset(counter); 266 267 /*Write header: */ 268 fprintf(fid,"## Name:%s\n",domainname); 269 fprintf(fid,"## Icon:0\n"); 270 fprintf(fid,"# Points Count Value\n"); 271 fprintf(fid,"%u %s\n",contour->nods ,"1."); 272 fprintf(fid,"# X pos Y pos\n"); 273 274 /*Write vertices: */ 275 for(int i=0;i<contour->nods;i++){ 276 fprintf(fid,"%lf\t%lf\n",contour->x[i],contour->y[i]); 277 } 278 279 /*Write blank line: */ 280 if(counter<contours->Size()-1) fprintf(fid,"\n"); 281 } 282 283 /*close Exp file: */ 284 fclose(fid); 285 286 return 1; 287 }/*}}}*/ 288 template <class doubletype> DataSet* ExpRead(char* domainname){ /*{{{*/ 289 290 /*intermediary: */ 291 int nprof; 292 int *profnvertices = NULL; 293 doubletype **pprofx = NULL; 294 doubletype **pprofy = NULL; 295 296 /*output: */ 297 DataSet *domain = NULL; 298 299 /*If domainname is an empty string, return empty dataset*/ 300 if (strcmp(domainname,"")==0){ 301 nprof=0; 302 } 303 else{ 304 ExpRead(&nprof,&profnvertices,&pprofx, &pprofy, NULL,domainname); 305 } 306 307 /*now create dataset of contours: */ 308 domain=new DataSet(0); 309 310 for(int i=0;i<nprof;i++){ 311 domain->AddObject(new Contour<doubletype>(i,profnvertices[i],pprofx[i],pprofy[i],1)); 312 } 313 return domain; 314 } /*}}}*/ -
issm/trunk-jpl/src/c/Container/DataSet.h
r14903 r14953 60 60 }; 61 61 62 /*Methods that relate to datasets: */ 63 int ExpWrite(DataSet* contours,char* domainname); 64 template <class doubletype> DataSet* ExpRead(char* domainname); 65 62 66 #endif -
issm/trunk-jpl/src/c/Container/Elements.cpp
r14951 r14953 11 11 #endif 12 12 13 #include <vector> 14 #include <functional> 15 #include <algorithm> 16 #include <iostream> 17 18 #include "./DataSet.h" 19 #include "../shared/shared.h" 13 #include "./Elements.h" 14 #include "./Parameters.h" 15 #include "../classes/classes.h" 20 16 #include "../EnumDefinitions/EnumDefinitions.h" 21 #include "../classes/objects/Elements/Element.h" 22 #include "../classes/objects/ExternalResults/GenericExternalResult.h" 23 #include "../classes/Patch.h" 24 #include "../classes/toolkits/Vector.h" 17 25 18 26 19 using namespace std; -
issm/trunk-jpl/src/c/Container/Elements.h
r14476 r14953 3 3 4 4 /*forward declarations */ 5 #include "./DataSet.h" 5 6 class Materials; 6 7 class Parameters; … … 9 10 class Loads; 10 11 class Nodes; 11 class DataSet;12 12 class Inputs; 13 13 -
issm/trunk-jpl/src/c/Container/Inputs.cpp
r14951 r14953 11 11 #endif 12 12 13 #include <vector> 14 #include <functional> 15 #include <algorithm> 16 #include <iostream> 17 18 #include "./DataSet.h" 13 #include "./Inputs.h" 14 #include "../classes/objects/Inputs/Input.h" 19 15 #include "../shared/shared.h" 20 16 #include "../EnumDefinitions/EnumDefinitions.h" 21 #include "../classes/objects/Inputs/Input.h"22 17 23 18 using namespace std; -
issm/trunk-jpl/src/c/Container/Inputs.h
r14951 r14953 4 4 /*forward declarations */ 5 5 class Parameters; 6 class DataSet;7 6 class Input; 7 #include "./DataSet.h" 8 8 #include "../shared/Numerics/types.h" 9 9 -
issm/trunk-jpl/src/c/Container/Materials.cpp
r14951 r14953 11 11 #endif 12 12 13 #include <vector> 14 #include <functional> 15 #include <algorithm> 16 #include <iostream> 17 18 #include "./DataSet.h" 13 #include "./Materials.h" 19 14 #include "../shared/shared.h" 20 15 #include "../EnumDefinitions/EnumDefinitions.h" -
issm/trunk-jpl/src/c/Container/Materials.h
r14476 r14953 3 3 4 4 /*forward declarations */ 5 #include "./DataSet.h" 5 6 class Parameters; 6 7 class Elements; … … 8 9 class Loads; 9 10 class Nodes; 10 class DataSet;11 11 class Inputs; 12 12 -
issm/trunk-jpl/src/c/Container/Nodes.cpp
r14951 r14953 11 11 #endif 12 12 13 #include <vector> 14 #include <functional> 15 #include <algorithm> 16 #include <iostream> 17 18 #include "./DataSet.h" 13 #include "./Nodes.h" 19 14 #include "../shared/shared.h" 20 15 #include "../EnumDefinitions/EnumDefinitions.h" -
issm/trunk-jpl/src/c/Container/Nodes.h
r14903 r14953 2 2 #define _CONTAINER_NODES_H_ 3 3 4 class DataSet; 4 #include "./DataSet.h" 5 5 6 6 /*!\brief Declaration of Nodes class. -
issm/trunk-jpl/src/c/Container/Parameters.h
r14476 r14953 14 14 class DataSet; 15 15 class Inputs; 16 #include "../shared/Numerics/types.h" 16 17 17 18 /*!\brief Declaration of Parameters class. -
issm/trunk-jpl/src/c/Container/Results.cpp
r14951 r14953 11 11 #endif 12 12 13 #include <vector> 14 #include <functional> 15 #include <algorithm> 16 #include <iostream> 17 18 #include "./DataSet.h" 13 #include "./Results.h" 14 #include "./Parameters.h" 19 15 #include "../shared/shared.h" 20 16 #include "../EnumDefinitions/EnumDefinitions.h" -
issm/trunk-jpl/src/c/Container/Results.h
r14476 r14953 1 1 #ifndef _CONTAINER_RESULTS_H_ 2 2 #define _CONTAINER_RESULTS_H_ 3 4 #include "./DataSet.h" 3 5 4 6 /*forward declarations */ … … 9 11 class Loads; 10 12 class Nodes; 11 class DataSet;12 13 class Inputs; 13 14 -
issm/trunk-jpl/src/c/Makefile.am
r14951 r14953 787 787 ./shared/Threads/PartitionRange.cpp\ 788 788 ./shared/Exp/exp.h\ 789 ./shared/Exp/IsInPoly.cpp\ 790 ./shared/Exp/IsInPolySerial.cpp\ 791 ./shared/Exp/ExpWrite.cpp\ 789 ./shared/Exp/exp.cpp\ 792 790 ./shared/TriMesh/trimesh.h\ 793 791 ./shared/TriMesh/AssociateSegmentToElement.cpp\ -
issm/trunk-jpl/src/c/classes/objects/Elements/Element.h
r14951 r14953 29 29 30 30 virtual void Configure(Elements* elements,Loads* loads,Nodes* nodes,Vertices* vertices,Materials* materials,Parameters* parameters)=0; 31 virtual void SetCurrentConfiguration(Elements* elements,Loads* loads, DataSet* nodes,Materials* materials,Parameters* parameters)=0;31 virtual void SetCurrentConfiguration(Elements* elements,Loads* loads,Nodes* nodes,Materials* materials,Parameters* parameters)=0; 32 32 virtual void SetwiseNodeConnectivity(int* d_nz,int* o_nz,Node* node,bool* flags,int set1_enum,int set2_enum)=0; 33 33 virtual void CreateKMatrix(Matrix<IssmDouble>* Kff, Matrix<IssmDouble>* Kfs)=0; -
issm/trunk-jpl/src/c/classes/objects/Elements/Penta.cpp
r14923 r14953 2751 2751 /*}}}*/ 2752 2752 /*FUNCTION Penta::SetCurrentConfiguration {{{*/ 2753 void Penta::SetCurrentConfiguration(Elements* elementsin, Loads* loadsin, DataSet* nodesin, Materials* materialsin, Parameters* parametersin){2753 void Penta::SetCurrentConfiguration(Elements* elementsin, Loads* loadsin, Nodes* nodesin, Materials* materialsin, Parameters* parametersin){ 2754 2754 2755 2755 int analysis_counter; -
issm/trunk-jpl/src/c/classes/objects/Elements/Penta.h
r14917 r14953 79 79 void ComputeStressTensor(); 80 80 void Configure(Elements* elements,Loads* loads,Nodes* nodes,Vertices* vertices,Materials* materials,Parameters* parameters); 81 void SetCurrentConfiguration(Elements* elements,Loads* loads, DataSet* nodes,Materials* materials,Parameters* parameters);81 void SetCurrentConfiguration(Elements* elements,Loads* loads,Nodes* nodes,Materials* materials,Parameters* parameters); 82 82 void SetwiseNodeConnectivity(int* d_nz,int* o_nz,Node* node,bool* flags,int set1_enum,int set2_enum); 83 83 void CreateKMatrix(Matrix<IssmDouble>* Kff, Matrix<IssmDouble>* Kfs); -
issm/trunk-jpl/src/c/classes/objects/Elements/Tria.cpp
r14928 r14953 2532 2532 /*}}}*/ 2533 2533 /*FUNCTION Tria::SetCurrentConfiguration {{{*/ 2534 void Tria::SetCurrentConfiguration(Elements* elementsin, Loads* loadsin, DataSet* nodesin, Materials* materialsin, Parameters* parametersin){2534 void Tria::SetCurrentConfiguration(Elements* elementsin, Loads* loadsin, Nodes* nodesin, Materials* materialsin, Parameters* parametersin){ 2535 2535 2536 2536 /*go into parameters and get the analysis_counter: */ -
issm/trunk-jpl/src/c/classes/objects/Elements/Tria.h
r14917 r14953 75 75 void ComputeStressTensor(); 76 76 void Configure(Elements* elements,Loads* loads,Nodes* nodesin,Vertices* verticesin,Materials* materials,Parameters* parameters); 77 void SetCurrentConfiguration(Elements* elements,Loads* loads, DataSet* nodes,Materials* materials,Parameters* parameters);77 void SetCurrentConfiguration(Elements* elements,Loads* loads,Nodes* nodes,Materials* materials,Parameters* parameters); 78 78 void SetwiseNodeConnectivity(int* d_nz,int* o_nz,Node* node,bool* flags,int set1_enum,int set2_enum); 79 79 void CreateKMatrix(Matrix<IssmDouble>* Kff, Matrix<IssmDouble>* Kfs); -
issm/trunk-jpl/src/c/classes/objects/Inputs/Input.h
r14951 r14953 14 14 class Parameters; 15 15 class GaussPenta; 16 template <class doubletype> class Vector; 16 17 /*}}}*/ 18 17 19 18 20 class Input: public Object{ -
issm/trunk-jpl/src/c/classes/objects/Materials/Material.h
r14951 r14953 8 8 /*Headers:*/ 9 9 /*{{{*/ 10 class Object; 10 class Inputs; 11 template <class doubletype> class Vector; 11 12 #include "../Object.h" 12 13 #include "../../Update.h" 13 #include "../../../toolkits/toolkits.h"14 14 /*}}}*/ 15 15 -
issm/trunk-jpl/src/c/classes/objects/Profiler.cpp
r14951 r14953 12 12 #include "./Profiler.h" 13 13 #include "./Params/DoubleParam.h" 14 #include "../../Container/Parameters.h" 14 15 /*}}}*/ 15 16 -
issm/trunk-jpl/src/c/modules/ModelProcessorx/ModelProcessorx.h
r14950 r14953 8 8 #define RIFTINFOSIZE 12 9 9 10 class DataSet; 11 class IoModel; 12 class Parameters; 13 class DofIndexing; 10 #include "../../Container/Container.h" 11 #include "../../classes/classes.h" 14 12 15 #include "../../shared/io/io.h"16 13 17 14 void ModelProcessorx(Elements** pelements, Nodes** pnodes, Vertices** pvertices, Materials** pmaterials, Constraints** pconstraints, Loads** ploads, Parameters** pparameters, FILE* iomodel_handle,char* rootpath,const int solution_type,const int nummodels,const int* analysis_type_listh); -
issm/trunk-jpl/src/c/shared/Exp/exp.h
r14680 r14953 7 7 8 8 #include <cstring> 9 #include "../../classes/objects/Contour.h" 10 #include "../../shared/Numerics/recast.h" 11 #include "../../Container/Container.h" 9 #include "../Numerics/recast.h" 12 10 #include "../../toolkits/toolkits.h" 13 11 14 12 int IsInPolySerial(double* in,double* xc,double* yc,int numvertices,double* x,double* y,int nods, int edgevalue); 15 13 int ExpWrite(int nprof,int* profnvertices,double** pprofx,double** pprofy,char* domainname); 16 int ExpWrite(DataSet* contours,char* domainname);17 14 int pnpoly(int npol, double *xp, double *yp, double x, double y, int edgevalue); 18 15 19 /*IsInPoly {{{*/ 20 template <class doubletype> 21 int IsInPoly(IssmSeqVec<doubletype>* in,double* xc,double* yc,int numvertices,double* x,double* y,int i0,int i1, int edgevalue){ 16 template <class doubletype> int IsInPoly(IssmSeqVec<doubletype>* in,double* xc,double* yc,int numvertices,double* x,double* y,int i0,int i1, int edgevalue){ /*{{{*/ 22 17 23 18 int i; … … 59 54 return 1; 60 55 }/*}}}*/ 61 /*int ExpRead(int* pnprof,int** pprofnvertices,doubletype*** ppprofx,doubletype*** ppprofy,bool** pclosed,char* domainname){{{*/ 62 template <class doubletype> 63 int ExpRead(int* pnprof,int** pprofnvertices,doubletype*** ppprofx,doubletype*** ppprofy,bool** pclosed,char* domainname){ 56 template <class doubletype> int ExpRead(int* pnprof,int** pprofnvertices,doubletype*** ppprofx,doubletype*** ppprofy,bool** pclosed,char* domainname){ /*{{{*/ 64 57 65 58 /*indexing: */ … … 178 171 179 172 } /*}}}*/ 180 /*DataSet* ExpRead(char* domainname){{{*/181 template <class doubletype>182 DataSet* ExpRead(char* domainname){183 184 /*intermediary: */185 int nprof;186 int *profnvertices = NULL;187 doubletype **pprofx = NULL;188 doubletype **pprofy = NULL;189 190 /*output: */191 DataSet *domain = NULL;192 193 /*If domainname is an empty string, return empty dataset*/194 if (strcmp(domainname,"")==0){195 nprof=0;196 }197 else{198 ExpRead(&nprof,&profnvertices,&pprofx, &pprofy, NULL,domainname);199 }200 201 /*now create dataset of contours: */202 domain=new DataSet(0);203 204 for(int i=0;i<nprof;i++){205 domain->AddObject(new Contour<doubletype>(i,profnvertices[i],pprofx[i],pprofy[i],1));206 }207 return domain;208 } /*}}}*/209 173 210 174 #endif
Note:
See TracChangeset
for help on using the changeset viewer.