本文整理汇总了C++中SolutionPtr::getDofInterpreter方法的典型用法代码示例。如果您正苦于以下问题:C++ SolutionPtr::getDofInterpreter方法的具体用法?C++ SolutionPtr::getDofInterpreter怎么用?C++ SolutionPtr::getDofInterpreter使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SolutionPtr
的用法示例。
在下文中一共展示了SolutionPtr::getDofInterpreter方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
SolutionPtr solution = Solution::solution(mesh, bc, rhs, graphNorm);
solution->setUseCondensedSolve(useStaticCondensation);
mesh->registerSolution(solution); // sign up for projection of old solution onto refined cells.
double energyThreshold = 0.2;
RefinementStrategy refinementStrategy( solution, energyThreshold );
refinementStrategy.setReportPerCellErrors(true);
refinementStrategy.setEnforceOneIrregularity(enforceOneIrregularity);
Teuchos::RCP<Solver> coarseSolver, fineSolver;
if (useMumps)
{
#ifdef HAVE_AMESOS_MUMPS
coarseSolver = Teuchos::rcp( new MumpsSolver(512, true) );
#else
cout << "useMumps=true, but MUMPS is not available!\n";
exit(0);
#endif
}
else
{
coarseSolver = Teuchos::rcp( new KluSolver );
}
GMGSolver* gmgSolver;
if (useGMGSolver)
{
double tol = relativeTol;
int maxIters = gmgMaxIterations;
BCPtr zeroBCs = bc->copyImposingZero();
gmgSolver = new GMGSolver(zeroBCs, k0Mesh, graphNorm, mesh, solution->getDofInterpreter(),
solution->getPartitionMap(), maxIters, tol, coarseSolver,
useStaticCondensation);
gmgSolver->setAztecOutput(AztecOutputLevel);
gmgSolver->setUseConjugateGradient(true);
gmgSolver->gmgOperator()->setSmootherType(GMGOperator::IFPACK_ADDITIVE_SCHWARZ);
gmgSolver->gmgOperator()->setSmootherOverlap(smootherOverlap);
fineSolver = Teuchos::rcp( gmgSolver );
}
else
{
fineSolver = coarseSolver;
}
// if (rank==0) cout << "experimentally starting by solving with MUMPS on the fine mesh.\n";
// solution->solve( Teuchos::rcp( new MumpsSolver) );
solution->solve(fineSolver);
#ifdef HAVE_EPETRAEXT_HDF5
ostringstream dir_name;
dir_name << "poissonCavityFlow_k" << k;
HDF5Exporter exporter(mesh,dir_name.str());
exporter.exportSolution(solution,varFactory,0);
#endif
#ifdef HAVE_AMESOS_MUMPS
if (useMumps) coarseSolver = Teuchos::rcp( new MumpsSolver(512, true) );
#endif
solution->reportTimings();