本文整理汇总了C++中FEProblem::n_processors方法的典型用法代码示例。如果您正苦于以下问题:C++ FEProblem::n_processors方法的具体用法?C++ FEProblem::n_processors怎么用?C++ FEProblem::n_processors使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FEProblem
的用法示例。
在下文中一共展示了FEProblem::n_processors方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
std::string
outputMeshInformation(FEProblem & problem, bool verbose)
{
std::stringstream oss;
oss << std::left;
MooseMesh & moose_mesh = problem.mesh();
MeshBase & mesh = moose_mesh.getMesh();
if (verbose)
{
oss << "Mesh: " << '\n'
<< std::setw(console_field_width) << " Distribution: " << (moose_mesh.isParallelMesh() ? "parallel" : "serial")
<< (moose_mesh.isDistributionForced() ? " (forced) " : "") << '\n'
<< std::setw(console_field_width) << " Mesh Dimension: " << mesh.mesh_dimension() << '\n'
<< std::setw(console_field_width) << " Spatial Dimension: " << mesh.spatial_dimension() << '\n';
}
oss << std::setw(console_field_width) << " Nodes:" << '\n'
<< std::setw(console_field_width) << " Total:" << mesh.n_nodes() << '\n'
<< std::setw(console_field_width) << " Local:" << mesh.n_local_nodes() << '\n'
<< std::setw(console_field_width) << " Elems:" << '\n'
<< std::setw(console_field_width) << " Total:" << mesh.n_elem() << '\n'
<< std::setw(console_field_width) << " Local:" << mesh.n_local_elem() << '\n';
if (verbose)
{
oss << std::setw(console_field_width) << " Num Subdomains: " << static_cast<std::size_t>(mesh.n_subdomains()) << '\n'
<< std::setw(console_field_width) << " Num Partitions: " << static_cast<std::size_t>(mesh.n_partitions()) << '\n';
if (problem.n_processors() > 1 && moose_mesh.partitionerName() != "")
oss << std::setw(console_field_width) << " Partitioner: " << moose_mesh.partitionerName()
<< (moose_mesh.isPartitionerForced() ? " (forced) " : "")
<< '\n';
}
oss << '\n';
return oss.str();
}