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