source: issm/trunk/src/c/solutions/ResetBoundaryConditions.cpp@ 9293

Last change on this file since 9293 was 9293, checked in by Mathieu Morlighem, 14 years ago

Moved UpdateSpcsx to UpdateSpcsx

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
9void ResetBoundaryConditions(FemModel* femmodel, int analysis_type){
10
11 /*variables: */
12 Vec yg=NULL;
13 Vec ys=NULL;
14 Nodes* nodes=NULL;
15 int i;
16
17 _printf_(VerboseSolution(),"%s\n"," updating boundary conditions...");
18
19 /*set current analysis: */
20 femmodel->SetCurrentConfiguration(analysis_type);
21
22 /*recover nodes: */
23 nodes=femmodel->nodes;
24
25 /*retrieve boundary conditions from element inputs :*/
26 GetSolutionFromInputsx( &yg, femmodel->elements,femmodel->nodes, femmodel->vertices,femmodel->loads, femmodel->materials, femmodel->parameters);
27 Reducevectorgtosx(&ys,yg,femmodel->nodes,femmodel->parameters);
28
29 /*update spcs using this new vector of constraints: */
30 UpdateDynamicConstraintsx(femmodel->nodes,femmodel->parameters,ys);
31
32 /*Free ressources:*/
33 VecFree(&ys);
34 VecFree(&yg);
35}
Note: See TracBrowser for help on using the repository browser.