~ubuntu-branches/ubuntu/maverick/blender/maverick

« back to all changes in this revision

Viewing changes to intern/elbeem/intern/solver_init.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Khashayar Naderehvandi, Khashayar Naderehvandi, Alessio Treglia
  • Date: 2009-01-22 16:53:59 UTC
  • mfrom: (14.1.1 experimental)
  • Revision ID: james.westby@ubuntu.com-20090122165359-v0996tn7fbit64ni
Tags: 2.48a+dfsg-1ubuntu1
[ Khashayar Naderehvandi ]
* Merge from debian experimental (LP: #320045), Ubuntu remaining changes:
  - Add patch correcting header file locations.
  - Add libvorbis-dev and libgsm1-dev to Build-Depends.
  - Use avcodec_decode_audio2() in source/blender/src/hddaudio.c

[ Alessio Treglia ]
* Add missing previous changelog entries.

Show diffs side-by-side

added added

removed removed

Lines of Context:
328
328
        mInit2dYZ(false),
329
329
        mForceTadapRefine(-1), mCutoff(-1)
330
330
{
331
 
  // not much to do here... 
 
331
        mpControl = new LbmControlData();
 
332
 
332
333
#if LBM_INCLUDE_TESTSOLVERS==1
333
334
        mpTest = new LbmTestdata();
334
335
        mMpNum = mMpIndex = 0;
438
439
        delete mpIso;
439
440
        if(mpPreviewSurface) delete mpPreviewSurface;
440
441
        // cleanup done during scene deletion...
 
442
        
 
443
        if(mpControl) delete mpControl;
441
444
 
442
445
        // always output performance estimate
443
446
        debMsgStd("LbmFsgrSolver::~LbmFsgrSolver",DM_MSG," Avg. MLSUPS:"<<(mAvgMLSUPS/mAvgMLSUPSCnt), 5);
488
491
        mSimulationTime += starttimeskip;
489
492
        if(starttimeskip>0.) debMsgStd("LbmFsgrSolver::parseStdAttrList",DM_NOTIFY,"Used starttimeskip="<<starttimeskip<<", t="<<mSimulationTime, 1);
490
493
 
 
494
        mpControl->parseControldataAttrList(mpSifAttrs);
 
495
 
491
496
#if LBM_INCLUDE_TESTSOLVERS==1
492
497
        mUseTestdata = 0;
493
498
        mUseTestdata = mpSifAttrs->readBool("use_testdata", mUseTestdata,"LbmFsgrSolver", "mUseTestdata", false);
689
694
 
690
695
                // restrict max. chunk of 1 mem block to 1GB for windos
691
696
                bool memBlockAllocProblem = false;
692
 
                double maxWinMemChunk = 1100.*1024.*1024.;
693
 
                double maxMacMemChunk = 1200.*1024.*1024.;
694
697
                double maxDefaultMemChunk = 2.*1024.*1024.*1024.;
695
698
                //std::cerr<<" memEstFine "<< memEstFine <<" maxWin:" <<maxWinMemChunk <<" maxMac:" <<maxMacMemChunk ; // DEBUG
696
699
#ifdef WIN32
697
 
                if(memEstFine> maxWinMemChunk) {
 
700
                double maxWinMemChunk = 1100.*1024.*1024.;
 
701
                if(sizeof(void *)==4 && memEstFine>maxWinMemChunk) {
698
702
                        memBlockAllocProblem = true;
699
703
                }
700
704
#endif // WIN32
701
705
#ifdef __APPLE__
 
706
                double maxMacMemChunk = 1200.*1024.*1024.;
702
707
                if(memEstFine> maxMacMemChunk) {
703
708
                        memBlockAllocProblem = true;
704
709
                }
705
710
#endif // Mac
706
 
                if(sizeof(void *)==4 && memEstFine>maxDefaultMemChunk) {
 
711
                if(sizeof(void*)==4 && memEstFine>maxDefaultMemChunk) {
707
712
                        // max memory chunk for 32bit systems 2gig
708
713
                        memBlockAllocProblem = true;
709
714
                }
1264
1269
  debMsgStd("LbmFsgrSolver::initialize",DM_MSG,"Init done ... ",10);
1265
1270
        mInitDone = 1;
1266
1271
 
1267
 
#if LBM_INCLUDE_TESTSOLVERS==1
 
1272
        // init fluid control
1268
1273
        initCpdata();
 
1274
 
 
1275
#if LBM_INCLUDE_TESTSOLVERS==1
1269
1276
        initTestdata();
1270
1277
#endif // ELBEEM_PLUGIN!=1
1271
1278
        // not inited? dont use...