📄 constantfunction.h
字号:
// Copyright (C) 2006-2008 Anders Logg.// Licensed under the GNU LGPL Version 2.1.//// First added: 2006-02-09// Last changed: 2008-03-17#ifndef __CONSTANT_FUNCTION_H#define __CONSTANT_FUNCTION_H#include "GenericFunction.h"namespace dolfin{ /// This class implements the functionality for functions /// that take a single constant value. class ConstantFunction : public GenericFunction, public ufc::function { public: /// Create constant function from given value ConstantFunction(Mesh& mesh, real value); /// Destructor ~ConstantFunction(); /// Return the rank of the value space uint rank() const; /// Return the dimension of the value space for axis i uint dim(uint i) const; /// Interpolate function to vertices of mesh void interpolate(real* values) const; /// Interpolate function to finite element space on cell void interpolate(real* coefficients, const ufc::cell& cell, const ufc::finite_element& finite_element) const; /// Evaluate function at given point void eval(real* values, const real* x) const; /// Evaluate function at given point in cell (UFC function interface) void evaluate(real* values, const real* coordinates, const ufc::cell& cell) const; private: // Value of constant function real value; // Size of value (number of entries in tensor value) mutable uint size; };}#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -