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

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

merged trunk-jpl and trunk for revision 15394

File size: 1.4 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 "../../toolkits/toolkits.h"
9
10void 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*/
19 if(VerboseModule()) _printf0_(" Constraining penalties\n");
20
21 /*recover parameters: */
22 parameters->FindParam(&min_mechanical_constraints,DiagnosticRiftPenaltyThresholdEnum);
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 : */
27
28 /*No constraints management by default!:*/
29 num_unstable_constraints=0;
30 converged=1;
31
32 #ifdef _HAVE_RIFTS_
33 if (RiftIsPresent(loads,analysis_type)){
34 RiftConstraintsState(&converged,&num_unstable_constraints,loads,min_mechanical_constraints,analysis_type);
35 }
36 #endif
37 #ifdef _HAVE_THERMAL_
38 if(ThermalIsPresent(loads,analysis_type)){
39 ThermalConstraintsState(loads,&converged,&num_unstable_constraints,analysis_type);
40 }
41 #endif
42
43 /*Assign output pointers: */
44 *pconverged=converged;
45 *pnum_unstable_constraints=num_unstable_constraints;
46}
Note: See TracBrowser for help on using the repository browser.