genericfunction.h

来自「利用C」· C头文件 代码 · 共 56 行

H
56
字号
// Copyright (C) 2005-2008 Anders Logg.// Licensed under the GNU LGPL Version 2.1.//// First added:  2005-11-28// Last changed: 2008-03-17#ifndef __GENERIC_FUNCTION_H#define __GENERIC_FUNCTION_H#include <ufc.h>#include <dolfin/common/types.h>namespace dolfin{  class Mesh;    /// This class serves as a base class/interface for implementations  /// of specific function representations.  class GenericFunction  {  public:    /// Constructor    GenericFunction(Mesh& mesh) : mesh(mesh) {};    /// Destructor    virtual ~GenericFunction() {};    /// Return the rank of the value space    virtual uint rank() const = 0;    /// Return the dimension of the value space for axis i    virtual uint dim(uint i) const = 0;    /// Interpolate function to vertices of mesh    virtual void interpolate(real* values) const = 0;    /// Interpolate function to finite element space on cell    virtual void interpolate(real* coefficients,                             const ufc::cell& cell,                             const ufc::finite_element& finite_element) const = 0;    /// Evaluate function at given point    virtual void eval(real* values, const real* x) const = 0;    /// The mesh    Mesh& mesh;  };}#endif

⌨️ 快捷键说明

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