Changeset 18064 for issm/trunk-jpl/src/c/classes/Inputs/IntInput.cpp
- Timestamp:
- 05/26/14 21:40:16 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/Inputs/IntInput.cpp
r17514 r18064 13 13 14 14 /*IntInput constructors and destructor*/ 15 /*FUNCTION IntInput::IntInput(){{{*/ 16 IntInput::IntInput(){ 15 IntInput::IntInput(){/*{{{*/ 17 16 return; 18 17 } 19 18 /*}}}*/ 20 /*FUNCTION IntInput::IntInput(IssmDouble* values){{{*/ 21 IntInput::IntInput(int in_enum_type,IssmInt in_value){ 19 IntInput::IntInput(int in_enum_type,IssmInt in_value){/*{{{*/ 22 20 23 21 enum_type=in_enum_type; … … 25 23 } 26 24 /*}}}*/ 27 /*FUNCTION IntInput::~IntInput(){{{*/ 28 IntInput::~IntInput(){ 25 IntInput::~IntInput(){/*{{{*/ 29 26 return; 30 27 } … … 32 29 33 30 /*Object virtual functions definitions:*/ 34 /*FUNCTION IntInput::DeepEcho{{{*/ 35 void IntInput::DeepEcho(void){ 31 void IntInput::DeepEcho(void){/*{{{*/ 36 32 37 33 _printf_(setw(15)<<" IntInput "<<setw(25)<<left<<EnumToStringx(this->enum_type)<<" "<<this->value<<"\n"); 38 34 } 39 35 /*}}}*/ 40 /*FUNCTION IntInput::Id{{{*/ 41 int IntInput::Id(void){ return -1; } 36 int IntInput::Id(void){ return -1; }/*{{{*/ 42 37 /*}}}*/ 43 /*FUNCTION IntInput::ObjectEnum{{{*/ 44 int IntInput::ObjectEnum(void){ 38 int IntInput::ObjectEnum(void){/*{{{*/ 45 39 46 40 return IntInputEnum; … … 48 42 } 49 43 /*}}}*/ 50 /*FUNCTION IntInput::copy{{{*/ 51 Object* IntInput::copy() { 44 Object* IntInput::copy() {/*{{{*/ 52 45 53 46 return new IntInput(this->enum_type,this->value); … … 57 50 58 51 /*IntInput management*/ 59 /*FUNCTION IntInput::Echo {{{*/ 60 void IntInput::Echo(void){ 52 void IntInput::Echo(void){/*{{{*/ 61 53 this->DeepEcho(); 62 54 } 63 55 /*}}}*/ 64 /*FUNCTION IntInput::InstanceEnum{{{*/ 65 int IntInput::InstanceEnum(void){ 56 int IntInput::InstanceEnum(void){/*{{{*/ 66 57 67 58 return this->enum_type; … … 69 60 } 70 61 /*}}}*/ 71 /*FUNCTION IntInput::SpawnTriaInput{{{*/ 72 Input* IntInput::SpawnTriaInput(int index1,int index2,int index3){ 62 Input* IntInput::SpawnTriaInput(int index1,int index2,int index3){/*{{{*/ 73 63 74 64 /*output*/ … … 83 73 } 84 74 /*}}}*/ 85 /*FUNCTION IntInput::SpawnSegInput{{{*/ 86 Input* IntInput::SpawnSegInput(int index1,int index2){ 75 Input* IntInput::SpawnSegInput(int index1,int index2){/*{{{*/ 87 76 88 77 /*output*/ … … 99 88 100 89 /*Object functions*/ 101 /*FUNCTION IntInput::GetInputValue(bool* pvalue) {{{*/ 102 void IntInput::GetInputValue(bool* pvalue){_error_("not supported yet!");} 90 void IntInput::GetInputValue(bool* pvalue){_error_("not supported yet!");}/*{{{*/ 103 91 /*}}}*/ 104 /*FUNCTION IntInput::GetInputValue(int* pvalue){{{*/ 105 void IntInput::GetInputValue(int* pvalue){ 92 void IntInput::GetInputValue(int* pvalue){/*{{{*/ 106 93 *pvalue=value; 107 94 } 108 95 /*}}}*/ 109 /*FUNCTION IntInput::GetInputValue(IssmDouble* pvalue){{{*/ 110 void IntInput::GetInputValue(IssmDouble* pvalue){ 96 void IntInput::GetInputValue(IssmDouble* pvalue){/*{{{*/ 111 97 _error_("IntInput cannot return a IssmDouble in parallel"); 112 98 } 113 99 /*}}}*/ 114 /*FUNCTION IntInput::GetInputValue(IssmDouble* pvalue,Gauss* gauss){{{*/ 115 void IntInput::GetInputValue(IssmDouble* pvalue,Gauss* gauss){_error_("not supported yet!");} 100 void IntInput::GetInputValue(IssmDouble* pvalue,Gauss* gauss){_error_("not supported yet!");}/*{{{*/ 116 101 /*}}}*/ 117 /*FUNCTION IntInput::ChangeEnum{{{*/ 118 void IntInput::ChangeEnum(int newenumtype){ 102 void IntInput::ChangeEnum(int newenumtype){/*{{{*/ 119 103 this->enum_type=newenumtype; 120 104 } 121 105 /*}}}*/ 122 /*FUNCTION IntInput::SquareMin{{{*/ 123 void IntInput::SquareMin(IssmDouble* psquaremin,Parameters* parameters){ 106 void IntInput::SquareMin(IssmDouble* psquaremin,Parameters* parameters){/*{{{*/ 124 107 125 108 /*square min of an integer is the square of the integer itself: */ … … 127 110 } 128 111 /*}}}*/ 129 /*FUNCTION IntInput::Scale{{{*/ 130 void IntInput::Scale(IssmDouble scale_factor){ 112 void IntInput::Scale(IssmDouble scale_factor){/*{{{*/ 131 113 IssmDouble dvalue=(IssmDouble)value*scale_factor; 132 114 value=reCast<int>(dvalue); 133 115 } 134 116 /*}}}*/ 135 /*FUNCTION IntInput::AXPY{{{*/ 136 void IntInput::AXPY(Input* xinput,IssmDouble scalar){ 117 void IntInput::AXPY(Input* xinput,IssmDouble scalar){/*{{{*/ 137 118 138 119 IssmDouble dvalue; … … 156 137 } 157 138 /*}}}*/ 158 /*FUNCTION IntInput::Constrain{{{*/ 159 void IntInput::Constrain(IssmDouble cm_min, IssmDouble cm_max){ 139 void IntInput::Constrain(IssmDouble cm_min, IssmDouble cm_max){/*{{{*/ 160 140 161 141 if(!xIsNan<IssmDouble>(cm_min)) if (this->value<cm_min)this->value=reCast<int>(cm_min); … … 164 144 } 165 145 /*}}}*/ 166 /*FUNCTION IntInput::GetVectorFromInputs{{{*/ 167 void IntInput::GetVectorFromInputs(Vector<IssmDouble>* vector,int* doflist){ 146 void IntInput::GetVectorFromInputs(Vector<IssmDouble>* vector,int* doflist){/*{{{*/ 168 147 169 148 _error_("not supporte yet!"); … … 171 150 } 172 151 /*}}}*/ 173 /*FUNCTION IntInput::Configure{{{*/ 174 void IntInput::Configure(Parameters* parameters){ 152 void IntInput::Configure(Parameters* parameters){/*{{{*/ 175 153 /*do nothing: */ 176 154 }
Note:
See TracChangeset
for help on using the changeset viewer.