[8404] | 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 "../../toolkits/toolkits.h"
|
---|
| 9 |
|
---|
| 10 | void ConstraintsStatex(int* pconverged, int* pnum_unstable_constraints, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads,Materials* materials, Parameters* parameters){
|
---|
| 11 |
|
---|
| 12 | /*output: */
|
---|
| 13 | int converged=0;
|
---|
| 14 | int num_unstable_constraints=0;
|
---|
| 15 | int min_mechanical_constraints=0;
|
---|
| 16 | int analysis_type;
|
---|
| 17 |
|
---|
| 18 | /*Display message*/
|
---|
[15396] | 19 | if(VerboseModule()) _printf0_(" Constraining penalties\n");
|
---|
[8404] | 20 |
|
---|
| 21 | /*recover parameters: */
|
---|
[9679] | 22 | parameters->FindParam(&min_mechanical_constraints,DiagnosticRiftPenaltyThresholdEnum);
|
---|
[8404] | 23 | parameters->FindParam(&analysis_type,AnalysisTypeEnum);
|
---|
| 24 |
|
---|
| 25 | /*Do we have penalties linked to rifts? In this case, run our special rifts penalty
|
---|
| 26 | * management routine, otherwise, skip : */
|
---|
[15396] | 27 |
|
---|
| 28 | /*No constraints management by default!:*/
|
---|
| 29 | num_unstable_constraints=0;
|
---|
| 30 | converged=1;
|
---|
| 31 |
|
---|
| 32 | #ifdef _HAVE_RIFTS_
|
---|
[8404] | 33 | if (RiftIsPresent(loads,analysis_type)){
|
---|
| 34 | RiftConstraintsState(&converged,&num_unstable_constraints,loads,min_mechanical_constraints,analysis_type);
|
---|
| 35 | }
|
---|
[15396] | 36 | #endif
|
---|
[9761] | 37 | #ifdef _HAVE_THERMAL_
|
---|
[15396] | 38 | if(ThermalIsPresent(loads,analysis_type)){
|
---|
[8404] | 39 | ThermalConstraintsState(loads,&converged,&num_unstable_constraints,analysis_type);
|
---|
| 40 | }
|
---|
[9761] | 41 | #endif
|
---|
[13975] | 42 |
|
---|
[8404] | 43 | /*Assign output pointers: */
|
---|
| 44 | *pconverged=converged;
|
---|
| 45 | *pnum_unstable_constraints=num_unstable_constraints;
|
---|
| 46 | }
|
---|