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

Last change on this file since 12706 was 12706, checked in by Mathieu Morlighem, 13 years ago

merged trunk-jpl and trunk for revision 12703

File size: 1.6 KB
RevLine 
[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
13void ConstraintsStatex(int* pconverged, int* pnum_unstable_constraints, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads,Materials* materials, Parameters* parameters){
14
15 int i;
16
17 extern int num_procs;
18 extern int my_rank;
19
20 /*output: */
21 int converged=0;
22 int num_unstable_constraints=0;
23 int min_mechanical_constraints=0;
24 int analysis_type;
25
26 /*Display message*/
[12706]27 if(VerboseModule()) _pprintLine_(" Constraining penalties");
[8404]28
29 /*recover parameters: */
[9679]30 parameters->FindParam(&min_mechanical_constraints,DiagnosticRiftPenaltyThresholdEnum);
[8404]31 parameters->FindParam(&analysis_type,AnalysisTypeEnum);
32
33 /*Do we have penalties linked to rifts? In this case, run our special rifts penalty
34 * management routine, otherwise, skip : */
35 if (RiftIsPresent(loads,analysis_type)){
36 RiftConstraintsState(&converged,&num_unstable_constraints,loads,min_mechanical_constraints,analysis_type);
37 }
[9761]38 #ifdef _HAVE_THERMAL_
[8410]39 else if(ThermalIsPresent(loads,analysis_type)){
[8404]40 ThermalConstraintsState(loads,&converged,&num_unstable_constraints,analysis_type);
41 }
[9761]42 #endif
[8404]43 else{
44 /*Do nothing, no constraints management!:*/
45 num_unstable_constraints=0;
46 converged=1;
47 }
48
49 /*Assign output pointers: */
50 *pconverged=converged;
51 *pnum_unstable_constraints=num_unstable_constraints;
52}
Note: See TracBrowser for help on using the repository browser.