Changeset 13185
- Timestamp:
- 08/30/12 06:59:13 (13 years ago)
- Location:
- issm/trunk-jpl/src/c
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/Makefile.am
r13129 r13185 136 136 ./classes/matrix/Vector.cpp\ 137 137 ./classes/objects/Params/Param.h\ 138 ./classes/objects/Params/GenericParam.h\ 138 139 ./classes/objects/Params/BoolParam.cpp\ 139 140 ./classes/objects/Params/BoolParam.h\ … … 196 197 ./shared/Matrix/matrix.h\ 197 198 ./shared/Matrix/MatrixUtils.cpp\ 199 ./shared/Numerics/adolc_edf.h\ 198 200 ./shared/Numerics/numerics.h\ 199 201 ./shared/Numerics/Verbosity.h\ -
issm/trunk-jpl/src/c/classes/objects/objects.h
r13129 r13185 112 112 113 113 /*Params: */ 114 #include "./Params/GenericParam.h" 114 115 #include "./Params/BoolParam.h" 115 116 #include "./Params/DoubleMatParam.h" -
issm/trunk-jpl/src/c/modules/Solverx/Solverx.h
r12988 r13185 27 27 void SolverxSeq(double** pX,double* A,double* B,int n); 28 28 29 #ifdef _HAVE_ADOLC_ 30 ADOLC_ext_fct EDF_for_solverx; 31 #endif 32 29 33 #endif /* _SOLVERX_H */ 30 34 -
issm/trunk-jpl/src/c/modules/Solverx/SolverxSeq.cpp
r13062 r13185 45 45 }/*}}}*/ 46 46 #ifdef _HAVE_ADOLC_ 47 48 int EDF_for_solverx(int n, IssmPDouble *x, int m, IssmPDouble *y) { 49 if(m*(m+1)!=n)_error_("Stiffness matrix should be square!"); 50 SolverxSeq(&y,x, x+m*m, m); 51 return 0; 52 } 53 47 54 void SolverxSeq(IssmDouble** pX,IssmDouble* A,IssmDouble* B,int n){//{{{ 48 55 /* if we use Adol-C then the IssmDouble will be an adouble … … 61 68 62 69 /*First, transfer from IssmDouble to double all our matrices and vectors: */ 63 pdoubleA=xNew< double>(n*n);64 pdoubleB=xNew< double>(n);70 pdoubleA=xNew<IssmPDouble>(n*n); 71 pdoubleB=xNew<IssmPDouble>(n); 65 72 for(i=0;i<n*n;i++)pdoubleA[i]=reCast<IssmPDouble>(A[i]); 66 73 for(i=0;i<n;i++)pdoubleB[i]=reCast<IssmPDouble>(B[i]); -
issm/trunk-jpl/src/c/solutions/issm.cpp
r13083 r13185 5 5 #include "../issm.h" 6 6 #include "../include/globals.h" 7 #include "../shared/Numerics/adolc_edf.h" 7 8 8 9 int main(int argc,char **argv){ … … 119 120 /*If running AD, then initialize the tape: */ 120 121 #ifdef _HAVE_ADOLC_ 122 GenericParam<Adolc_edf> *theAdolcEDF_p=new GenericParam<Adolc_edf>(AdolcParamEnum); 123 theAdolcEDF_p->GetParameterValue().myEDF_for_solverx_p=reg_ext_fct(EDF_for_solverx); 124 femmodel->parameters->AddObject(theAdolcEDF_p); 121 125 if(autodiff) trace_on(1); 122 126 #endif
Note:
See TracChangeset
for help on using the changeset viewer.