⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 steady_solver.c

📁 一个用来实现偏微分方程中网格的计算库
💻 C
字号:
#include "diff_solver.h"#include "diff_system.h"#include "steady_solver.h"SteadySolver::~SteadySolver (){}  bool SteadySolver::element_residual(bool request_jacobian){  // If a fixed solution is requested, it will just be the current  // solution  if (_system.use_fixed_solution)    {      _system.elem_fixed_solution = _system.elem_solution;      _system.fixed_solution_derivative = 1.0;    }  bool jacobian_computed =    _system.element_time_derivative(request_jacobian);  // The user shouldn't compute a jacobian unless requested  libmesh_assert(request_jacobian || !jacobian_computed);  bool jacobian_computed2 =    _system.element_constraint(jacobian_computed);  // The user shouldn't compute a jacobian unless requested  libmesh_assert (jacobian_computed || !jacobian_computed2);  return jacobian_computed && jacobian_computed2;}bool SteadySolver::side_residual(bool request_jacobian){  // If a fixed solution is requested, it will just be the current  // solution  if (_system.use_fixed_solution)    {      _system.elem_fixed_solution = _system.elem_solution;      _system.fixed_solution_derivative = 1.0;    }  bool jacobian_computed =    _system.side_time_derivative(request_jacobian);  // The user shouldn't compute a jacobian unless requested  libmesh_assert (request_jacobian || !jacobian_computed);  bool jacobian_computed2 =    _system.side_constraint(jacobian_computed);  // The user shouldn't compute a jacobian unless requested  libmesh_assert (jacobian_computed || !jacobian_computed2);    return jacobian_computed && jacobian_computed2;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -