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

Last change on this file since 13975 was 13975, checked in by Mathieu Morlighem, 12 years ago

merged trunk-jpl and trunk for revision 13974

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 "../../io/io.h"
10#include "../../toolkits/toolkits.h"
11#include "../../EnumDefinitions/EnumDefinitions.h"
12
13void 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*/
22 if(VerboseModule()) _pprintLine_(" Constraining penalties");
23
24 /*recover parameters: */
25 parameters->FindParam(&min_mechanical_constraints,DiagnosticRiftPenaltyThresholdEnum);
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 }
33 #ifdef _HAVE_THERMAL_
34 else if(ThermalIsPresent(loads,analysis_type)){
35 ThermalConstraintsState(loads,&converged,&num_unstable_constraints,analysis_type);
36 }
37 #endif
38 else{
39 /*Do nothing, no constraints management!:*/
40 num_unstable_constraints=0;
41 converged=1;
42 }
43
44 /*Assign output pointers: */
45 *pconverged=converged;
46 *pnum_unstable_constraints=num_unstable_constraints;
47}
Note: See TracBrowser for help on using the repository browser.