| 1 | /*!\file PenaltyConstraintsx
|
|---|
| 2 | * \brief: set up penalty constraints on loads
|
|---|
| 3 | */
|
|---|
| 4 |
|
|---|
| 5 | #include "./PenaltyConstraintsx.h"
|
|---|
| 6 | #include "./RiftConstraints.h"
|
|---|
| 7 |
|
|---|
| 8 | #undef __FUNCT__
|
|---|
| 9 | #define __FUNCT__ "PenaltyConstraintsx"
|
|---|
| 10 |
|
|---|
| 11 | #include "../shared/shared.h"
|
|---|
| 12 | #include "../include/macros.h"
|
|---|
| 13 | #include "../toolkits/toolkits.h"
|
|---|
| 14 | #include "../EnumDefinitions/EnumDefinitions.h"
|
|---|
| 15 |
|
|---|
| 16 | void PenaltyConstraintsx(int* pconverged, int* pnum_unstable_constraints, DataSet* elements,DataSet* nodes,
|
|---|
| 17 | DataSet* loads,DataSet* materials, ParameterInputs* inputs,int analysis_type,int sub_analysis_type){
|
|---|
| 18 |
|
|---|
| 19 | int i;
|
|---|
| 20 |
|
|---|
| 21 | extern int num_procs;
|
|---|
| 22 | extern int my_rank;
|
|---|
| 23 |
|
|---|
| 24 | /*output: */
|
|---|
| 25 | int converged=0;
|
|---|
| 26 | int num_unstable_constraints=0;
|
|---|
| 27 |
|
|---|
| 28 | /*First, get loads configured: */
|
|---|
| 29 | loads->Configure(elements, loads, nodes, materials);
|
|---|
| 30 |
|
|---|
| 31 | /*Do we have penalties linked to rifts? In this case, run our special rifts penalty
|
|---|
| 32 | * management routine, otherwise, skip : */
|
|---|
| 33 | if (RiftIsPresent(loads)){
|
|---|
| 34 | RiftConstraints(&converged,&num_unstable_constraints,loads,inputs,analysis_type,sub_analysis_type);
|
|---|
| 35 | }
|
|---|
| 36 | else if(loads->MeltingIsPresent()){
|
|---|
| 37 | loads->MeltingConstraints(&converged,&num_unstable_constraints,inputs,analysis_type,sub_analysis_type);
|
|---|
| 38 | }
|
|---|
| 39 | else{
|
|---|
| 40 | /*Do nothing, no constraints management!:*/
|
|---|
| 41 | num_unstable_constraints=0;
|
|---|
| 42 | }
|
|---|
| 43 |
|
|---|
| 44 |
|
|---|
| 45 | /*Assign output pointers: */
|
|---|
| 46 | *pconverged=converged;
|
|---|
| 47 | *pnum_unstable_constraints=num_unstable_constraints;
|
|---|
| 48 | }
|
|---|