source: issm/trunk/src/c/PenaltyConstraintsx/PenaltyConstraintsx.cpp@ 3889

Last change on this file since 3889 was 3889, checked in by seroussi, 15 years ago

configuratin of elements missing in PenaltyConstraintsx

File size: 1.7 KB
Line 
1/*!\file PenaltyConstraintsx
2 * \brief: set up penalty constraints on loads
3 */
4
5#include "./PenaltyConstraintsx.h"
6#include "./RiftConstraints.h"
7#include "../shared/shared.h"
8#include "../include/include.h"
9#include "../toolkits/toolkits.h"
10#include "../EnumDefinitions/EnumDefinitions.h"
11
12void PenaltyConstraintsx(int* pconverged, int* pnum_unstable_constraints, DataSet* elements,DataSet* nodes, DataSet* vertices,
13 DataSet* loads,DataSet* materials, Parameters* parameters,int analysis_type,int sub_analysis_type){
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
25 /*recover parameters: */
26 parameters->FindParam(&min_mechanical_constraints,MinMechanicalConstraintsEnum);
27
28 /*First, get nodes and loads configured: */
29 elements->Configure(elements, loads, nodes,vertices, materials,parameters);
30 nodes->Configure(elements, loads, nodes,vertices, materials,parameters);
31 loads->Configure(elements, loads, nodes,vertices, materials,parameters);
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)){
36 RiftConstraints(&converged,&num_unstable_constraints,loads,min_mechanical_constraints,analysis_type,sub_analysis_type);
37 }
38 else if(loads->MeltingIsPresent()){
39 loads->MeltingConstraints(&converged,&num_unstable_constraints,analysis_type,sub_analysis_type);
40 }
41 else{
42 /*Do nothing, no constraints management!:*/
43 num_unstable_constraints=0;
44 converged=1;
45 }
46
47 /*Assign output pointers: */
48 *pconverged=converged;
49 *pnum_unstable_constraints=num_unstable_constraints;
50}
Note: See TracBrowser for help on using the repository browser.