|
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
|
| Line | |
|---|
| 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 |
|
|---|
| 9 | void ResetBoundaryConditions(FemModel* femmodel, int analysis_type){
|
|---|
| 10 |
|
|---|
| 11 | int verbose=0;
|
|---|
| 12 | Vec yg=NULL;
|
|---|
| 13 | Vec ys=NULL;
|
|---|
| 14 | int analysis_counter;
|
|---|
| 15 |
|
|---|
| 16 | femmodel->parameters->FindParam(&verbose,VerboseEnum);
|
|---|
| 17 | if(verbose)_printf_("%s\n"," updating boundary conditions...");
|
|---|
| 18 |
|
|---|
| 19 | /*set current analysis: */
|
|---|
| 20 | femmodel->SetCurrentConfiguration(analysis_type);
|
|---|
| 21 |
|
|---|
| 22 | GetSolutionFromInputsx( &yg, femmodel->elements,femmodel->nodes, femmodel->vertices,femmodel->loads, femmodel->materials, femmodel->parameters);
|
|---|
| 23 |
|
|---|
| 24 | /*For this analysis_type, free existing boundary condition vector: */
|
|---|
| 25 | analysis_counter=femmodel->analysis_counter;
|
|---|
| 26 | VecFree(&femmodel->m_ys[analysis_counter]);
|
|---|
| 27 |
|
|---|
| 28 | //Reduce from g to s set
|
|---|
| 29 | Reducevectorgtosx(&ys,yg,femmodel->m_nodesets[analysis_counter],femmodel->parameters);
|
|---|
| 30 |
|
|---|
| 31 | /*Plug into femmodel->m_ys: */
|
|---|
| 32 | femmodel->m_ys[analysis_counter]=ys;
|
|---|
| 33 |
|
|---|
| 34 | /*Free ressources:*/
|
|---|
| 35 | VecFree(&yg);
|
|---|
| 36 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.