libmesh解析
本工作只是尝试解析原libmesh的代码,供学习使用
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 
Public 成员函数 | Public 属性 | 所有成员列表
libMesh::PetscSolverException类 参考

A specialization of the SolverException class for PETSc. 更多...

#include <petsc_solver_exception.h>

类 libMesh::PetscSolverException 继承关系图:
[图例]

Public 成员函数

 PetscSolverException (int error_code_in)
 
virtual const char * what () const noexceptoverride
 Override the what() function to provide a generic error message. 更多...
 

Public 属性

int error_code
 The error code generated by the solver. 更多...
 
std::string what_message
 string which holds the message built in the constructor. 更多...
 

详细描述

A specialization of the SolverException class for PETSc.

在文件 petsc_solver_exception.h54 行定义.

构造及析构函数说明

libMesh::PetscSolverException::PetscSolverException ( int  error_code_in)
inline

在文件 petsc_solver_exception.h57 行定义.

参考 libMesh::SolverException::error_code , 以及 libMesh::SolverException::what_message.

57  :
58  SolverException(error_code_in)
59  {
60  const char * text;
61  char * specific;
62  // This is one scenario where we don't catch the error code
63  // returned by a PETSc function :)
64  PetscErrorMessage(error_code, &text, &specific);
65 
66  // Usually the "specific" error message string is more useful than
67  // the generic text corresponding to the error_code, since many
68  // SETERRQ calls just use error_code == 1
69  if (specific)
70  what_message = std::string(specific);
71  else if (text)
72  what_message = std::string(text);
73  }
SolverException(int error_code_in)
int error_code
The error code generated by the solver.
std::string what_message
string which holds the message built in the constructor.

成员函数说明

virtual const char* libMesh::SolverException::what ( ) const
inlineoverridevirtualnoexceptinherited

Override the what() function to provide a generic error message.

在文件 libmesh_exceptions.h125 行定义.

参考 libMesh::SolverException::what_message.

126  {
127  // std::string::c_str() is noexcept in C++11, so it's safe to call
128  // in what() because it can't throw.
129  return what_message.c_str();
130  }
std::string what_message
string which holds the message built in the constructor.

类成员变量说明

int libMesh::SolverException::error_code
inherited

The error code generated by the solver.

在文件 libmesh_exceptions.h135 行定义.

参考自 PetscSolverException() , 以及 libMesh::SolverException::SolverException().

std::string libMesh::SolverException::what_message
inherited

string which holds the message built in the constructor.

在文件 libmesh_exceptions.h140 行定义.

参考自 PetscSolverException(), libMesh::SolverException::SolverException() , 以及 libMesh::SolverException::what().


该类的文档由以下文件生成: