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