本文整理汇总了C++中StatisticsVector::end方法的典型用法代码示例。如果您正苦于以下问题:C++ StatisticsVector::end方法的具体用法?C++ StatisticsVector::end怎么用?C++ StatisticsVector::end使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StatisticsVector
的用法示例。
在下文中一共展示了StatisticsVector::end方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main (int argc, char** argv)
{
LibMeshInit init(argc, argv);
PerfMon perfmon(argv[0]);
unsigned int n_subdomains = 1;
unsigned int n_rsteps = 0;
unsigned char dim = static_cast<unsigned char>(-1); // invalid dimension
double dist_fact = 0.;
bool verbose = false;
BoundaryMeshWriteMode write_bndry = BM_DISABLED;
unsigned int convert_second_order = 0;
bool addinfelems = false;
bool triangulate = false;
bool do_quality = false;
ElemQuality quality_type = DIAGONAL;
#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
InfElemBuilder::InfElemOriginValue origin_x(false, 0.);
InfElemBuilder::InfElemOriginValue origin_y(false, 0.);
InfElemBuilder::InfElemOriginValue origin_z(false, 0.);
#endif
bool x_sym=false;
bool y_sym=false;
bool z_sym=false;
std::vector<std::string> names;
std::vector<std::string> var_names;
std::vector<Number> soln;
process_cmd_line(argc, argv, names,
n_subdomains, n_rsteps, dim,
dist_fact, verbose, write_bndry,
convert_second_order,
triangulate,
do_quality,
quality_type,
addinfelems,
#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
origin_x, origin_y, origin_z,
#endif
x_sym, y_sym, z_sym);
AutoPtr<Mesh> mesh_ptr;
if (dim == static_cast<unsigned char>(-1))
{
mesh_ptr.reset(new Mesh(init.comm()));
}
else
{
mesh_ptr.reset(new Mesh(init.comm(),dim));
}
Mesh& mesh = *mesh_ptr;
MeshData mesh_data(mesh);
/**
* Read the input mesh
*/
if (!names.empty())
{
/*
* activate the MeshData of the dim mesh,
* so that it can be copied to the boundary
*/
if (write_bndry == BM_WITH_MESHDATA)
{
mesh_data.activate();
if (verbose)
mesh_data.print_info();
}
mesh.read(names[0]);
if (verbose)
{
mesh.print_info();
mesh.get_boundary_info().print_summary();
}
}
else
{
libMesh::out << "No input specified." << std::endl;
return 1;
}
//.........这里部分代码省略.........
示例2: main
//.........这里部分代码省略.........
// Specify origin z coordinate
if (command_line.search(1, "-z"))
{
origin_z.first = true;
origin_z.second = command_line.next(origin_z.second);
}
// Symmetries
if (command_line.search(1, "-X"))
x_sym = true;
if (command_line.search(1, "-Y"))
y_sym = true;
if (command_line.search(1, "-Z"))
z_sym = true;
#endif // LIBMESH_ENABLE_INFINITE_ELEMENTS
// Read the input mesh
Mesh mesh(init.comm());
if (!names.empty())
{
mesh.read(names[0]);
if (verbose)
{
mesh.print_info();
mesh.get_boundary_info().print_summary();
}
}
else
{
libMesh::out << "No input specified." << std::endl;
return 1;
}
#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
if (addinfelems)
{
if (names.size() == 3)
libmesh_error_msg("ERROR: Invalid combination: Building infinite elements\n"
<< "not compatible with solution import.");
if (write_bndry != BM_DISABLED)
libmesh_error_msg("ERROR: Invalid combination: Building infinite elements\n"
<< "not compatible with writing boundary conditions.");
// Sanity checks: -X/Y/Z can only be used, when the
// corresponding coordinate is also given (using -x/y/z)
if ((x_sym && !origin_x.first) || // claim x-symmetry, but x-coordinate of origin not given!
(y_sym && !origin_y.first) || // the same for y
(z_sym && !origin_z.first)) // the same for z
libmesh_error_msg("ERROR: When x-symmetry is requested using -X, then\n"
<< "the option -x <coord> also has to be given.\n"
<< "This holds obviously for y and z, too.");
// build infinite elements
InfElemBuilder(mesh).build_inf_elem(origin_x, origin_y, origin_z,
x_sym, y_sym, z_sym,
verbose);
if (verbose)