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