Changeset 17266
- Timestamp:
- 02/12/14 15:21:30 (11 years ago)
- Location:
- issm/trunk-jpl/src/c/classes
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/Loads/Load.h
r16042 r17266 24 24 25 25 public: 26 27 26 virtual ~Load(){}; 28 27 virtual void Configure(Elements* elements,Loads* loads,Nodes* nodes,Vertices* vertices,Materials* materials,Parameters* parameters)=0; -
issm/trunk-jpl/src/c/classes/Loads/Numericalflux.cpp
r17118 r17266 23 23 /*FUNCTION Numericalflux::Numericalflux(){{{*/ 24 24 Numericalflux::Numericalflux(){ 25 this->inputs = NULL;26 25 this->parameters = NULL; 27 26 this->helement = NULL; … … 112 111 this->id=numericalflux_id; 113 112 this->analysis_type=in_analysis_type; 113 this->flux_type = numericalflux_type; 114 114 115 115 /*Hooks: */ … … 118 118 this->helement =new Hook(numericalflux_elem_ids,1); // take only the first element for now 119 119 120 //intialize and add as many inputs per element as requested:121 this->inputs=new Inputs();122 this->inputs->AddInput(new IntInput(NumericalfluxTypeEnum,numericalflux_type));123 124 120 //this->parameters: we still can't point to it, it may not even exist. Configure will handle this. 125 121 this->parameters=NULL; … … 130 126 /*FUNCTION Numericalflux::~Numericalflux(){{{*/ 131 127 Numericalflux::~Numericalflux(){ 132 delete inputs;133 128 this->parameters=NULL; 134 129 delete helement; … … 144 139 _printf_(" id: " << id << "\n"); 145 140 _printf_(" analysis_type: " << EnumToStringx(analysis_type) << "\n"); 141 _printf_(" flux_type: " << this->flux_type<< "\n"); 146 142 hnodes->Echo(); 147 143 hvertices->Echo(); 148 144 helement->Echo(); 149 145 _printf_(" parameters: " << parameters << "\n"); 150 _printf_(" inputs: " << inputs << "\n");151 146 } 152 147 /*}}}*/ … … 157 152 _printf_(" id: " << id << "\n"); 158 153 _printf_(" analysis_type: " << EnumToStringx(analysis_type) << "\n"); 154 _printf_(" flux_type: " << this->flux_type<< "\n"); 159 155 hnodes->DeepEcho(); 160 156 hvertices->DeepEcho(); … … 165 161 else 166 162 _printf_(" NULL\n"); 167 _printf_(" inputs\n");168 inputs->DeepEcho();169 170 163 } 171 164 /*}}}*/ … … 192 185 numericalflux->id=this->id; 193 186 numericalflux->analysis_type=this->analysis_type; 194 if(this->inputs){ 195 numericalflux->inputs=(Inputs*)this->inputs->Copy(); 196 } 197 else{ 198 numericalflux->inputs=new Inputs(); 199 } 187 numericalflux->flux_type=this->flux_type; 188 200 189 /*point parameters: */ 201 190 numericalflux->parameters=this->parameters; … … 303 292 void Numericalflux::GetNodesSidList(int* sidlist){ 304 293 305 int type;306 inputs->GetInputValue(&type,NumericalfluxTypeEnum);307 294 _assert_(sidlist); 308 295 _assert_(nodes); 309 296 310 switch(t ype){297 switch(this->flux_type){ 311 298 case InternalEnum: 312 299 for(int i=0;i<NUMNODES_INTERNAL;i++) sidlist[i]=nodes[i]->Sid(); … … 316 303 return; 317 304 default: 318 _error_("Numericalflux type " << EnumToStringx(t ype) << " not supported yet");305 _error_("Numericalflux type " << EnumToStringx(this->flux_type) << " not supported yet"); 319 306 } 320 307 } … … 323 310 void Numericalflux::GetNodesLidList(int* lidlist){ 324 311 325 int type;326 inputs->GetInputValue(&type,NumericalfluxTypeEnum);327 312 _assert_(lidlist); 328 313 _assert_(nodes); 329 314 330 switch(t ype){315 switch(this->flux_type){ 331 316 case InternalEnum: 332 317 for(int i=0;i<NUMNODES_INTERNAL;i++) lidlist[i]=nodes[i]->Lid(); … … 336 321 return; 337 322 default: 338 _error_("Numericalflux type " << EnumToStringx(t ype) << " not supported yet");323 _error_("Numericalflux type " << EnumToStringx(this->flux_type) << " not supported yet"); 339 324 } 340 325 } … … 343 328 int Numericalflux::GetNumberOfNodes(void){ 344 329 345 int type; 346 inputs->GetInputValue(&type,NumericalfluxTypeEnum); 347 348 switch(type){ 330 switch(this->flux_type){ 349 331 case InternalEnum: 350 332 return NUMNODES_INTERNAL; … … 352 334 return NUMNODES_BOUNDARY; 353 335 default: 354 _error_("Numericalflux type " << EnumToStringx(t ype) << " not supported yet");336 _error_("Numericalflux type " << EnumToStringx(this->flux_type) << " not supported yet"); 355 337 } 356 338 … … 444 426 ElementMatrix* Numericalflux::CreateKMatrixMasstransport(void){ 445 427 446 int type; 447 inputs->GetInputValue(&type,NumericalfluxTypeEnum); 448 449 switch(type){ 428 switch(this->flux_type){ 450 429 case InternalEnum: 451 430 return CreateKMatrixMasstransportInternal(); … … 597 576 ElementMatrix* Numericalflux::CreateKMatrixBalancethickness(void){ 598 577 599 int type; 600 inputs->GetInputValue(&type,NumericalfluxTypeEnum); 601 602 switch(type){ 578 switch(this->flux_type){ 603 579 case InternalEnum: 604 580 return CreateKMatrixBalancethicknessInternal(); … … 748 724 ElementMatrix* Numericalflux::CreateKMatrixAdjointBalancethickness(void){ 749 725 750 int type; 751 inputs->GetInputValue(&type,NumericalfluxTypeEnum); 752 753 switch(type){ 726 switch(this->flux_type){ 754 727 case InternalEnum: 755 728 return CreateKMatrixAdjointBalancethicknessInternal(); … … 780 753 ElementVector* Numericalflux::CreatePVectorMasstransport(void){ 781 754 782 int type; 783 inputs->GetInputValue(&type,NumericalfluxTypeEnum); 784 785 switch(type){ 755 switch(this->flux_type){ 786 756 case InternalEnum: 787 757 return CreatePVectorMasstransportInternal(); … … 874 844 ElementVector* Numericalflux::CreatePVectorBalancethickness(void){ 875 845 876 int type; 877 inputs->GetInputValue(&type,NumericalfluxTypeEnum); 878 879 switch(type){ 846 switch(this->flux_type){ 880 847 case InternalEnum: 881 848 return CreatePVectorBalancethicknessInternal(); -
issm/trunk-jpl/src/c/classes/Loads/Numericalflux.h
r16783 r17266 22 22 int id; 23 23 int analysis_type; 24 int flux_type; 24 25 25 26 /*Hooks*/ … … 33 34 Node **nodes; 34 35 Parameters *parameters; 35 Inputs *inputs;36 36 37 37 /*Numericalflux constructors,destructors {{{*/ -
issm/trunk-jpl/src/c/classes/Materials/Material.h
r17248 r17266 19 19 public: 20 20 Inputs* inputs; 21 virtual 21 virtual ~Material(){}; 22 22 /*WARNING: input should not be public but it is an easy way to update B from T (using UpdateFromSolution) from Pentas*/ 23 23 -
issm/trunk-jpl/src/c/classes/Materials/Matpar.cpp
r17085 r17266 210 210 this->g=constant; 211 211 break; 212 212 case SurfaceforcingsDesfacEnum: 213 213 this->desfac=constant; 214 214 break;
Note:
See TracChangeset
for help on using the changeset viewer.