本文整理汇总了C++中EquationSystems::n_active_dofs方法的典型用法代码示例。如果您正苦于以下问题:C++ EquationSystems::n_active_dofs方法的具体用法?C++ EquationSystems::n_active_dofs怎么用?C++ EquationSystems::n_active_dofs使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EquationSystems
的用法示例。
在下文中一共展示了EquationSystems::n_active_dofs方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: write_output_solvedata
void write_output_solvedata(EquationSystems & es,
unsigned int a_step,
unsigned int newton_steps,
unsigned int krylov_steps,
unsigned int tv_sec,
unsigned int tv_usec)
{
MeshBase & mesh = es.get_mesh();
unsigned int n_active_elem = mesh.n_active_elem();
unsigned int n_active_dofs = es.n_active_dofs();
if (mesh.processor_id() == 0)
{
// Write out the number of elements/dofs used
std::ofstream activemesh ("out_activemesh.m",
std::ios_base::app | std::ios_base::out);
activemesh.precision(17);
activemesh << (a_step + 1) << ' '
<< n_active_elem << ' '
<< n_active_dofs << std::endl;
// Write out the number of solver steps used
std::ofstream solvesteps ("out_solvesteps.m",
std::ios_base::app | std::ios_base::out);
solvesteps.precision(17);
solvesteps << newton_steps << ' '
<< krylov_steps << std::endl;
// Write out the clock time
std::ofstream clocktime ("out_clocktime.m",
std::ios_base::app | std::ios_base::out);
clocktime.precision(17);
clocktime << tv_sec << '.' << tv_usec << std::endl;
}
}