| Rev | Line |  | 
|---|
| [3938] | 1 | /*!\file:  ProcessResults.cpp | 
|---|
|  | 2 | * \brief: process patch that was created by an input, for results purposes. | 
|---|
|  | 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 | * patched 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 |  | 
|---|
|  | 21 | void ProcessResults(double* patch, int patch_size,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<patch_size;i++)patch[i]=patch[i]/yts;break; | 
|---|
|  | 31 | case VyEnum: for(i=0;i<patch_size;i++)patch[i]=patch[i]/yts;break; | 
|---|
|  | 32 | case VzEnum: for(i=0;i<patch_size;i++)patch[i]=patch[i]/yts;break; | 
|---|
|  | 33 | case MeltingRateEnum: for(i=0;i<patch_size;i++)patch[i]=patch[i]/yts;break; | 
|---|
|  | 34 | default: break; | 
|---|
|  | 35 | } | 
|---|
|  | 36 | } | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.