|
Last change
on this file since 6412 was 6412, checked in by Mathieu Morlighem, 15 years ago |
|
moved ISSMERROR to _error_, ISSMASSERT to _assert_ and ISSMPRINTF to _printf_
|
|
File size:
1.0 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 | Vec yg=NULL;
|
|---|
| 12 | Vec ys=NULL;
|
|---|
| 13 | int analysis_counter;
|
|---|
| 14 |
|
|---|
| 15 | _printf_(VerboseSolution(),"%s\n"," updating boundary conditions...");
|
|---|
| 16 |
|
|---|
| 17 | /*set current analysis: */
|
|---|
| 18 | femmodel->SetCurrentConfiguration(analysis_type);
|
|---|
| 19 |
|
|---|
| 20 | GetSolutionFromInputsx( &yg, femmodel->elements,femmodel->nodes, femmodel->vertices,femmodel->loads, femmodel->materials, femmodel->parameters);
|
|---|
| 21 |
|
|---|
| 22 | /*For this analysis_type, free existing boundary condition vector: */
|
|---|
| 23 | analysis_counter=femmodel->analysis_counter;
|
|---|
| 24 | VecFree(&femmodel->m_ys[analysis_counter]);
|
|---|
| 25 |
|
|---|
| 26 | //Reduce from g to s set
|
|---|
| 27 | Reducevectorgtosx(&ys,yg,femmodel->m_nodesets[analysis_counter],femmodel->parameters);
|
|---|
| 28 |
|
|---|
| 29 | /*Plug into femmodel->m_ys: */
|
|---|
| 30 | femmodel->m_ys[analysis_counter]=ys;
|
|---|
| 31 |
|
|---|
| 32 | /*Free ressources:*/
|
|---|
| 33 | VecFree(&yg);
|
|---|
| 34 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.