Added state definition in SPHSmooth. Fixed cmake LINK_FLAGS problem
This commit is contained in:
parent
b80734bf07
commit
cc769b2b1d
5 changed files with 106 additions and 77 deletions
|
@ -62,7 +62,7 @@ if (ENABLE_SHARP AND SHARP_LIBRARY AND SHARP_INCLUDE_PATH AND EIGEN3_FOUND)
|
|||
include_directories(${SHARP_INCLUDE_PATH})
|
||||
add_executable(test_healpix_calls test_healpix_calls.cpp)
|
||||
target_link_libraries(test_healpix_calls ${tolink} ${SHARP_LIBRARIES})
|
||||
set_target_properties(test_healpix_calls PROPERTIES COMPILE_FLAGS ${OpenMP_CXX_FLAGS} LINK_FLAGS ${OpenMP_CXX_FLAGS})
|
||||
set_target_properties(test_healpix_calls PROPERTIES COMPILE_FLAGS "${OpenMP_CXX_FLAGS}" LINK_FLAGS "${OpenMP_CXX_FLAGS}")
|
||||
add_dependencies(test_healpix_calls sharp)
|
||||
endif (ENABLE_SHARP AND SHARP_LIBRARY AND SHARP_INCLUDE_PATH AND EIGEN3_FOUND)
|
||||
|
||||
|
|
|
@ -85,14 +85,16 @@ int main()
|
|||
uint32_t dims[] = { NX, NX };
|
||||
ProgressiveOutput<ComputePrecision> out =
|
||||
ProgressiveOutput<ComputePrecision>::saveArrayProgressive("out.nc", dims, 2);
|
||||
//#pragma omp parallel for schedule(static)
|
||||
for (uint32_t iy = 0; iy < NX; iy++)
|
||||
{
|
||||
MySmooth::SPHState state;
|
||||
cout << "iy=" << iy << endl;
|
||||
for (uint32_t ix = 0; ix < NX; ix++)
|
||||
{
|
||||
MyTree::coords c = { 1.0*ix/NX, 1.0*iy/NX };
|
||||
smooth.fetchNeighbours(c);
|
||||
out.put(smooth.computeSmoothedValue(c, unit_fun));
|
||||
smooth.fetchNeighbours(c, &state);
|
||||
out.put(smooth.computeSmoothedValue(c, unit_fun, &state));
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue