Changeset 23587 for issm/trunk-jpl/src/c/classes/FemModel.cpp
- Timestamp:
- 01/02/19 20:33:39 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/FemModel.cpp
r23586 r23587 352 352 analysis_type=output->analysis_type_list[i]; 353 353 output->SetCurrentConfiguration(analysis_type); 354 SpcNodesx(output->nodes_list[i],output->constraints_list[i],output->parameters ,analysis_type);355 NodesDofx(output->nodes_list[i],output->parameters ,analysis_type);354 SpcNodesx(output->nodes_list[i],output->constraints_list[i],output->parameters); 355 NodesDofx(output->nodes_list[i],output->parameters); 356 356 ConfigureObjectsx(output->elements,output->loads_list[i],output->nodes_list[i],output->vertices,output->materials,output->parameters); 357 357 } … … 445 445 446 446 if(VerboseMProcessor()) _printf0_(" resolving node constraints\n"); 447 SpcNodesx(nodes,this->constraints,parameters ,analysis_type_list[i]);447 SpcNodesx(nodes,this->constraints,parameters); 448 448 449 449 if(VerboseMProcessor()) _printf0_(" creating nodal degrees of freedom\n"); 450 NodesDofx(nodes,parameters ,analysis_type_list[i]);450 NodesDofx(nodes,parameters); 451 451 } 452 452 … … 525 525 analysis_type=this->analysis_type_list[i]; 526 526 SetCurrentConfiguration(analysis_type); 527 SpcNodesx(this->nodes_list[i],this->constraints_list[i],this->parameters ,analysis_type);528 NodesDofx(this->nodes_list[i],this->parameters ,analysis_type);527 SpcNodesx(this->nodes_list[i],this->constraints_list[i],this->parameters); 528 NodesDofx(this->nodes_list[i],this->parameters); 529 529 ConfigureObjectsx(this->elements,this->loads_list[i],this->nodes_list[i],this->vertices,this->materials,this->parameters); 530 530 } … … 1279 1279 void FemModel::GetInputLocalMinMaxOnNodesx(IssmDouble** pmin,IssmDouble** pmax,IssmDouble* ug){/*{{{*/ 1280 1280 1281 /*Get vector sizes for current configuration*/1282 int configuration_type;1283 this->parameters->FindParam(&configuration_type,ConfigurationTypeEnum);1284 int numnodes = this->nodes->NumberOfNodes(configuration_type);1285 1286 1281 /*Initialize output vectors*/ 1282 int numnodes = this->nodes->NumberOfNodes(); 1287 1283 IssmDouble* uLmin_local = xNew<IssmDouble>(numnodes); 1288 1284 IssmDouble* uLmax_local = xNew<IssmDouble>(numnodes); … … 2543 2539 2544 2540 /*Second, constraints might be time dependent: */ 2545 SpcNodesx(nodes,constraints,parameters ,config_type);2541 SpcNodesx(nodes,constraints,parameters); 2546 2542 2547 2543 /*Now, update degrees of freedoms: */ 2548 NodesDofx(nodes,parameters ,config_type);2544 NodesDofx(nodes,parameters); 2549 2545 2550 2546 } … … 2725 2721 2726 2722 ConfigureObjectsx(new_elements,this->loads,new_nodes_list[i],new_vertices,new_materials,this->parameters); 2727 SpcNodesx(new_nodes_list[i],new_constraints_list[i],this->parameters ,analysis_type);2728 NodesDofx(new_nodes_list[i],this->parameters ,analysis_type);2723 SpcNodesx(new_nodes_list[i],new_constraints_list[i],this->parameters); 2724 NodesDofx(new_nodes_list[i],this->parameters); 2729 2725 } 2730 2726 … … 4480 4476 void FemModel::HydrologyEPLupdateDomainx(IssmDouble* pEplcount){ /*{{{*/ 4481 4477 4482 Vector<IssmDouble> * mask= NULL;4483 Vector<IssmDouble> * recurence= NULL;4484 Vector<IssmDouble> * active= NULL;4485 IssmDouble * serial_mask= NULL;4486 IssmDouble * serial_rec= NULL;4487 IssmDouble * serial_active= NULL;4488 IssmDouble *old_active = NULL;4489 int * eplzigzag_counter =NULL;4478 Vector<IssmDouble> *mask = NULL; 4479 Vector<IssmDouble> *recurence = NULL; 4480 Vector<IssmDouble> *active = NULL; 4481 IssmDouble *serial_mask = NULL; 4482 IssmDouble *serial_rec = NULL; 4483 IssmDouble *serial_active = NULL; 4484 IssmDouble *old_active = NULL; 4485 int *eplzigzag_counter = NULL; 4490 4486 int eplflip_lock; 4491 4487 4492 HydrologyDCEfficientAnalysis * effanalysis =new HydrologyDCEfficientAnalysis();4493 HydrologyDCInefficientAnalysis * inefanalysis =new HydrologyDCInefficientAnalysis();4488 HydrologyDCEfficientAnalysis *effanalysis = new HydrologyDCEfficientAnalysis(); 4489 HydrologyDCInefficientAnalysis *inefanalysis = new HydrologyDCInefficientAnalysis(); 4494 4490 4495 4491 /*Step 1: update mask, the mask might be extended by residual and/or using downstream sediment head*/ 4496 mask=new Vector<IssmDouble>(this->nodes->NumberOfNodes(HydrologyDCEfficientAnalysisEnum)); 4497 recurence=new Vector<IssmDouble>(this->nodes->NumberOfNodes(HydrologyDCEfficientAnalysisEnum)); 4492 int numnodes = this->nodes->NumberOfNodes(); 4493 mask=new Vector<IssmDouble>(numnodes); 4494 recurence=new Vector<IssmDouble>(numnodes); 4498 4495 this->parameters->FindParam(&eplzigzag_counter,NULL,EplZigZagCounterEnum); 4499 4496 this->parameters->FindParam(&eplflip_lock,HydrologydcEplflipLockEnum); … … 4504 4501 effanalysis->HydrologyEPLGetMask(mask,recurence,element); 4505 4502 } 4503 4506 4504 /*check for changes and increment zigzag counter, change the mask if necessary*/ 4507 4505 recurence->Assemble(); … … 4530 4528 inefanalysis->ElementizeEplMask(this); 4531 4529 /*Step 2: update node activity. If one element is connected to mask=1, all nodes are active*/ 4532 active=new Vector<IssmDouble>(nodes->NumberOfNodes( HydrologyDCEfficientAnalysisEnum));4530 active=new Vector<IssmDouble>(nodes->NumberOfNodes()); 4533 4531 for (int i=0;i<elements->Size();i++){ 4534 4532 Element* element=xDynamicCast<Element*>(elements->GetObjectByOffset(i)); … … 4566 4564 /*Update dof indexings*/ 4567 4565 this->UpdateConstraintsx(); 4568 4569 4566 } 4570 4567 /*}}}*/ … … 4583 4580 if(isthermal){ 4584 4581 /*Step 1: update mask, the mask correspond to thawed nodes (that have a meltingrate)*/ 4585 mask=new Vector<IssmDouble>(this->nodes->NumberOfNodes( HydrologyDCInefficientAnalysisEnum));4582 mask=new Vector<IssmDouble>(this->nodes->NumberOfNodes()); 4586 4583 4587 4584 for (int i=0;i<elements->Size();i++){ … … 4604 4601 4605 4602 /*get node mask coherent with element mask*/ 4606 active=new Vector<IssmDouble>(nodes->NumberOfNodes( HydrologyDCInefficientAnalysisEnum));4603 active=new Vector<IssmDouble>(nodes->NumberOfNodes()); 4607 4604 for (int i=0;i<elements->Size();i++){ 4608 4605 Element* element=xDynamicCast<Element*>(elements->GetObjectByOffset(i)); … … 4651 4648 /*update node activity. If one element is connected to mask=1, all nodes are active*/ 4652 4649 this->SetCurrentConfiguration(HydrologyDCEfficientAnalysisEnum); 4653 active=new Vector<IssmDouble>(nodes->NumberOfNodes( HydrologyDCEfficientAnalysisEnum));4650 active=new Vector<IssmDouble>(nodes->NumberOfNodes()); 4654 4651 for (int i=0;i<elements->Size();i++){ 4655 4652 Element* element=xDynamicCast<Element*>(elements->GetObjectByOffset(i));
Note:
See TracChangeset
for help on using the changeset viewer.