Changeset 16125
- Timestamp:
- 09/11/13 14:22:13 (12 years ago)
- Location:
- issm/trunk-jpl/src/c
- Files:
-
- 25 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/Elements/Penta.cpp
r16042 r16125 2728 2728 _error_("type " << type << " (" << EnumToStringx(type) << ") not implemented yet"); 2729 2729 } 2730 }2731 /*}}}*/2732 /*FUNCTION Penta::InputUpdateFromVector(int* vector, int name, int type);{{{*/2733 void Penta::InputUpdateFromVector(int* vector, int name, int type){2734 _error_("not supported yet!");2735 }2736 /*}}}*/2737 /*FUNCTION Penta::InputUpdateFromVector(bool* vector, int name, int type);{{{*/2738 void Penta::InputUpdateFromVector(bool* vector, int name, int type){2739 _error_("not supported yet!");2740 2730 } 2741 2731 /*}}}*/ … … 7035 7025 } 7036 7026 /*}}}*/ 7037 /*FUNCTION Penta::InputUpdateFromVectorDakota(int* vector, int name, int type);{{{*/7038 void Penta::InputUpdateFromVectorDakota(int* vector, int name, int type){7039 _error_("not supported yet!");7040 }7041 /*}}}*/7042 /*FUNCTION Penta::InputUpdateFromVectorDakota(bool* vector, int name, int type);{{{*/7043 void Penta::InputUpdateFromVectorDakota(bool* vector, int name, int type){7044 _error_("not supported yet!");7045 }7046 /*}}}*/7047 7027 /*FUNCTION Penta::InputUpdateFromMatrixDakota(IssmDouble* matrix, int nrows, int ncols, int name, int type);{{{*/ 7048 7028 void Penta::InputUpdateFromMatrixDakota(IssmDouble* matrix, int nrows, int ncols, int name, int type){ … … 10267 10247 10268 10248 int numnodes = this->NumberofNodes(); 10269 int numdof =NDOF2*numnodes;10249 int numdof = NDOF2*numnodes; 10270 10250 10271 10251 int i; 10272 10252 IssmDouble rho_ice,g; 10273 IssmDouble values[ numdof];10253 IssmDouble values[2*NUMVERTICES]; 10274 10254 IssmDouble vx[NUMVERTICES]; 10275 10255 IssmDouble vy[NUMVERTICES]; … … 10279 10259 IssmDouble surface[NUMVERTICES]; 10280 10260 IssmDouble xyz_list[NUMVERTICES][3]; 10281 int *doflist = NULL;10282 Penta *penta = NULL;10261 int *doflist = NULL; 10262 Penta *penta = NULL; 10283 10263 10284 10264 /*Get dof list: */ -
issm/trunk-jpl/src/c/classes/Elements/Penta.h
r16042 r16125 62 62 void InputUpdateFromConstant(int constant, int name); 63 63 void InputUpdateFromSolution(IssmDouble* solutiong); 64 void InputUpdateFromVector(bool* vector, int name, int type);65 64 void InputUpdateFromVector(IssmDouble* vector, int name, int type); 66 void InputUpdateFromVector(int* vector, int name, int type);67 65 #ifdef _HAVE_DAKOTA_ 68 void InputUpdateFromVectorDakota(bool* vector, int name, int type);69 66 void InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type); 70 void InputUpdateFromVectorDakota(int* vector, int name, int type);71 67 void InputUpdateFromMatrixDakota(IssmDouble* matrix, int nows, int ncols, int name, int type); 72 68 #endif -
issm/trunk-jpl/src/c/classes/Elements/Tria.cpp
r16042 r16125 1767 1767 void Tria::InputUpdateFromVector(IssmDouble* vector, int name, int type){ 1768 1768 1769 const int numnodes = NUMVERTICES;1770 int *doflist = NULL;1771 IssmDouble values[numnodes];1772 1769 1773 1770 /*Check that name is an element input*/ 1774 1771 if (!IsInput(name)) return; 1772 1773 int numnodes; 1774 int *doflist = NULL; 1775 IssmDouble *values = NULL; 1775 1776 1776 1777 switch(type){ … … 1802 1803 1803 1804 case NodesEnum: 1804 _assert_(this->element_type==P1Enum); 1805 /*Get dof list: */ 1805 1806 /*Get number of nodes and dof list: */ 1807 numnodes = this->NumberofNodes(); 1808 values = xNew<IssmDouble>(numnodes); 1806 1809 GetDofList(&doflist,NoneApproximationEnum,GsetEnum); 1807 1810 … … 1809 1812 for(int i=0;i<numnodes;i++){ 1810 1813 values[i]=vector[doflist[i]]; 1811 if(xIsNan<IssmDouble>(values[i])) _error_("NaN found in solution vector"); 1812 } 1814 if(xIsNan<IssmDouble>(values[i])) _error_("NaN found in vector"); 1815 } 1816 1813 1817 /*Add input to the element: */ 1814 this->inputs->AddInput(new TriaInput(name,values, P1Enum));1818 this->inputs->AddInput(new TriaInput(name,values,this->element_type)); 1815 1819 1816 1820 /*Free ressources:*/ … … 1819 1823 1820 1824 case NodeSIdEnum: 1821 _assert_(this->element_type==P1Enum); 1822 for(int i=0;i<NUMVERTICES;i++){ 1825 1826 /*Get number of nodes and dof list: */ 1827 numnodes = this->NumberofNodes(); 1828 values = xNew<IssmDouble>(numnodes); 1829 1830 for(int i=0;i<numnodes;i++){ 1823 1831 values[i]=vector[nodes[i]->Sid()]; 1824 if(xIsNan<IssmDouble>(values[i])) _error_("NaN found in solutionvector");1832 if(xIsNan<IssmDouble>(values[i])) _error_("NaN found in vector"); 1825 1833 } 1826 1834 /*Add input to the element: */ 1827 this->inputs->AddInput(new TriaInput(name,values, P1Enum));1835 this->inputs->AddInput(new TriaInput(name,values,this->element_type)); 1828 1836 return; 1829 1837 … … 1832 1840 } 1833 1841 1834 } 1835 /*}}}*/ 1836 /*FUNCTION Tria::InputUpdateFromVector(int* vector, int name, int type);{{{*/ 1837 void Tria::InputUpdateFromVector(int* vector, int name, int type){ 1838 _error_("not supported yet!"); 1839 } 1840 /*}}}*/ 1841 /*FUNCTION Tria::InputUpdateFromVector(bool* vector, int name, int type);{{{*/ 1842 void Tria::InputUpdateFromVector(bool* vector, int name, int type){ 1843 _error_("not supported yet!"); 1842 /*Clean-up*/ 1843 xDelete<int>(doflist); 1844 xDelete<IssmDouble>(values); 1845 1844 1846 } 1845 1847 /*}}}*/ … … 5574 5576 5575 5577 gauss=new GaussTria(); 5576 for 5578 for(int iv=0;iv<NUMVERTICES;iv++){ 5577 5579 gauss->GaussVertex(iv); 5578 5580 surfaceslopex_input->GetInputValue(&dsdx,gauss); … … 7003 7005 } 7004 7006 7005 }7006 /*}}}*/7007 /*FUNCTION Tria::InputUpdateFromVectorDakota(int* vector, int name, int type);{{{*/7008 void Tria::InputUpdateFromVectorDakota(int* vector, int name, int type){7009 _error_("not supported yet!");7010 }7011 /*}}}*/7012 /*FUNCTION Tria::InputUpdateFromVectorDakota(bool* vector, int name, int type);{{{*/7013 void Tria::InputUpdateFromVectorDakota(bool* vector, int name, int type){7014 _error_("not supported yet!");7015 7007 } 7016 7008 /*}}}*/ -
issm/trunk-jpl/src/c/classes/Elements/Tria.h
r16042 r16125 57 57 void InputUpdateFromSolution(IssmDouble* solutiong); 58 58 void InputUpdateFromVector(IssmDouble* vector, int name, int type); 59 void InputUpdateFromVector(int* vector, int name, int type);60 void InputUpdateFromVector(bool* vector, int name, int type);61 59 #ifdef _HAVE_DAKOTA_ 62 60 void InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type); 63 void InputUpdateFromVectorDakota(int* vector, int name, int type);64 void InputUpdateFromVectorDakota(bool* vector, int name, int type);65 61 void InputUpdateFromMatrixDakota(IssmDouble* matrix, int nows, int ncols, int name, int type); 66 62 #endif -
issm/trunk-jpl/src/c/classes/Loads/Numericalflux.h
r16042 r16125 49 49 /*Update virtual functions resolution: {{{*/ 50 50 void InputUpdateFromVector(IssmDouble* vector, int name, int type){/*Do nothing*/} 51 void InputUpdateFromVector(int* vector, int name, int type){_error_("Not implemented yet!");}52 void InputUpdateFromVector(bool* vector, int name, int type){_error_("Not implemented yet!");}53 51 void InputUpdateFromMatrixDakota(IssmDouble* matrix, int nrows, int ncols, int name, int type){/*Do nothing*/} 54 52 void InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type){/*Do nothing*/} 55 void InputUpdateFromVectorDakota(int* vector, int name, int type){_error_("Not implemented yet!");}56 void InputUpdateFromVectorDakota(bool* vector, int name, int type){_error_("Not implemented yet!");}57 53 void InputUpdateFromConstant(IssmDouble constant, int name){/*Do nothing*/}; 58 54 void InputUpdateFromConstant(int constant, int name){/*Do nothing*/}; -
issm/trunk-jpl/src/c/classes/Loads/Pengrid.cpp
r16042 r16125 358 358 } 359 359 /*}}}*/ 360 /*FUNCTION Pengrid::InputUpdateFromVector(int* vector, int name, int type) {{{*/361 void Pengrid::InputUpdateFromVector(int* vector, int name, int type){362 /*Nothing updated yet*/363 }364 /*}}}*/365 /*FUNCTION Pengrid::InputUpdateFromVector(bool* vector, int name, int type) {{{*/366 void Pengrid::InputUpdateFromVector(bool* vector, int name, int type){367 /*Nothing updated yet*/368 }369 /*}}}*/370 360 /*FUNCTION Pengrid::InputUpdateFromMatrixDakota(IssmDouble* vector, int nrows, int ncols, int name, int type) {{{*/ 371 361 void Pengrid::InputUpdateFromMatrixDakota(IssmDouble* matrix, int nrows, int ncols, int name, int type){ … … 375 365 /*FUNCTION Pengrid::InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type) {{{*/ 376 366 void Pengrid::InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type){ 377 /*Nothing updated yet*/378 }379 /*}}}*/380 /*FUNCTION Pengrid::InputUpdateFromVectorDakota(int* vector, int name, int type) {{{*/381 void Pengrid::InputUpdateFromVectorDakota(int* vector, int name, int type){382 /*Nothing updated yet*/383 }384 /*}}}*/385 /*FUNCTION Pengrid::InputUpdateFromVectorDakota(bool* vector, int name, int type) {{{*/386 void Pengrid::InputUpdateFromVectorDakota(bool* vector, int name, int type){387 367 /*Nothing updated yet*/ 388 368 } -
issm/trunk-jpl/src/c/classes/Loads/Pengrid.h
r16042 r16125 59 59 /*Update virtual functions resolution: {{{*/ 60 60 void InputUpdateFromVector(IssmDouble* vector, int name, int type); 61 void InputUpdateFromVector(int* vector, int name, int type);62 void InputUpdateFromVector(bool* vector, int name, int type);63 61 void InputUpdateFromMatrixDakota(IssmDouble* matrix ,int nrows, int ncols, int name, int type); 64 62 void InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type); 65 void InputUpdateFromVectorDakota(int* vector, int name, int type);66 void InputUpdateFromVectorDakota(bool* vector, int name, int type);67 63 void InputUpdateFromConstant(IssmDouble constant, int name); 68 64 void InputUpdateFromConstant(int constant, int name); -
issm/trunk-jpl/src/c/classes/Loads/Penpair.cpp
r16042 r16125 293 293 } 294 294 /*}}}*/ 295 /*FUNCTION Penpair::InputUpdateFromVector(int* vector, int name, int type) {{{*/296 void Penpair::InputUpdateFromVector(int* vector, int name, int type){297 /*Nothing updated yet*/298 }299 /*}}}*/300 /*FUNCTION Penpair::InputUpdateFromVector(bool* vector, int name, int type) {{{*/301 void Penpair::InputUpdateFromVector(bool* vector, int name, int type){302 /*Nothing updated yet*/303 }304 /*}}}*/305 295 306 296 /*Penpair management:*/ -
issm/trunk-jpl/src/c/classes/Loads/Penpair.h
r16042 r16125 39 39 /*Update virtual functions resolution: {{{*/ 40 40 void InputUpdateFromVector(IssmDouble* vector, int name, int type); 41 void InputUpdateFromVector(int* vector, int name, int type);42 void InputUpdateFromVector(bool* vector, int name, int type);43 41 void InputUpdateFromMatrixDakota(IssmDouble* matrix, int nrow, int ncols,int name, int type){_error_("Not implemented yet!");} 44 42 void InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type){_error_("Not implemented yet!");} 45 void InputUpdateFromVectorDakota(int* vector, int name, int type){_error_("Not implemented yet!");}46 void InputUpdateFromVectorDakota(bool* vector, int name, int type){_error_("Not implemented yet!");}47 43 void InputUpdateFromConstant(IssmDouble constant, int name); 48 44 void InputUpdateFromConstant(int constant, int name); -
issm/trunk-jpl/src/c/classes/Loads/Riftfront.cpp
r16042 r16125 256 256 } 257 257 /*}}}*/ 258 /*FUNCTION Riftfront::InputUpdateFrom Constant(IssmDouble* constant,int name) {{{*/258 /*FUNCTION Riftfront::InputUpdateFromVector(IssmDouble* constant,int name) {{{*/ 259 259 void Riftfront::InputUpdateFromVector(IssmDouble* vector, int name, int type){ 260 260 -
issm/trunk-jpl/src/c/classes/Loads/Riftfront.h
r16042 r16125 60 60 /*Update virtual functions resolution: {{{*/ 61 61 void InputUpdateFromVector(IssmDouble* vector, int name, int type); 62 void InputUpdateFromVector(int* vector, int name, int type){_error_("Not implemented yet!");}63 void InputUpdateFromVector(bool* vector, int name, int type){_error_("Not implemented yet!");}64 62 void InputUpdateFromMatrixDakota(IssmDouble* matrix, int nrows,int ncols, int name, int type){_error_("Not implemented yet!");} 65 63 void InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type){_error_("Not implemented yet!");} 66 void InputUpdateFromVectorDakota(int* vector, int name, int type){_error_("Not implemented yet!");}67 void InputUpdateFromVectorDakota(bool* vector, int name, int type){_error_("Not implemented yet!");}68 64 void InputUpdateFromConstant(IssmDouble constant, int name); 69 65 void InputUpdateFromConstant(int constant, int name){_error_("Not implemented yet!");} -
issm/trunk-jpl/src/c/classes/Materials/Matdamageice.cpp
r15740 r16125 672 672 default: _error_("type " << type << " (" << EnumToStringx(type) << ") not implemented yet"); 673 673 } 674 }675 /*}}}*/676 /*FUNCTION Matdamageice::InputUpdateFromVector(int* vector, int name, int type) {{{*/677 void Matdamageice::InputUpdateFromVector(int* vector, int name, int type){678 /*Nothing updated yet*/679 }680 /*}}}*/681 /*FUNCTION Matdamageice::InputUpdateFromVector(bool* vector, int name, int type) {{{*/682 void Matdamageice::InputUpdateFromVector(bool* vector, int name, int type){683 /*Nothing updated yet*/684 674 } 685 675 /*}}}*/ … … 733 723 } 734 724 /*}}}*/ 735 /*FUNCTION Matdamageice::InputUpdateFromMatrixDakota( int* vector, int name, int type) {{{*/725 /*FUNCTION Matdamageice::InputUpdateFromMatrixDakota(IssmDouble* vector, int name, int type) {{{*/ 736 726 void Matdamageice::InputUpdateFromMatrixDakota(IssmDouble* matrix, int nrows, int ncols,int name, int type){ 737 /*Nothing updated yet*/738 }739 /*}}}*/740 /*FUNCTION Matdamageice::InputUpdateFromVectorDakota(int* vector, int name, int type) {{{*/741 void Matdamageice::InputUpdateFromVectorDakota(int* vector, int name, int type){742 /*Nothing updated yet*/743 }744 /*}}}*/745 /*FUNCTION Matdamageice::InputUpdateFromVectorDakota(bool* vector, int name, int type) {{{*/746 void Matdamageice::InputUpdateFromVectorDakota(bool* vector, int name, int type){747 727 /*Nothing updated yet*/ 748 728 } -
issm/trunk-jpl/src/c/classes/Materials/Matdamageice.h
r15654 r16125 33 33 /*Update virtual functions definitions: {{{*/ 34 34 void InputUpdateFromVector(IssmDouble* vector, int name, int type); 35 void InputUpdateFromVector(int* vector, int name, int type);36 void InputUpdateFromVector(bool* vector, int name, int type);37 35 void InputUpdateFromMatrixDakota(IssmDouble* matrix, int nrow, int ncols, int name, int type); 38 36 void InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type); 39 void InputUpdateFromVectorDakota(int* vector, int name, int type);40 void InputUpdateFromVectorDakota(bool* vector, int name, int type);41 37 void InputUpdateFromConstant(IssmDouble constant, int name); 42 38 void InputUpdateFromConstant(int constant, int name); -
issm/trunk-jpl/src/c/classes/Materials/Matice.cpp
r15739 r16125 614 614 default: _error_("type " << type << " (" << EnumToStringx(type) << ") not implemented yet"); 615 615 } 616 }617 /*}}}*/618 /*FUNCTION Matice::InputUpdateFromVector(int* vector, int name, int type) {{{*/619 void Matice::InputUpdateFromVector(int* vector, int name, int type){620 /*Nothing updated yet*/621 }622 /*}}}*/623 /*FUNCTION Matice::InputUpdateFromVector(bool* vector, int name, int type) {{{*/624 void Matice::InputUpdateFromVector(bool* vector, int name, int type){625 /*Nothing updated yet*/626 616 } 627 617 /*}}}*/ … … 688 678 } 689 679 /*}}}*/ 690 /*FUNCTION Matice::InputUpdateFromVectorDakota(int* vector, int name, int type) {{{*/691 void Matice::InputUpdateFromVectorDakota(int* vector, int name, int type){692 /*Nothing updated yet*/693 }694 /*}}}*/695 /*FUNCTION Matice::InputUpdateFromVectorDakota(bool* vector, int name, int type) {{{*/696 void Matice::InputUpdateFromVectorDakota(bool* vector, int name, int type){697 /*Nothing updated yet*/698 }699 /*}}}*/700 680 /*FUNCTION Matice::InputUpdateFromConstant(IssmDouble constant, int name) {{{*/ 701 681 void Matice::InputUpdateFromConstant(IssmDouble constant, int name){ -
issm/trunk-jpl/src/c/classes/Materials/Matice.h
r15654 r16125 40 40 /*Update virtual functions definitions: {{{*/ 41 41 void InputUpdateFromVector(IssmDouble* vector, int name, int type); 42 void InputUpdateFromVector(int* vector, int name, int type);43 void InputUpdateFromVector(bool* vector, int name, int type);44 42 void InputUpdateFromMatrixDakota(IssmDouble* matrix, int nrow, int ncols, int name, int type); 45 43 void InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type); 46 void InputUpdateFromVectorDakota(int* vector, int name, int type);47 void InputUpdateFromVectorDakota(bool* vector, int name, int type);48 44 void InputUpdateFromConstant(IssmDouble constant, int name); 49 45 void InputUpdateFromConstant(int constant, int name); -
issm/trunk-jpl/src/c/classes/Materials/Matpar.cpp
r15870 r16125 140 140 } 141 141 /*}}}*/ 142 /*FUNCTION Matpar::InputUpdateFromVector(int* vector, int name, int type) {{{*/143 void Matpar::InputUpdateFromVector(int* vector, int name, int type){144 /*Nothing updated yet*/145 }146 /*}}}*/147 /*FUNCTION Matpar::InputUpdateFromVector(bool* vector, int name, int type) {{{*/148 void Matpar::InputUpdateFromVector(bool* vector, int name, int type){149 /*Nothing updated yet*/150 }151 /*}}}*/152 142 /*FUNCTION Matpar::InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type) {{{*/ 153 143 void Matpar::InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type){ … … 155 145 } 156 146 /*}}}*/ 157 /*FUNCTION Matpar::InputUpdateFromVectorDakota(int* vector, int name, int type) {{{*/ 158 void Matpar::InputUpdateFromVectorDakota(int* vector, int name, int type){ 159 /*Nothing updated yet*/ 160 } 161 /*}}}*/ 162 /*FUNCTION Matpar::InputUpdateFromVectorDakota(bool* vector, int name, int type) {{{*/ 163 void Matpar::InputUpdateFromVectorDakota(bool* vector, int name, int type){ 164 /*Nothing updated yet*/ 165 } 166 /*}}}*/ 167 /*FUNCTION Matpar::InputUpdateFromMatrixDakota(int* vector, int name, int type) {{{*/ 147 /*FUNCTION Matpar::InputUpdateFromMatrixDakota(IssmDouble* vector, int name, int type) {{{*/ 168 148 void Matpar::InputUpdateFromMatrixDakota(IssmDouble* matrix, int nrows, int ncols,int name, int type){ 169 149 /*Nothing updated yet*/ -
issm/trunk-jpl/src/c/classes/Materials/Matpar.h
r15654 r16125 71 71 /*Update virtual functions resolution: {{{*/ 72 72 void InputUpdateFromVector(IssmDouble* vector, int name, int type); 73 void InputUpdateFromVector(int* vector, int name, int type);74 void InputUpdateFromVector(bool* vector, int name, int type);75 73 void InputUpdateFromMatrixDakota(IssmDouble* matrix,int nrows,int ncols, int name, int type); 76 74 void InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type); 77 void InputUpdateFromVectorDakota(int* vector, int name, int type);78 void InputUpdateFromVectorDakota(bool* vector, int name, int type);79 75 void InputUpdateFromConstant(IssmDouble constant, int name); 80 76 void InputUpdateFromConstant(int constant, int name); -
issm/trunk-jpl/src/c/classes/Node.cpp
r16101 r16125 575 575 return indexing.clone; 576 576 577 }578 /*}}}*/579 /*FUNCTION Node::InputUpdateFromVector(IssmDouble* vector, int name, int type){{{*/580 void Node::InputUpdateFromVector(IssmDouble* vector, int name, int type){581 582 /*Nothing updated yet*/583 }584 /*}}}*/585 /*FUNCTION Node::InputUpdateFromVector(int* vector, int name, int type){{{*/586 void Node::InputUpdateFromVector(int* vector, int name, int type){587 588 /*Nothing updated yet*/589 }590 /*}}}*/591 /*FUNCTION Node::InputUpdateFromVector(bool* vector, int name, int type){{{*/592 void Node::InputUpdateFromVector(bool* vector, int name, int type){593 594 /*Nothing updated yet*/595 }596 /*}}}*/597 /*FUNCTION Node::InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type){{{*/598 void Node::InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type){599 600 /*Nothing updated yet*/601 }602 /*}}}*/603 /*FUNCTION Node::InputUpdateFromMatrixDakota(IssmDouble* matrix, int nrows, int ncols, int name, int type){{{*/604 void Node::InputUpdateFromMatrixDakota(IssmDouble* matrix, int nrows, int ncols, int name, int type){605 606 /*Nothing updated yet*/607 }608 /*}}}*/609 /*FUNCTION Node::InputUpdateFromVectorDakota(int* vector, int name, int type){{{*/610 void Node::InputUpdateFromVectorDakota(int* vector, int name, int type){611 612 /*Nothing updated yet*/613 }614 /*}}}*/615 /*FUNCTION Node::InputUpdateFromVectorDakota(bool* vector, int name, int type){{{*/616 void Node::InputUpdateFromVectorDakota(bool* vector, int name, int type){617 618 /*Nothing updated yet*/619 }620 /*}}}*/621 /*FUNCTION Node::InputUpdateFromConstant(IssmDouble constant, int name){{{*/622 void Node::InputUpdateFromConstant(IssmDouble constant, int name){623 624 /*Nothing updated yet*/625 }626 /*}}}*/627 /*FUNCTION Node::InputUpdateFromConstant(int constant, int name){{{*/628 void Node::InputUpdateFromConstant(int constant, int name){629 630 /*Nothing updated yet*/631 }632 /*}}}*/633 /*FUNCTION Node::InputUpdateFromConstant(bool constant, int name){{{*/634 void Node::InputUpdateFromConstant(bool constant, int name){635 636 /*Nothing updated yet*/637 577 } 638 578 /*}}}*/ -
issm/trunk-jpl/src/c/classes/Node.h
r16025 r16125 23 23 /*}}}*/ 24 24 25 class Node: public Object ,public Update{25 class Node: public Object{ 26 26 27 27 private: … … 50 50 int ObjectEnum(); 51 51 Object *copy(){_error_("Not implemented yet (similar to Elements)"); }; 52 53 /*Update virtual functions definitions:*/54 void InputUpdateFromVector(IssmDouble* vector, int name, int type);55 void InputUpdateFromVector(int* vector, int name, int type);56 void InputUpdateFromVector(bool* vector, int name, int type);57 void InputUpdateFromMatrixDakota(IssmDouble* matrix,int nrows, int ncols, int name, int type);58 void InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type);59 void InputUpdateFromVectorDakota(int* vector, int name, int type);60 void InputUpdateFromVectorDakota(bool* vector, int name, int type);61 void InputUpdateFromConstant(IssmDouble constant, int name);62 void InputUpdateFromConstant(int constant, int name);63 void InputUpdateFromConstant(bool constant, int name);64 void InputUpdateFromSolution(IssmDouble* solution){_error_("Not implemented yet!");}65 void InputUpdateFromIoModel(int index, IoModel* iomodel){_error_("Not implemented yet!");}66 52 67 53 /*Node numerical routines*/ -
issm/trunk-jpl/src/c/classes/Update.h
r13634 r16125 15 15 16 16 virtual void InputUpdateFromVector(IssmDouble* vector, int name, int type)=0; 17 virtual void InputUpdateFromVector(int* vector, int name, int type)=0;18 virtual void InputUpdateFromVector(bool* vector, int name, int type)=0;19 17 #ifdef _HAVE_DAKOTA_ 20 18 virtual void InputUpdateFromMatrixDakota(IssmDouble* matrix, int rows, int ncols, int name, int type)=0; 21 19 virtual void InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type)=0; 22 virtual void InputUpdateFromVectorDakota(int* vector, int name, int type)=0;23 virtual void InputUpdateFromVectorDakota(bool* vector, int name, int type)=0;24 20 #endif 25 21 virtual void InputUpdateFromConstant(IssmDouble constant, int name)=0; -
issm/trunk-jpl/src/c/modules/InputUpdateFromMatrixDakotax/InputUpdateFromMatrixDakotax.cpp
r15849 r16125 23 23 element->InputUpdateFromMatrixDakota(matrix,nrows,ncols,name,type); 24 24 } 25 for(i=0;i<femmodel->nodes->Size();i++){26 Node* node=(Node*)femmodel->nodes->GetObjectByOffset(i);27 node->InputUpdateFromMatrixDakota(matrix,nrows,ncols,name,type);28 }29 25 for(i=0;i<femmodel->loads->Size();i++){ 30 26 Load* load=(Load*)femmodel->loads->GetObjectByOffset(i); -
issm/trunk-jpl/src/c/modules/InputUpdateFromVectorDakotax/InputUpdateFromVectorDakotax.cpp
r15850 r16125 25 25 element->InputUpdateFromVectorDakota(vector,name,type); 26 26 } 27 for(i=0;i<femmodel->nodes->Size();i++){28 Node* node=(Node*)femmodel->nodes->GetObjectByOffset(i);29 node->InputUpdateFromVectorDakota(vector,name,type);30 }31 27 for(i=0;i<femmodel->loads->Size();i++){ 32 28 Load* load=(Load*)femmodel->loads->GetObjectByOffset(i); … … 38 34 } 39 35 } 40 41 void InputUpdateFromVectorDakotax(FemModel* femmodel,int* vector, int name, int type){42 43 int i;44 45 /*Update elements, nodes, loads and materials from inputs: */46 for(i=0;i<femmodel->elements->Size();i++){47 Element* element=dynamic_cast<Element*>(femmodel->elements->GetObjectByOffset(i));48 element->InputUpdateFromVectorDakota(vector,name,type);49 }50 for(i=0;i<femmodel->nodes->Size();i++){51 Node* node=(Node*)femmodel->nodes->GetObjectByOffset(i);52 node->InputUpdateFromVectorDakota(vector,name,type);53 }54 for(i=0;i<femmodel->loads->Size();i++){55 Load* load=(Load*)femmodel->loads->GetObjectByOffset(i);56 load->InputUpdateFromVectorDakota(vector,name,type);57 }58 for(i=0;i<femmodel->materials->Size();i++){59 Material* material=(Material*)femmodel->materials->GetObjectByOffset(i);60 material->InputUpdateFromVectorDakota(vector,name,type);61 }62 }63 64 void InputUpdateFromVectorDakotax(FemModel* femmodel,bool* vector, int name, int type){65 66 int i;67 68 /*Update elements, nodes, loads and materials from inputs: */69 for(i=0;i<femmodel->elements->Size();i++){70 Element* element=dynamic_cast<Element*>(femmodel->elements->GetObjectByOffset(i));71 element->InputUpdateFromVectorDakota(vector,name,type);72 }73 for(i=0;i<femmodel->nodes->Size();i++){74 Node* node=(Node*)femmodel->nodes->GetObjectByOffset(i);75 node->InputUpdateFromVectorDakota(vector,name,type);76 }77 for(i=0;i<femmodel->loads->Size();i++){78 Load* load=(Load*)femmodel->loads->GetObjectByOffset(i);79 load->InputUpdateFromVectorDakota(vector,name,type);80 }81 for(i=0;i<femmodel->materials->Size();i++){82 Material* material=(Material*)femmodel->materials->GetObjectByOffset(i);83 material->InputUpdateFromVectorDakota(vector,name,type);84 }85 } -
issm/trunk-jpl/src/c/modules/InputUpdateFromVectorDakotax/InputUpdateFromVectorDakotax.h
r15849 r16125 11 11 void InputUpdateFromVectorDakotax(FemModel* femmodel,Vector<IssmDouble>* vector, int name,int type); 12 12 void InputUpdateFromVectorDakotax(FemModel* femmodel,IssmDouble* vector, int name,int type); 13 void InputUpdateFromVectorDakotax(FemModel* femmodel,int* vector, int name,int type);14 void InputUpdateFromVectorDakotax(FemModel* femmodel,bool* vector, int name,int type);15 13 16 14 #endif /* _UPDATEINPUTSFROMVECTORDAKOTAXX_H */ -
issm/trunk-jpl/src/c/modules/InputUpdateFromVectorx/InputUpdateFromVectorx.cpp
r15849 r16125 23 23 element->InputUpdateFromVector(vector,name,type); 24 24 } 25 for(i=0;i<femmodel->nodes->Size();i++){26 Node* node=(Node*)femmodel->nodes->GetObjectByOffset(i);27 node->InputUpdateFromVector(vector,name,type);28 }29 25 for(i=0;i<femmodel->loads->Size();i++){ 30 26 Load* load=(Load*)femmodel->loads->GetObjectByOffset(i); … … 36 32 } 37 33 } 38 39 void InputUpdateFromVectorx(FemModel* femmodel,int* vector, int name, int type){40 41 int i;42 43 /*Update elements, nodes, loads and materials from inputs: */44 for(i=0;i<femmodel->elements->Size();i++){45 Element* element=dynamic_cast<Element*>(femmodel->elements->GetObjectByOffset(i));46 element->InputUpdateFromVector(vector,name,type);47 }48 for(i=0;i<femmodel->nodes->Size();i++){49 Node* node=(Node*)femmodel->nodes->GetObjectByOffset(i);50 node->InputUpdateFromVector(vector,name,type);51 }52 for(i=0;i<femmodel->loads->Size();i++){53 Load* load=(Load*)femmodel->loads->GetObjectByOffset(i);54 load->InputUpdateFromVector(vector,name,type);55 }56 for(i=0;i<femmodel->materials->Size();i++){57 Material* material=(Material*)femmodel->materials->GetObjectByOffset(i);58 material->InputUpdateFromVector(vector,name,type);59 }60 }61 62 void InputUpdateFromVectorx(FemModel* femmodel,bool* vector, int name, int type){63 64 int i;65 66 /*Update elements, nodes, loads and materials from inputs: */67 for(i=0;i<femmodel->elements->Size();i++){68 Element* element=dynamic_cast<Element*>(femmodel->elements->GetObjectByOffset(i));69 element->InputUpdateFromVector(vector,name,type);70 }71 for(i=0;i<femmodel->nodes->Size();i++){72 Node* node=(Node*)femmodel->nodes->GetObjectByOffset(i);73 node->InputUpdateFromVector(vector,name,type);74 }75 for(i=0;i<femmodel->loads->Size();i++){76 Load* load=(Load*)femmodel->loads->GetObjectByOffset(i);77 load->InputUpdateFromVector(vector,name,type);78 }79 for(i=0;i<femmodel->materials->Size();i++){80 Material* material=(Material*)femmodel->materials->GetObjectByOffset(i);81 material->InputUpdateFromVector(vector,name,type);82 }83 } -
issm/trunk-jpl/src/c/modules/InputUpdateFromVectorx/InputUpdateFromVectorx.h
r15849 r16125 11 11 void InputUpdateFromVectorx(FemModel* femmodel,Vector<IssmDouble>* vector, int name,int type); 12 12 void InputUpdateFromVectorx(FemModel* femmodel,IssmDouble* vector, int name,int type); 13 void InputUpdateFromVectorx(FemModel* femmodel,int* vector, int name,int type);14 void InputUpdateFromVectorx(FemModel* femmodel,bool* vector, int name,int type);15 13 16 14 #endif /* _UPDATEINPUTSFROMVECTORXX_H */
Note:
See TracChangeset
for help on using the changeset viewer.