forked from bartvdbraak/blender
Fluid threads: re-add an erratically forgotten line, fix typo, set default threadcount to logical threadcount of machine
This commit is contained in:
parent
5ac66ee378
commit
b9b23d697b
@ -73,7 +73,7 @@ SimulationObject::~SimulationObject()
|
||||
debMsgStd("SimulationObject",DM_MSG,"El'Beem Done!\n",10);
|
||||
#if PARALLEL==1
|
||||
omp_set_num_threads(omp_threadcache);
|
||||
printf("Resetting omp_threads to cached vakue %d \n", omp_threadcache);
|
||||
printf("Resetting omp_threads to cached value %d \n", omp_threadcache);
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -185,6 +185,7 @@ int SimulationObject::initializeLbmSimulation(ntlRenderGlobals *glob)
|
||||
mpLbm->setSmoothing(1.0 * mpElbeemSettings->surfaceSmoothing, 1.0 * mpElbeemSettings->surfaceSmoothing);
|
||||
mpLbm->setIsoSubdivs(mpElbeemSettings->surfaceSubdivs);
|
||||
#if PARALLEL==1
|
||||
omp_threadcache = omp_get_max_threads();
|
||||
omp_set_num_threads(mpElbeemSettings->threads);
|
||||
printf("Setting omp_threads to usersetting %d \n", mpElbeemSettings->threads);
|
||||
#endif
|
||||
|
@ -46,6 +46,7 @@
|
||||
#include "BLI_blenlib.h"
|
||||
#include "BLI_math.h"
|
||||
#include "BLI_utildefines.h"
|
||||
#include "BLI_threads.h"
|
||||
|
||||
#include "BKE_main.h"
|
||||
#include "BKE_fluidsim.h" /* ensure definitions here match */
|
||||
@ -75,7 +76,7 @@ void fluidsim_init(FluidsimModifierData *fluidmd)
|
||||
|
||||
fss->fmd = fluidmd;
|
||||
fss->type = OB_FLUIDSIM_ENABLE;
|
||||
fss->threads = 4;
|
||||
fss->threads = BLI_system_thread_count();
|
||||
fss->show_advancedoptions = 0;
|
||||
|
||||
fss->resolutionxyz = 65;
|
||||
|
Loading…
Reference in New Issue
Block a user