Changeset 14633
- Timestamp:
- 04/17/13 14:15:21 (12 years ago)
- Location:
- issm/trunk-jpl/src/c
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/Makefile.am
r14632 r14633 61 61 ./classes/IssmComm.h\ 62 62 ./classes/IssmComm.cpp\ 63 ./classes/ToolkitOptions.h\ 64 ./classes/ToolkitOptions.cpp\ 63 65 ./classes/Hook.h\ 64 66 ./classes/Hook.cpp\ -
issm/trunk-jpl/src/c/classes/classes.h
r13634 r14633 32 32 #include "./AdolcEdf.h" 33 33 #include "./IssmComm.h" 34 #include "./ToolkitOptions.h" 34 35 #include "./RiftStruct.h" 35 36 -
issm/trunk-jpl/src/c/include/globals.h
r14292 r14633 3 3 */ 4 4 5 #ifndef GLOBALS_H_6 #define GLOBALS_H_5 #ifndef _GLOBALS_H_ 6 #define _GLOBALS_H_ 7 7 8 8 #include "./types.h" 9 9 #include "../classes/IssmComm.h" 10 #include "../classes/ToolkitOptions.h" 10 11 12 /*Communicators: */ 11 13 COMM IssmComm::comm; 12 14 bool IssmComm::parallel; 13 15 16 /*String that is used to characterize our toolkits, ends up in Petsc Options database if we use Petsc. Can also be used to characterize the ISSM toolkit, often used when Petsc is not allowed*/ 17 char* ToolkitOptions::toolkitoptions; 18 14 19 #endif -
issm/trunk-jpl/src/c/shared/Numerics/ToolkitsOptionsFromAnalysis.cpp
r14632 r14633 1 1 /*!\file: ToolkitsOptionsFromAnalysis.cpp 2 * \brief: this is mainly for the case where we run our toolkits using petsc. In this case, we need to 2 * \brief: for each analysis, setup the issmoptions string. 3 * This is mainly for the case where we run our toolkits using petsc. In this case, we need to 3 4 * plug our toolkits options directly into the petsc options database. This is the case for each analysis type 4 5 * and parameters … … 11 12 #endif 12 13 13 #include "../../classes/ objects/objects.h"14 #include "../../classes/classes.h" 14 15 #include "../../Container/Parameters.h" 15 16 #include "../../toolkits/toolkits.h" … … 17 18 void ToolkitsOptionsFromAnalysis(Parameters* parameters,int analysis_type){ 18 19 19 /*intermediary: */20 20 char* options=NULL; 21 21 22 22 /*Recover first the options string for this analysis: */ 23 23 options=OptionsFromAnalysis(parameters,analysis_type); 24 24 25 /* now, reset the petsc options database with this string. Taken from petsc/install/src/sys/objects/pinit.c. This26 *capability is not covered by Petsc!: */25 /*Initialize our Toolkit Options: */ 26 ToolkitOptions::Init(options); 27 27 28 28 #ifdef _HAVE_PETSC_ 29 /*In case we are using PETSC, we do not rely on issmoptions. Instead, we dump issmoptions into the Petsc 30 * options database: */ 29 31 30 #if _PETSC_MAJOR_ == 231 PetscOptionsDestroy();32 PetscOptionsCreate();33 //PetscOptionsCheckInitial_Private();34 //PetscOptionsCheckInitial_Components();35 PetscOptionsSetFromOptions();36 PetscOptionsInsertMultipleString(options); //our patch37 #else38 PetscOptionsSetFromOptions();39 PetscOptionsClear();40 //PetscOptionsSetFromOptions();41 PetscOptionsInsertMultipleString(options); //our patch42 #endif32 #if _PETSC_MAJOR_ == 2 33 PetscOptionsDestroy(); 34 PetscOptionsCreate(); 35 //PetscOptionsCheckInitial_Private(); 36 //PetscOptionsCheckInitial_Components(); 37 PetscOptionsSetFromOptions(); 38 PetscOptionsInsertMultipleString(options); //our patch 39 #else 40 PetscOptionsSetFromOptions(); 41 PetscOptionsClear(); 42 //PetscOptionsSetFromOptions(); 43 PetscOptionsInsertMultipleString(options); //our patch 44 #endif 43 45 44 46 #endif 45 46 /*Free ressources:*/ 47 47 48 xDelete<char>(options); 48 49 } -
issm/trunk-jpl/src/c/toolkits/toolkits.h
r13749 r14633 27 27 #include "./toolkitsenums.h" 28 28 #include "./issm/issmtoolkit.h" 29 #include "../classes/ToolkitOptions.h" 29 30 #endif
Note:
See TracChangeset
for help on using the changeset viewer.