📄 dgqmethod.h
字号:
// Copyright (C) 2003-2006 Anders Logg.// Licensed under the GNU LGPL Version 2.1.//// First added: 2005-05-02// Last changed: 2006-07-07#ifndef __DGQ_METHOD_H#define __DGQ_METHOD_H#include "Method.h"namespace dolfin{ /// Contains all numeric constants, such as nodal points and nodal weights, /// needed for the dG(q) method. The order q must be at least 0. Note that /// q refers to the polynomial order and not the order of convergence for /// the method, which is 2q + 1. class dGqMethod : public Method { public: dGqMethod(unsigned int q); /// Evaluate solution at given point real ueval(real x0, real values[], real tau) const; /// Evaluate solution at given point real ueval(real x0, uBlasVector& values, uint offset, real tau) const; /// Evaluate solution at given node (inline optimized) real ueval(real x0, real values[], uint i) const { return values[i]; } /// Compute residual at right end-point real residual(real x0, real values[], real f, real k) const; /// Compute residual at right end-point real residual(real x0, uBlasVector& values, uint offset, real f, real k) const; /// Compute new time step based on the given residual real timestep(real r, real tol, real k0, real kmax) const; /// Compute error estimate (modulo stability factor) real error(real k, real r) const; /// Display method data void disp() const; protected: void computeQuadrature(); void computeBasis(); void computeWeights(); };}#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -