Last change
on this file since 13055 was 13055, checked in by glperez, 13 years ago |
BUG: Reverted back. Chaco module not compiling...
|
File size:
1.2 KB
|
Rev | Line | |
---|
[3821] | 1 | /*!\file GetSolutionFromInputsx
|
---|
| 2 | * \brief: update datasets using parameter inputs
|
---|
| 3 | */
|
---|
| 4 |
|
---|
| 5 | #include "./GetSolutionFromInputsx.h"
|
---|
[3913] | 6 | #include "../../shared/shared.h"
|
---|
| 7 | #include "../../include/include.h"
|
---|
| 8 | #include "../../toolkits/toolkits.h"
|
---|
| 9 | #include "../../EnumDefinitions/EnumDefinitions.h"
|
---|
[3821] | 10 |
|
---|
[11679] | 11 | void GetSolutionFromInputsx( Vector** psolution, Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads, Materials* materials, Parameters* parameters){
|
---|
[3821] | 12 |
|
---|
| 13 | /*intermediary: */
|
---|
| 14 | int gsize;
|
---|
[3971] | 15 | int i;
|
---|
| 16 | Element* element=NULL;
|
---|
[3821] | 17 |
|
---|
[4386] | 18 | int configuration_type;
|
---|
[4043] | 19 |
|
---|
[3821] | 20 | /*output: */
|
---|
[11679] | 21 | Vector* solution=NULL;
|
---|
[3821] | 22 |
|
---|
[4043] | 23 | /*retrive parameters: */
|
---|
[4386] | 24 | parameters->FindParam(&configuration_type,ConfigurationTypeEnum);
|
---|
[4043] | 25 |
|
---|
[3821] | 26 | /*Get size of vector: */
|
---|
[5772] | 27 | gsize=nodes->NumberOfDofs(configuration_type,GsetEnum);
|
---|
[13055] | 28 | if (gsize==0) _error2_("Allocating a Vec of size 0 as gsize=0 for configuration: " << EnumToStringx(configuration_type));
|
---|
[3821] | 29 |
|
---|
| 30 | /*Initialize solution: */
|
---|
[11679] | 31 | solution=new Vector(gsize);
|
---|
[3821] | 32 |
|
---|
| 33 | /*Go through elements and plug solution: */
|
---|
[3971] | 34 | for (i=0;i<elements->Size();i++){
|
---|
| 35 | element=(Element*)elements->GetObjectByOffset(i);
|
---|
[4043] | 36 | element->GetSolutionFromInputs(solution);
|
---|
[3971] | 37 | }
|
---|
[3821] | 38 |
|
---|
| 39 | /*Assemble vector: */
|
---|
[11679] | 40 | solution->Assemble();
|
---|
[3821] | 41 |
|
---|
| 42 | /*Assign output pointers:*/
|
---|
| 43 | *psolution=solution;
|
---|
| 44 |
|
---|
| 45 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.