Rev | Line | |
---|
[3938] | 1 | /*!\file: ProcessResults.cpp
|
---|
[3956] | 2 | * \brief: process nodal_values that were created by an input.
|
---|
[3938] | 3 | * For example, velocities need to be in m/yr, melting rates in m/yr, etc ...
|
---|
| 4 | * This centralizes all post-processing of inputs when they are being output to
|
---|
[3956] | 5 | * results.
|
---|
[3938] | 6 | *
|
---|
| 7 | */
|
---|
| 8 |
|
---|
| 9 | #ifdef HAVE_CONFIG_H
|
---|
| 10 | #include "config.h"
|
---|
| 11 | #else
|
---|
| 12 | #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
|
---|
| 13 | #endif
|
---|
| 14 |
|
---|
| 15 | #include "./InputLocal.h"
|
---|
| 16 | #include "../../DataSet/DataSet.h"
|
---|
| 17 | #include "../../objects/objects.h"
|
---|
| 18 | #include "../../EnumDefinitions/EnumDefinitions.h"
|
---|
| 19 | #include "../../shared/shared.h"
|
---|
| 20 |
|
---|
[3956] | 21 | void ProcessResults(double* nodal_values, int num_nodal_values,int enum_type,Parameters* parameters){
|
---|
[3938] | 22 |
|
---|
| 23 | int i;
|
---|
| 24 | double yts;
|
---|
| 25 |
|
---|
| 26 | /*Gete some values from parameters, that are often needed: */
|
---|
| 27 | parameters->FindParam(&yts,YtsEnum);
|
---|
| 28 |
|
---|
| 29 | switch(enum_type){
|
---|
[3956] | 30 | case VxEnum: for(i=0;i<num_nodal_values;i++)nodal_values[i]=nodal_values[i]/yts;break;
|
---|
| 31 | case VyEnum: for(i=0;i<num_nodal_values;i++)nodal_values[i]=nodal_values[i]/yts;break;
|
---|
| 32 | case VzEnum: for(i=0;i<num_nodal_values;i++)nodal_values[i]=nodal_values[i]/yts;break;
|
---|
| 33 | case MeltingRateEnum: for(i=0;i<num_nodal_values;i++)nodal_values[i]=nodal_values[i]/yts;break;
|
---|
[3938] | 34 | default: break;
|
---|
| 35 | }
|
---|
| 36 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.