Last change
on this file since 5787 was 5787, checked in by Eric.Larour, 15 years ago |
Now, Kff partition schema in serial mode also
|
File size:
1.1 KB
|
Rev | Line | |
---|
[4013] | 1 | /*!\file: ResetBoundaryConditions.cpp
|
---|
| 2 | * \brief: change boundary conditions of a model, using a solution vector from another analysis
|
---|
| 3 | */
|
---|
| 4 |
|
---|
| 5 | #include "../objects/objects.h"
|
---|
| 6 | #include "../modules/modules.h"
|
---|
| 7 | #include "../EnumDefinitions/EnumDefinitions.h"
|
---|
| 8 |
|
---|
[4445] | 9 | void ResetBoundaryConditions(FemModel* femmodel, int analysis_type){
|
---|
[4013] | 10 |
|
---|
| 11 | int verbose=0;
|
---|
[5772] | 12 | Vec yg=NULL;
|
---|
| 13 | Vec ys=NULL;
|
---|
[4057] | 14 | int analysis_counter;
|
---|
[4013] | 15 |
|
---|
| 16 | femmodel->parameters->FindParam(&verbose,VerboseEnum);
|
---|
| 17 | if(verbose)_printf_("%s\n"," updating boundary conditions...");
|
---|
[4015] | 18 |
|
---|
[4445] | 19 | /*set current analysis: */
|
---|
| 20 | femmodel->SetCurrentConfiguration(analysis_type);
|
---|
| 21 |
|
---|
[5772] | 22 | GetSolutionFromInputsx( &yg, femmodel->elements,femmodel->nodes, femmodel->vertices,femmodel->loads, femmodel->materials, femmodel->parameters);
|
---|
[4013] | 23 |
|
---|
[5772] | 24 | /*For this analysis_type, free existing boundary condition vector: */
|
---|
[4057] | 25 | analysis_counter=femmodel->analysis_counter;
|
---|
| 26 | VecFree(&femmodel->m_ys[analysis_counter]);
|
---|
[4013] | 27 |
|
---|
| 28 | //Reduce from g to s set
|
---|
[5787] | 29 | Reducevectorgtosx(&ys,yg,femmodel->m_nodesets[analysis_counter],femmodel->parameters);
|
---|
[4013] | 30 |
|
---|
[5772] | 31 | /*Plug into femmodel->m_ys: */
|
---|
| 32 | femmodel->m_ys[analysis_counter]=ys;
|
---|
| 33 |
|
---|
[4015] | 34 | /*Free ressources:*/
|
---|
[5772] | 35 | VecFree(&yg);
|
---|
[4013] | 36 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.