Changeset 13939
- Timestamp:
- 11/12/12 13:34:54 (12 years ago)
- Location:
- issm/trunk-jpl/src/c
- Files:
-
- 1 deleted
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/Makefile.am
r13936 r13939 299 299 ./modules/StringToEnumx/StringToEnumx.cpp\ 300 300 ./modules/StringToEnumx/StringToEnumx.h\ 301 ./modules/CreateJacobianMatrixx/CreateJacobianMatrixx.cpp\302 ./modules/CreateJacobianMatrixx/CreateJacobianMatrixx.h\303 301 ./modules/ConstraintsStatex/ConstraintsStatex.cpp\ 304 302 ./modules/ConstraintsStatex/ConstraintsStatex.h\ -
issm/trunk-jpl/src/c/classes/FemModel.cpp
r13938 r13939 353 353 Vector<IssmDouble> *df = NULL; 354 354 355 bool oldalloc= false;355 bool oldalloc=true; 356 356 357 357 /*retrieve parameters: */ … … 538 538 539 539 /*sum over all cpus*/ 540 540 #ifdef _HAVE_MPI_ 541 541 MPI_Allreduce((void*)connectivity_clone,(void*)all_connectivity_clone,numnodes,MPI_INT,MPI_SUM,IssmComm::GetComm()); 542 542 #endif 543 543 xDelete<int>(connectivity_clone); 544 544 … … 572 572 *pd_nnz=d_nnz; 573 573 *po_nnz=o_nnz; 574 575 }/*}}}*/ 576 void FemModel::CreateJacobianMatrixx(Matrix<IssmDouble>** pJff,IssmDouble kmax){/*{{{*/ 577 578 int i,connectivity; 579 int numberofdofspernode; 580 int fsize,configuration_type; 581 Element *element = NULL; 582 Load *load = NULL; 583 Matrix<IssmDouble>* Jff = NULL; 584 585 /*Checks*/ 586 _assert_(nodes && elements); 587 588 /*Recover some parameters*/ 589 parameters->FindParam(&configuration_type,ConfigurationTypeEnum); 590 parameters->FindParam(&connectivity,MeshAverageVertexConnectivityEnum); 591 fsize=nodes->NumberOfDofs(configuration_type,FsetEnum); 592 numberofdofspernode=nodes->MaxNumDofs(configuration_type,GsetEnum); 593 594 /*Initialize Jacobian Matrix*/ 595 this->AllocateSystemMatrices(&Jff,NULL,NULL,NULL); 596 Jff=new Matrix<IssmDouble>(fsize,fsize,connectivity,numberofdofspernode); 597 598 /*Create and assemble matrix*/ 599 for(i=0;i<elements->Size();i++){ 600 element=dynamic_cast<Element*>(elements->GetObjectByOffset(i)); 601 element->CreateJacobianMatrix(Jff); 602 } 603 for (i=0;i<loads->Size();i++){ 604 load=(Load*)loads->GetObjectByOffset(i); 605 if(load->InAnalysis(configuration_type)) load->CreateJacobianMatrix(Jff); 606 if(load->InAnalysis(configuration_type)) load->PenaltyCreateJacobianMatrix(Jff,kmax); 607 } 608 Jff->Assemble(); 609 610 /*Assign output pointer*/ 611 *pJff=Jff; 574 612 575 613 }/*}}}*/ -
issm/trunk-jpl/src/c/classes/FemModel.h
r13881 r13939 53 53 /*Methods:*/ 54 54 void AllocateSystemMatrices(Matrix<IssmDouble>** pKff,Matrix<IssmDouble>** pKfs,Vector<IssmDouble>** pdf,Vector<IssmDouble>** ppf); 55 void CreateJacobianMatrixx(Matrix<IssmDouble>** pJff,IssmDouble kmax); 55 56 void Echo(); 56 57 void InitFromFiles(char* rootpath, char* inputfilename, char* outputfilename, char* petscfilename, char* lockfilename, const int solution_type,const int* analyses,const int nummodels); -
issm/trunk-jpl/src/c/modules/Reduceloadx/Reduceloadx.cpp
r13762 r13939 20 20 int global_m,global_n; 21 21 bool fromlocalsize = true; 22 bool oldalloc = true; 22 23 23 24 if(VerboseModule()) _pprintLine_(" Dirichlet lifting applied to load vector"); … … 31 32 /*pf = pf - Kfs * y_s;*/ 32 33 Kfs->GetLocalSize(&Kfsm,&Kfsn); 33 Kfsy_s=new Vector<IssmDouble>(Kfsm,fromlocalsize); 34 if(oldalloc) 35 Kfsy_s=new Vector<IssmDouble>(Kfsm,fromlocalsize); 36 else 37 Kfsy_s=new Vector<IssmDouble>(Kfsm,global_m); 38 34 39 if (flag_ys0){ 35 40 -
issm/trunk-jpl/src/c/modules/Reducevectorgtofx/Reducevectorgtofx.cpp
r13938 r13939 15 15 int fsize; 16 16 IssmDouble *ug_serial = NULL; 17 bool oldalloc = false;17 bool oldalloc = true; 18 18 19 19 /*first figure out fsize: */ -
issm/trunk-jpl/src/c/modules/modules.h
r13877 r13939 91 91 #include "./SpcNodesx/SpcNodesx.h" 92 92 #include "./SurfaceAreax/SurfaceAreax.h" 93 #include "./CreateJacobianMatrixx/CreateJacobianMatrixx.h"94 93 #include "./TriaSearchx/TriaSearchx.h" 95 94 #include "./TriMeshx/TriMeshx.h"
Note:
See TracChangeset
for help on using the changeset viewer.