Skip to content
Snippets Groups Projects
Commit a5acae7a authored by Hkorb's avatar Hkorb
Browse files

more cleanup

parent 131aac5a
No related branches found
No related tags found
1 merge request!245Add new probe, Refactor File Writer
...@@ -569,15 +569,12 @@ void Probe::appendTimeseriesFile(Parameter* para, int level, int t) ...@@ -569,15 +569,12 @@ void Probe::appendTimeseriesFile(Parameter* para, int level, int t)
real coeff = postProcessingVariables[arr].conversionFactor(level); real coeff = postProcessingVariables[arr].conversionFactor(level);
for(uint point=0; point<probeStruct->nPoints; point++) for(uint point=0; point<probeStruct->nPoints; point++)
{ {
real v = probeStruct->quantitiesArrayH[calcArrayIndex(point, probeStruct->nPoints, timestep, probeStruct->nTimesteps, arrOff+arr)]*coeff; timestep_array[val] = probeStruct->quantitiesArrayH[calcArrayIndex(point, probeStruct->nPoints, timestep, probeStruct->nTimesteps, arrOff+arr)]*coeff;
if(val==1) printf("writing %f \n", v);
timestep_array[val] = v;
val++; val++;
} }
} }
} }
printf("u: %f \n", timestep_array[1]);
out.write((char*) timestep_array, sizeof(real)*vals_per_timestep); out.write((char*) timestep_array, sizeof(real)*vals_per_timestep);
} }
out.close(); out.close();
......
...@@ -17,7 +17,8 @@ ...@@ -17,7 +17,8 @@
#include "lbm/constants/NumericConstants.h" #include "lbm/constants/NumericConstants.h"
using namespace vf::lbm::constant; using namespace vf::lbm::constant;
typedef thrust::device_vector<real>::iterator valIterator;
typedef thrust::device_vector<uint>::iterator indIterator;
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
bool WallModelProbe::isAvailableStatistic(Statistic _variable) bool WallModelProbe::isAvailableStatistic(Statistic _variable)
{ {
...@@ -135,8 +136,6 @@ T spatial_mean(T* device_pointer, uint numberOfPoints) ...@@ -135,8 +136,6 @@ T spatial_mean(T* device_pointer, uint numberOfPoints)
return thrust::reduce(thrust_pointer, thrust_pointer+numberOfPoints)/real(numberOfPoints); return thrust::reduce(thrust_pointer, thrust_pointer+numberOfPoints)/real(numberOfPoints);
} }
typedef thrust::device_vector<real>::iterator valIterator;
typedef thrust::device_vector<uint>::iterator indIterator;
template<typename T> template<typename T>
T index_based_spatial_mean(T* device_pointer, thrust::device_ptr<uint> indeces_ptr, uint numberOfIndeces) T index_based_spatial_mean(T* device_pointer, thrust::device_ptr<uint> indeces_ptr, uint numberOfIndeces)
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment