source: issm/trunk/src/c/objects/Inputs/ProcessResults.cpp@ 3956

Last change on this file since 3956 was 3956, checked in by Eric.Larour, 15 years ago

New results API

File size: 1.2 KB
Line 
1/*!\file: ProcessResults.cpp
2 * \brief: process nodal_values that were created by an input.
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
5 * results.
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
21void ProcessResults(double* nodal_values, int num_nodal_values,int enum_type,Parameters* parameters){
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){
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;
34 default: break;
35 }
36}
Note: See TracBrowser for help on using the repository browser.