Changeset 26073 for issm/trunk-jpl/src/c/classes/Elements/Element.cpp
- Timestamp:
- 03/11/21 10:05:44 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/Elements/Element.cpp
r26058 r26073 1709 1709 } 1710 1710 /*}}}*/ 1711 void Element::InputCreateP1FromConstant(Inputs* inputs,IoModel* iomodel,IssmDouble value_in,int vector_enum){/*{{{*/ 1712 1713 const int NUM_VERTICES = this->GetNumberOfVertices(); 1714 1715 int vertexids[MAXVERTICES]; 1716 int vertexlids[MAXVERTICES]; 1717 IssmDouble values[MAXVERTICES]; 1718 1719 /*Recover vertices ids needed to initialize inputs*/ 1720 _assert_(iomodel->elements); 1721 for(int i=0;i<NUM_VERTICES;i++){ 1722 vertexids[i] =reCast<int>(iomodel->elements[NUM_VERTICES*this->Sid()+i]); //ids for vertices are in the elements array from Matlab 1723 vertexlids[i]=iomodel->my_vertices_lids[vertexids[i]-1]; 1724 } 1725 1726 for(int i=0;i<NUM_VERTICES;i++) values[i]=value_in; 1727 this->SetElementInput(inputs,NUM_VERTICES,vertexlids,values,vector_enum); 1728 1729 } 1730 /*}}}*/ 1711 1731 void Element::ControlInputCreate(IssmDouble* vector,IssmDouble* min_vector,IssmDouble* max_vector,Inputs* inputs,IoModel* iomodel,int M,int N,IssmDouble scale,int input_enum,int id){/*{{{*/ 1712 1732 … … 1946 1966 /*update input*/ 1947 1967 this->SetElementInput(name,constant); 1968 } 1969 /*}}}*/ 1970 void Element::InputUpdateFromConstant(IssmDouble constant, int name, int type){/*{{{*/ 1971 1972 /*Check that name is an element input*/ 1973 if(!IsInputEnum(name)) return; 1974 1975 /*update input*/ 1976 this->SetElementInput(name,constant,type); 1948 1977 } 1949 1978 /*}}}*/
Note:
See TracChangeset
for help on using the changeset viewer.