本文整理汇总了C++中FEProblem::getCoordSystem方法的典型用法代码示例。如果您正苦于以下问题:C++ FEProblem::getCoordSystem方法的具体用法?C++ FEProblem::getCoordSystem怎么用?C++ FEProblem::getCoordSystem使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FEProblem
的用法示例。
在下文中一共展示了FEProblem::getCoordSystem方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: BoundingBox
MeshTools::BoundingBox
MultiApp::getBoundingBox(unsigned int app)
{
if (!_has_an_app)
mooseError("No app for " << name() << " on processor " << _orig_rank);
FEProblem * problem = appProblem(app);
MPI_Comm swapped = Moose::swapLibMeshComm(_my_comm);
MooseMesh & mesh = problem->mesh();
MeshTools::BoundingBox bbox = MeshTools::bounding_box(mesh);
Moose::swapLibMeshComm(swapped);
Point min = bbox.min();
Point max = bbox.max();
Point inflation_amount = (max-min)*_inflation;
Point inflated_min = min - inflation_amount;
Point inflated_max = max + inflation_amount;
// This is where the app is located. We need to shift by this amount.
Point p = position(app);
Point shifted_min = inflated_min;
Point shifted_max = inflated_max;
// If the problem is RZ then we're going to invent a box that would cover the whole "3D" app
// FIXME: Assuming all subdomains are the same coordinate system type!
if (problem->getCoordSystem(*(problem->mesh().meshSubdomains().begin())) == Moose::COORD_RZ)
{
shifted_min(0) = -inflated_max(0);
shifted_min(1) = inflated_min(1);
shifted_min(2) = -inflated_max(0);
shifted_max(0) = inflated_max(0);
shifted_max(1) = inflated_max(1);
shifted_max(2) = inflated_max(0);
}
// Shift them to the position they're supposed to be
shifted_min += p;
shifted_max += p;
return MeshTools::BoundingBox(shifted_min, shifted_max);
}