source: issm/trunk/src/c/modules/ConstraintsStatex/ConstraintsStatex.cpp@ 8410

Last change on this file since 8410 was 8410, checked in by seroussi, 14 years ago

moved thermal PVectors from Tria to Penta

File size: 1.5 KB
Line 
1/*!\file ConstraintsStatex
2 * \brief: set up penalty constraints on loads
3 */
4
5#include "./ConstraintsStatex.h"
6#include "./ConstraintsStateLocal.h"
7#include "../../shared/shared.h"
8#include "../../include/include.h"
9#include "../../toolkits/toolkits.h"
10#include "../../EnumDefinitions/EnumDefinitions.h"
11
12void ConstraintsStatex(int* pconverged, int* pnum_unstable_constraints, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads,Materials* materials, Parameters* parameters){
13
14 int i;
15
16 extern int num_procs;
17 extern int my_rank;
18
19 /*output: */
20 int converged=0;
21 int num_unstable_constraints=0;
22 int min_mechanical_constraints=0;
23 int analysis_type;
24
25 /*Display message*/
26 _printf_(VerboseModule()," Constraining penalties\n");
27
28 /*recover parameters: */
29 parameters->FindParam(&min_mechanical_constraints,MinMechanicalConstraintsEnum);
30 parameters->FindParam(&analysis_type,AnalysisTypeEnum);
31
32 /*Do we have penalties linked to rifts? In this case, run our special rifts penalty
33 * management routine, otherwise, skip : */
34 if (RiftIsPresent(loads,analysis_type)){
35 RiftConstraintsState(&converged,&num_unstable_constraints,loads,min_mechanical_constraints,analysis_type);
36 }
37 else if(ThermalIsPresent(loads,analysis_type)){
38 ThermalConstraintsState(loads,&converged,&num_unstable_constraints,analysis_type);
39 }
40 else{
41 /*Do nothing, no constraints management!:*/
42 num_unstable_constraints=0;
43 converged=1;
44 }
45
46 /*Assign output pointers: */
47 *pconverged=converged;
48 *pnum_unstable_constraints=num_unstable_constraints;
49}
Note: See TracBrowser for help on using the repository browser.