Ignore:
Timestamp:
Apr 24, 2012, 2:26:14 PM (14 years ago)
Author:
Julian Iseringhausen <isering@…>
Children:
b51c3b
Parents:
e3dbbf
Message:

Fix energy calculation.

git-svn-id: https://svn.version.fz-juelich.de/scafacos/trunk@1729 5161e1c8-67bf-11de-9fd5-51895aff932f

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/samples/techniques.hpp

    re3dbbf r716da7  
    152152  }
    153153
     154  static void SetCorrectionSchemePeriodicParticle(int minLevel, int maxLevel, int gamma)
     155  {
     156    CommandList* init = new CommandList();
     157    CommandList* loop = new CommandList();
     158    CommandList* finalize = new CommandList();
     159
     160    init->AddCommand("ClearGrid", "RHS");
     161    init->AddCommand("ClearGrid", "SOL");
     162    init->AddCommand("ImportRightHandSide");
     163    init->AddCommand("CheckConsistency", "RHS");
     164    init->AddCommand("InitializeIterationCounter");
     165    init->AddCommand("InitializeResidualNorm", "INITIAL_RESIDUAL");
     166
     167    loop->AddCommand("ClearCoarseLevels", "SOL");
     168    loop->AddCommand("ClearCoarseLevels", "RHS");
     169
     170    AddCycleGamma(*loop, maxLevel-minLevel+1, gamma);
     171
     172    loop->AddCommand("ComputeResidualNorm", "RESIDUAL");
     173    loop->AddCommand("CheckResidual", "RESIDUAL");
     174    loop->AddCommand("CheckRelativeResidual", "RESIDUAL:INITIAL_RESIDUAL");
     175    loop->AddCommand("CheckIterationCounter");
     176
     177    finalize->AddCommand("ExportSolution");
     178
     179    init->Register("COMMANDLIST_INIT");
     180    loop->Register("COMMANDLIST_LOOP");
     181    finalize->Register("COMMANDLIST_FINALIZE");
     182  }
     183
     184  static void SetCorrectionSchemePeriodicParticleDebug(int minLevel, int maxLevel, int gamma)
     185  {
     186    CommandList* init = new CommandList();
     187    CommandList* loop = new CommandList();
     188    CommandList* finalize = new CommandList();
     189
     190    init->AddCommand("ClearGrid", "RHS");
     191    init->AddCommand("ClearGrid", "SOL");
     192    init->AddCommand("ImportRightHandSide");
     193    init->AddCommand("CheckConsistency", "RHS");
     194    init->AddCommand("InitializeIterationCounter");
     195    init->AddCommand("InitializeResidualNorm", "INITIAL_RESIDUAL");
     196    init->AddCommand("PrintAllSettings");
     197
     198    loop->AddCommand("ClearCoarseLevels", "SOL");
     199    loop->AddCommand("ClearCoarseLevels", "RHS");
     200
     201    AddCycleGammaDebug(*loop, maxLevel-minLevel+1, gamma);
     202
     203    loop->AddCommand("ComputeResidualNorm", "RESIDUAL");
     204    loop->AddCommand("CheckResidual", "RESIDUAL");
     205    loop->AddCommand("CheckRelativeResidual", "RESIDUAL:INITIAL_RESIDUAL");
     206    loop->AddCommand("CheckIterationCounter");
     207
     208    finalize->AddCommand("ExportSolution");
     209
     210    init->Register("COMMANDLIST_INIT");
     211    loop->Register("COMMANDLIST_LOOP");
     212    finalize->Register("COMMANDLIST_FINALIZE");
     213  }
     214
    154215  static void SetFullApproximationSchemeDirichlet(int minLevel, int maxLevel, int gamma)
    155216  {
Note: See TracChangeset for help on using the changeset viewer.