Last change
on this file since 6323 was 6323, checked in by Mathieu Morlighem, 14 years ago |
Added some verbosity levels and generalized
|
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 | ISSMPRINTF(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.