Changeset dfed1c for src/commands
- Timestamp:
- Nov 22, 2011, 9:22:10 PM (14 years ago)
- Children:
- facba0
- Parents:
- 66f24d
- Location:
- src/commands
- Files:
-
- 5 added
- 28 edited
-
com_check_consistency.cpp (modified) (3 diffs)
-
com_check_iteration_counter.cpp (modified) (2 diffs)
-
com_check_relative_residual.cpp (modified) (3 diffs)
-
com_check_residual.cpp (modified) (3 diffs)
-
com_clear_coarse_levels.cpp (modified) (2 diffs)
-
com_clear_grid.cpp (modified) (2 diffs)
-
com_compute_residual_norm.cpp (added)
-
com_copy_boundary.cpp (modified) (2 diffs)
-
com_execute_cycle.cpp (modified) (2 diffs)
-
com_execute_cycle_loop.cpp (modified) (2 diffs)
-
com_execute_full_cycle.cpp (modified) (3 diffs)
-
com_execute_full_cycle_loop.cpp (modified) (2 diffs)
-
com_export_solution.cpp (modified) (2 diffs)
-
com_force_discrete_compatibility.cpp (modified) (3 diffs)
-
com_import_rhs.cpp (modified) (3 diffs)
-
com_initialize_iteration_counter.cpp (added)
-
com_initialize_residual_norm.cpp (modified) (3 diffs)
-
com_interpolate_fmg.cpp (modified) (3 diffs)
-
com_nop.cpp (added)
-
com_print_all_settings.cpp (added)
-
com_print_defect.cpp (modified) (4 diffs)
-
com_print_grid.cpp (modified) (5 diffs)
-
com_print_grid_structure.cpp (modified) (4 diffs)
-
com_print_inner_grid.cpp (modified) (2 diffs)
-
com_print_residual_norm.cpp (modified) (3 diffs)
-
com_print_running_time.cpp (added)
-
com_prolongate.cpp (modified) (2 diffs)
-
com_restrict.cpp (modified) (2 diffs)
-
com_set_average_to_zero.cpp (modified) (2 diffs)
-
com_set_coarser_dirichlet_values.cpp (modified) (3 diffs)
-
com_set_level.cpp (modified) (3 diffs)
-
com_smooth.cpp (modified) (2 diffs)
-
com_solve.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/commands/com_check_consistency.cpp
r66f24d rdfed1c 7 7 * 8 8 */ 9 10 9 11 10 #ifdef HAVE_CONFIG_H … … 26 25 Request Run(Command::argument_vector arguments) 27 26 { 28 Multigrid* grid = MG::GetFactory().GetObject(arguments[0])->Cast<Multigrid>(); 27 MPE_EVENT_BEGIN() 28 29 Multigrid* grid = MG::GetFactory().Get(arguments[0])->Cast<Multigrid>(); 30 31 MPE_EVENT_END() 29 32 30 33 if (!(*grid)().IsConsistent()) … … 38 41 }; 39 42 40 CREATE_INITIALIZER(VMGCommandCheckConsistency) ;43 CREATE_INITIALIZER(VMGCommandCheckConsistency) -
src/commands/com_check_iteration_counter.cpp
r66f24d rdfed1c 29 29 Request Run(Command::argument_vector arguments) 30 30 { 31 const int& max_iteration = MG::GetFactory().GetObject("MAX_ITERATION")->Cast< ObjectStorage<int> >()->Val(); 32 int& iteration = MG::GetFactory().GetObject("ITERATION")->Cast< ObjectStorage<int> >()->Val(); 31 MPE_EVENT_BEGIN() 32 33 const int& max_iteration = MG::GetFactory().GetObjectStorageVal<int>("MAX_ITERATION"); 34 int& iteration = MG::GetFactory().GetObjectStorageVal<int>("ITERATION"); 35 36 MPE_EVENT_END() 33 37 34 38 if (++iteration >= max_iteration) … … 42 46 }; 43 47 44 CREATE_INITIALIZER(VMGCommandCheckIterationCounter) ;48 CREATE_INITIALIZER(VMGCommandCheckIterationCounter) -
src/commands/com_check_relative_residual.cpp
r66f24d rdfed1c 14 14 15 15 #include <cmath> 16 #include <cstdio>17 16 18 17 #include "base/command.hpp" … … 30 29 Request Run(Command::argument_vector arguments) 31 30 { 32 VMG::Comm* comm = MG::GetComm(); 31 MPE_EVENT_BEGIN() 32 33 33 VMG::Factory& factory = MG::GetFactory(); 34 34 35 const vmg_float res = comm->ComputeResidualNorm(*MG::GetSol(), *MG::GetRhs());36 const vmg_float& init_res = factory.GetObject (arguments[0])->Cast< ObjectStorage<vmg_float> >()->Val();37 const vmg_float& precision = factory.GetObject ("PRECISION")->Cast< ObjectStorage<vmg_float> >()->Val();38 const vmg_float rel_res = fabs(res / init_res);35 const vmg_float& res = factory.GetObjectStorageVal<vmg_float>(arguments[0]); 36 const vmg_float& init_res = factory.GetObjectStorageVal<vmg_float>(arguments[1]); 37 const vmg_float& precision = factory.GetObjectStorageVal<vmg_float>("PRECISION"); 38 const vmg_float rel_res = std::fabs(res / init_res); 39 39 40 if (comm->Rank() == 0) 41 printf("Multigrid: Relative residual: %e\n", rel_res); 40 #ifdef DEBUG_OUTPUT 41 MG::GetComm()->PrintStringOnce("Relative residual: %e", rel_res); 42 #endif /* DEBUG_OUTPUT */ 43 44 MPE_EVENT_END() 42 45 43 46 if (rel_res < precision) … … 48 51 49 52 static const char* Name() {return "CheckRelativeResidual";} 50 static int Arguments() {return 1;}53 static int Arguments() {return 2;} 51 54 }; 52 55 53 CREATE_INITIALIZER(VMGCommandCheckRelativeResidual) ;56 CREATE_INITIALIZER(VMGCommandCheckRelativeResidual) 54 57 -
src/commands/com_check_residual.cpp
r66f24d rdfed1c 14 14 15 15 #include <cmath> 16 #include <cstdio>17 16 18 17 #include "base/command.hpp" … … 30 29 Request Run(Command::argument_vector arguments) 31 30 { 32 const vmg_float res = MG::GetComm()->ComputeResidualNorm(*MG::GetSol(), *MG::GetRhs()); 33 const vmg_float& precision = MG::GetFactory().GetObject("PRECISION")->Cast< ObjectStorage<vmg_float> >()->Val(); 31 MPE_EVENT_BEGIN() 34 32 35 #ifdef DEBUG 36 if (MG::GetComm()->Rank() == 0) 37 printf("Multigrid: Residual: %e\n", res); 38 #endif 33 const vmg_float& res = MG::GetFactory().GetObjectStorageVal<vmg_float>(arguments[0]); 34 const vmg_float& precision = MG::GetFactory().Get("PRECISION")->Cast< ObjectStorage<vmg_float> >()->Val(); 39 35 40 if (fabs(res) < precision) 36 MPE_EVENT_END() 37 38 if (std::fabs(res) < precision) 41 39 return StopCycleLater; 42 40 else … … 45 43 46 44 static const char* Name() {return "CheckResidual";} 47 static int Arguments() {return 0;}45 static int Arguments() {return 1;} 48 46 }; 49 47 50 CREATE_INITIALIZER(VMGCommandCheckResidual) ;48 CREATE_INITIALIZER(VMGCommandCheckResidual) 51 49 -
src/commands/com_clear_coarse_levels.cpp
r66f24d rdfed1c 24 24 Request Run(Command::argument_vector arguments) 25 25 { 26 MG::GetFactory().GetObject(arguments[0])->Cast<Multigrid>()->ClearAllCoarseLevels(); 26 MPE_EVENT_BEGIN() 27 28 MG::GetFactory().Get(arguments[0])->Cast<Multigrid>()->ClearAllCoarseLevels(); 29 30 MPE_EVENT_END() 27 31 28 32 return Continue; … … 33 37 }; 34 38 35 CREATE_INITIALIZER(VMGCommandClearCoarseLevels) ;39 CREATE_INITIALIZER(VMGCommandClearCoarseLevels) 36 40 -
src/commands/com_clear_grid.cpp
r66f24d rdfed1c 25 25 Request Run(Command::argument_vector arguments) 26 26 { 27 MG::GetFactory().GetObject(arguments[0])->Cast<Multigrid>()->ClearAll(); 27 MPE_EVENT_BEGIN() 28 29 MG::GetFactory().Get(arguments[0])->Cast<Multigrid>()->ClearAll(); 30 31 MPE_EVENT_END() 28 32 29 33 return Continue; … … 34 38 }; 35 39 36 CREATE_INITIALIZER(VMGCommandClearGrid) ;40 CREATE_INITIALIZER(VMGCommandClearGrid) 37 41 -
src/commands/com_copy_boundary.cpp
r66f24d rdfed1c 23 23 Request Run(Command::argument_vector arguments) 24 24 { 25 Grid& from = (*MG::GetFactory().GetObject(arguments[0])->Cast<Multigrid>())(); 26 Grid& to = (*MG::GetFactory().GetObject(arguments[1])->Cast<Multigrid>())(); 25 MPE_EVENT_BEGIN() 26 27 Grid& from = (*MG::GetFactory().Get(arguments[0])->Cast<Multigrid>())(); 28 Grid& to = (*MG::GetFactory().Get(arguments[1])->Cast<Multigrid>())(); 27 29 28 30 to.SetBoundary(from); 31 32 MPE_EVENT_END() 29 33 30 34 return Continue; … … 35 39 }; 36 40 37 CREATE_INITIALIZER(VMGCommandCopyBoundary) ;41 CREATE_INITIALIZER(VMGCommandCopyBoundary) 38 42 -
src/commands/com_execute_cycle.cpp
r66f24d rdfed1c 23 23 Request Run(Command::argument_vector arguments) 24 24 { 25 return MG::GetFactory().GetObject(arguments[0])->Cast<CommandList>()->ExecuteList(); 25 MPE_EVENT_BEGIN() 26 27 Request req = MG::GetFactory().Get(arguments[0])->Cast<CommandList>()->ExecuteList(); 28 29 MPE_EVENT_END() 30 31 return req; 26 32 } 27 33 … … 30 36 }; 31 37 32 CREATE_INITIALIZER(VMGCommandExecuteCycle) ;38 CREATE_INITIALIZER(VMGCommandExecuteCycle) -
src/commands/com_execute_cycle_loop.cpp
r66f24d rdfed1c 23 23 Request Run(Command::argument_vector arguments) 24 24 { 25 while (MG::GetFactory().GetObject(arguments[0])->Cast<CommandList>()->ExecuteList() == Continue); 25 MPE_EVENT_BEGIN() 26 27 while (MG::GetFactory().Get(arguments[0])->Cast<CommandList>()->ExecuteList() == Continue); 28 29 MPE_EVENT_END() 26 30 27 31 return Continue; … … 32 36 }; 33 37 34 CREATE_INITIALIZER(VMGCommandExecuteCycleLoop) ;38 CREATE_INITIALIZER(VMGCommandExecuteCycleLoop) -
src/commands/com_execute_full_cycle.cpp
r66f24d rdfed1c 22 22 Request Run(Command::argument_vector arguments) 23 23 { 24 MPE_EVENT_BEGIN() 25 24 26 std::string str_init = arguments[0] + "_INIT"; 25 27 std::string str_loop = arguments[0] + "_LOOP"; … … 28 30 VMG::Factory& factory = MG::GetFactory(); 29 31 30 factory.GetObject(str_init)->Cast<CommandList>()->ExecuteList(); 31 factory.GetObject(str_loop)->Cast<CommandList>()->ExecuteList(); 32 factory.GetObject(str_finalize)->Cast<CommandList>()->ExecuteList(); 32 factory.Get(str_init)->Cast<CommandList>()->ExecuteList(); 33 factory.Get(str_loop)->Cast<CommandList>()->ExecuteList(); 34 factory.Get(str_finalize)->Cast<CommandList>()->ExecuteList(); 35 36 MPE_EVENT_END() 33 37 34 38 return Continue; … … 39 43 }; 40 44 41 CREATE_INITIALIZER(VMGCommandExecuteFullCycle) ;45 CREATE_INITIALIZER(VMGCommandExecuteFullCycle) -
src/commands/com_execute_full_cycle_loop.cpp
r66f24d rdfed1c 23 23 Request Run(Command::argument_vector arguments) 24 24 { 25 MPE_EVENT_BEGIN() 26 25 27 std::string str_init = arguments[0] + "_INIT"; 26 28 std::string str_loop = arguments[0] + "_LOOP"; 27 29 std::string str_finalize = arguments[0] + "_FINALIZE"; 28 30 29 MG::GetFactory().Get Object(str_init)->Cast<CommandList>()->ExecuteList();31 MG::GetFactory().Get(str_init)->Cast<CommandList>()->ExecuteList(); 30 32 31 while (MG::GetFactory().Get Object(str_loop)->Cast<CommandList>()->ExecuteList() == Continue);33 while (MG::GetFactory().Get(str_loop)->Cast<CommandList>()->ExecuteList() == Continue); 32 34 33 MG::GetFactory().GetObject(str_finalize)->Cast<CommandList>()->ExecuteList(); 35 MG::GetFactory().Get(str_finalize)->Cast<CommandList>()->ExecuteList(); 36 37 MPE_EVENT_END() 34 38 35 39 return Continue; … … 40 44 }; 41 45 42 CREATE_INITIALIZER(VMGCommandExecuteFullCycleLoop) ;46 CREATE_INITIALIZER(VMGCommandExecuteFullCycleLoop) -
src/commands/com_export_solution.cpp
r66f24d rdfed1c 25 25 Request Run(Command::argument_vector arguments) 26 26 { 27 MPE_EVENT_BEGIN() 28 27 29 Multigrid& sol = *MG::GetSol(); 28 30 29 31 MG::GetInterface()->ExportSolution(sol(sol.MaxLevel())); 32 33 MPE_EVENT_END() 30 34 31 35 return Continue; … … 36 40 }; 37 41 38 CREATE_INITIALIZER(VMGCommandExportSolution) ;42 CREATE_INITIALIZER(VMGCommandExportSolution) -
src/commands/com_force_discrete_compatibility.cpp
r66f24d rdfed1c 6 6 * @brief May be used to explicitly force the discrete 7 7 * compatibility condition \sum_{i,j,k} f_{i,j,k} = 0. 8 * This should not be necessary since this is also 9 * handled in the library for arbitrary compatibility 10 * conditions. 8 * 11 9 */ 12 10 … … 27 25 Request Run(Command::argument_vector arguments) 28 26 { 29 (*MG::GetRhs())().ForceDiscreteCompatibilityCondition(); 27 MPE_EVENT_BEGIN() 28 29 Grid& rhs = (*MG::GetRhs())(MG::GetRhs()->MaxLevel()); 30 Comm& comm = *MG::GetComm(); 31 32 if (comm.BoundaryConditions()[0] == Periodic && 33 comm.BoundaryConditions()[1] == Periodic && 34 comm.BoundaryConditions()[2] == Periodic) 35 rhs.ForceDiscreteCompatibilityCondition(); 36 37 MPE_EVENT_END() 30 38 31 39 return Continue; … … 36 44 }; 37 45 38 CREATE_INITIALIZER(VMGCommandForceDiscreteCompatibility) ;46 CREATE_INITIALIZER(VMGCommandForceDiscreteCompatibility) -
src/commands/com_import_rhs.cpp
r66f24d rdfed1c 14 14 15 15 #include "base/command.hpp" 16 #include "comm/comm.hpp" 16 17 #include "grid/multigrid.hpp" 17 18 #include "interface/interface.hpp" … … 25 26 Request Run(Command::argument_vector arguments) 26 27 { 28 MPE_EVENT_BEGIN() 29 27 30 MG::GetInterface()->ImportRightHandSide(*MG::GetRhs()); 31 32 MPE_EVENT_END() 28 33 29 34 return Continue; … … 34 39 }; 35 40 36 CREATE_INITIALIZER(VMGCommandImportRightHandSide) ;41 CREATE_INITIALIZER(VMGCommandImportRightHandSide) -
src/commands/com_initialize_residual_norm.cpp
r66f24d rdfed1c 13 13 #endif 14 14 15 #include <cstdio>16 17 15 #include "base/command.hpp" 18 16 #include "base/object.hpp" … … 28 26 Request Run(Command::argument_vector arguments) 29 27 { 28 MPE_EVENT_BEGIN() 29 30 30 vmg_float residual = MG::GetComm()->ComputeResidualNorm(*MG::GetSol(), *MG::GetRhs()); 31 31 new ObjectStorage<vmg_float>(arguments[0], residual); 32 32 33 if (MG::GetComm()->Rank() == 0) 34 printf("Multigrid: Initial residual: %e\n", residual); 33 #ifdef DEBUG_OUTPUT 34 MG::GetComm()->PrintStringOnce("Initial residual: %e", residual); 35 #endif /* DEBUG_OUTPUT */ 36 37 MPE_EVENT_END() 35 38 36 39 return Continue; … … 41 44 }; 42 45 43 CREATE_INITIALIZER(VMGCommandInitializeResidualNorm) ;46 CREATE_INITIALIZER(VMGCommandInitializeResidualNorm) -
src/commands/com_interpolate_fmg.cpp
r66f24d rdfed1c 8 8 * 9 9 */ 10 11 10 12 11 #ifdef HAVE_CONFIG_H … … 26 25 Request Run(Command::argument_vector arguments) 27 26 { 28 LevelOperator* lop = MG::GetFactory().GetObject("LEVELOPERATOR_FMG")->Cast<LevelOperator>(); 27 MPE_EVENT_BEGIN() 28 29 LevelOperator* lop = MG::GetFactory().Get("LEVELOPERATOR_FMG")->Cast<LevelOperator>(); 29 30 30 31 lop->Prolongate(*MG::GetSol(), *MG::GetRhs()); 32 33 MPE_EVENT_END() 31 34 32 35 return Continue; … … 37 40 }; 38 41 39 CREATE_INITIALIZER(VMGCommandInterpolateFMG) ;42 CREATE_INITIALIZER(VMGCommandInterpolateFMG) -
src/commands/com_print_defect.cpp
r66f24d rdfed1c 8 8 * 9 9 */ 10 11 10 12 11 #ifdef HAVE_CONFIG_H … … 27 26 Request Run(Command::argument_vector arguments) 28 27 { 28 MPE_EVENT_BEGIN() 29 29 30 std::stringstream buffer; 30 31 … … 38 39 comm->PrintDefect(sol(), rhs(), buffer.str().c_str()); 39 40 41 MPE_EVENT_END() 42 40 43 return Continue; 41 44 } … … 45 48 }; 46 49 47 CREATE_INITIALIZER(VMGCommandPrintDefect) ;50 CREATE_INITIALIZER(VMGCommandPrintDefect) -
src/commands/com_print_grid.cpp
r66f24d rdfed1c 1 /*2 * command_print_grid.cpp3 *4 * Created on: 16.03.20115 * Author: Julian Iseringhausen6 */7 8 1 /** 9 2 * @file com_print_grid.cpp … … 16 9 * 17 10 */ 18 19 11 20 12 #ifdef HAVE_CONFIG_H … … 36 28 Request Run(Command::argument_vector arguments) 37 29 { 30 MPE_EVENT_BEGIN() 31 38 32 std::ostringstream buffer; 39 33 40 Multigrid& grid = *MG::GetFactory().Get Object(arguments[0])->Cast<Multigrid>();34 Multigrid& grid = *MG::GetFactory().Get(arguments[0])->Cast<Multigrid>(); 41 35 42 36 buffer << "Level " << grid.Level() << " "; 37 43 38 switch (grid().Global().BoundaryType()) 44 39 { … … 56 51 break; 57 52 } 53 58 54 buffer << arguments[0]; 59 55 60 56 MG::GetComm()->PrintGrid(grid(), buffer.str().c_str()); 57 58 MPE_EVENT_END() 61 59 62 60 return Continue; … … 67 65 }; 68 66 69 CREATE_INITIALIZER(VMGCommandPrintGrid); 67 CREATE_INITIALIZER(VMGCommandPrintGrid) -
src/commands/com_print_grid_structure.cpp
r66f24d rdfed1c 1 2 1 /** 3 2 * @file com_print_grid_structure.cpp … … 9 8 * 10 9 */ 11 12 10 13 11 #ifdef HAVE_CONFIG_H … … 27 25 Request Run(Command::argument_vector arguments) 28 26 { 27 MPE_EVENT_BEGIN() 28 29 29 MG::GetComm()->DebugPrintGridStructure((*MG::GetRhs())); 30 31 MPE_EVENT_END() 30 32 31 33 return Continue; … … 36 38 }; 37 39 38 CREATE_INITIALIZER(VMGCommandPrintGridStructure) ;40 CREATE_INITIALIZER(VMGCommandPrintGridStructure) -
src/commands/com_print_inner_grid.cpp
r66f24d rdfed1c 28 28 Request Run(Command::argument_vector arguments) 29 29 { 30 MPE_EVENT_BEGIN() 31 30 32 std::ostringstream buffer; 31 Multigrid& grid = *MG::GetFactory().Get Object(arguments[0])->Cast<Multigrid>();33 Multigrid& grid = *MG::GetFactory().Get(arguments[0])->Cast<Multigrid>(); 32 34 33 35 buffer << "Level " << grid.Level() << " " << arguments[0]; 34 36 35 37 MG::GetComm()->PrintInnerGrid(grid(), buffer.str().c_str()); 38 39 MPE_EVENT_END(); 36 40 37 41 return Continue; … … 42 46 }; 43 47 44 CREATE_INITIALIZER(VMGCommandPrintInnerGrid) ;48 CREATE_INITIALIZER(VMGCommandPrintInnerGrid) -
src/commands/com_print_residual_norm.cpp
r66f24d rdfed1c 13 13 #endif 14 14 15 #include < cstdio>15 #include <sstream> 16 16 17 17 #include "base/command.hpp" 18 18 #include "comm/comm.hpp" 19 #include "grid/grid.hpp" 19 20 #include "grid/multigrid.hpp" 20 21 #include "level/level_operator.hpp" … … 28 29 Request Run(Command::argument_vector arguments) 29 30 { 30 if (MG::GetComm()->Rank() == 0) 31 printf("Multigrid: Residual: %e\n", MG::GetComm()->ComputeResidualNorm(*MG::GetSol(), *MG::GetRhs())); 31 MPE_EVENT_BEGIN() 32 33 Multigrid* sol = MG::GetSol(); 34 Multigrid* rhs = MG::GetRhs(); 35 Comm* comm = MG::GetComm(); 36 37 if ((*sol)(sol->MaxLevel()).IsActive()) { 38 vmg_float residual = comm->ComputeResidualNorm(*sol, *rhs); 39 comm->PrintStringOnce("Residual: %e", residual); 40 } 41 42 MPE_EVENT_END() 32 43 33 44 return Continue; … … 38 49 }; 39 50 40 CREATE_INITIALIZER(VMGCommandPrintResidualNorm) ;51 CREATE_INITIALIZER(VMGCommandPrintResidualNorm) -
src/commands/com_prolongate.cpp
r66f24d rdfed1c 24 24 Request Run(Command::argument_vector arguments) 25 25 { 26 MPE_EVENT_BEGIN() 27 26 28 MG::GetLevelOperator()->Prolongate(*MG::GetSol(), *MG::GetRhs()); 29 30 MPE_EVENT_END() 27 31 28 32 return Continue; … … 33 37 }; 34 38 35 CREATE_INITIALIZER(VMGCommandProlongate) ;39 CREATE_INITIALIZER(VMGCommandProlongate) -
src/commands/com_restrict.cpp
r66f24d rdfed1c 24 24 Request Run(Command::argument_vector arguments) 25 25 { 26 MPE_EVENT_BEGIN() 27 26 28 MG::GetLevelOperator()->Restrict(*MG::GetSol(), *MG::GetRhs()); 29 30 MPE_EVENT_END() 27 31 28 32 return Continue; … … 33 37 }; 34 38 35 CREATE_INITIALIZER(VMGCommandRestrict) ;39 CREATE_INITIALIZER(VMGCommandRestrict) -
src/commands/com_set_average_to_zero.cpp
r66f24d rdfed1c 25 25 Request Run(Command::argument_vector arguments) 26 26 { 27 (*MG::GetFactory().GetObject(arguments[0])->Cast<Multigrid>())().SetAverageToZero(); 27 MPE_EVENT_BEGIN() 28 29 (*MG::GetFactory().Get(arguments[0])->Cast<Multigrid>())().SetAverageToZero(); 30 31 MPE_EVENT_END() 28 32 29 33 return Continue; … … 34 38 }; 35 39 36 CREATE_INITIALIZER(VMGCommandSetAverageToZero) ;40 CREATE_INITIALIZER(VMGCommandSetAverageToZero) -
src/commands/com_set_coarser_dirichlet_values.cpp
r66f24d rdfed1c 26 26 Request Run(Command::argument_vector arguments) 27 27 { 28 MPE_EVENT_BEGIN() 29 28 30 Multigrid& rhs = *MG::GetRhs(); 29 31 Multigrid& sol = *MG::GetSol(); … … 34 36 sol(i).SetBoundary(rhs(i)); 35 37 38 MPE_EVENT_END() 39 36 40 return Continue; 37 41 } … … 41 45 }; 42 46 43 CREATE_INITIALIZER(VMGCommandSetCoarserDirichletValues) ;47 CREATE_INITIALIZER(VMGCommandSetCoarserDirichletValues) -
src/commands/com_set_level.cpp
r66f24d rdfed1c 9 9 * 10 10 */ 11 12 11 13 12 #ifdef HAVE_CONFIG_H … … 27 26 Request Run(Command::argument_vector arguments) 28 27 { 29 Multigrid* grid = MG::GetFactory().GetObject(arguments[0])->Cast<Multigrid>(); 30 ObjectStorage<int>* level = MG::GetFactory().GetObject(arguments[1])->Cast< ObjectStorage<int> >(); 28 MPE_EVENT_BEGIN() 29 30 Multigrid* grid = MG::GetFactory().Get(arguments[0])->Cast<Multigrid>(); 31 ObjectStorage<int>* level = MG::GetFactory().Get(arguments[1])->Cast< ObjectStorage<int> >(); 31 32 32 33 grid->SetLevel(level->Val()); 34 35 MPE_EVENT_END() 33 36 34 37 return Continue; … … 39 42 }; 40 43 41 CREATE_INITIALIZER(VMGCommandSetLevel) ;44 CREATE_INITIALIZER(VMGCommandSetLevel) -
src/commands/com_smooth.cpp
r66f24d rdfed1c 24 24 Request Run(Command::argument_vector arguments) 25 25 { 26 const int& steps = MG::GetFactory().GetObject(arguments[0])->Cast< ObjectStorage<int> >()->Val(); 26 MPE_EVENT_BEGIN() 27 28 const int& steps = MG::GetFactory().Get(arguments[0])->Cast< ObjectStorage<int> >()->Val(); 27 29 28 30 MG::GetSmoother()->Run(*MG::GetSol(), *MG::GetRhs(), steps); 31 32 MPE_EVENT_END() 29 33 30 34 return Continue; … … 35 39 }; 36 40 37 CREATE_INITIALIZER(VMGCommandSmooth) ;41 CREATE_INITIALIZER(VMGCommandSmooth) -
src/commands/com_solve.cpp
r66f24d rdfed1c 24 24 Request Run(Command::argument_vector arguments) 25 25 { 26 MPE_EVENT_BEGIN() 27 26 28 MG::GetSolver()->Run((*MG::GetSol())(), (*MG::GetRhs())()); 29 30 MPE_EVENT_END() 27 31 28 32 return Continue; … … 33 37 }; 34 38 35 CREATE_INITIALIZER(VMGCommandSolve) ;39 CREATE_INITIALIZER(VMGCommandSolve)
Note:
See TracChangeset
for help on using the changeset viewer.
