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

📄 assembler.h

📁 利用C
💻 H
字号:
// Copyright (C) 2007-2008 Anders Logg.// Licensed under the GNU LGPL Version 2.1.//// Modified by Garth N. Wells, 2007//// First added:  2007-01-17// Last changed: 2008-04-08#ifndef __ASSEMBLER_H#define __ASSEMBLER_H#include <ufc.h>#include <dolfin/common/Array.h>#include <dolfin/mesh/MeshFunction.h>namespace dolfin{  class DofMapSet;  class GenericTensor;  class Function;  class Form;  class Mesh;  class SubDomain;  class UFC;  /// This class provides automated assembly of linear systems, or  /// more generally, assembly of a sparse tensor from a given  /// variational form.  class Assembler  {  public:    /// Constructor    Assembler(Mesh& mesh);    /// Destructor    ~Assembler();    /// Assemble tensor from given variational form    void assemble(GenericTensor& A, Form& form, bool reset_tensor = true);    /// Assemble tensor from given variational form over a sub domain    void assemble(GenericTensor& A, Form& form,                  const SubDomain& sub_domain, bool reset_tensor = true);    /// Assemble tensor from given variational form over a sub domain    //void assemble(GenericTensor& A, Form& form,    //              const MeshFunction<uint>& domains, uint domain, bool reset_tensor = true);    /// Assemble tensor from given variational form over sub domains    void assemble(GenericTensor& A, Form& form,                  const MeshFunction<uint>& cell_domains,                  const MeshFunction<uint>& exterior_facet_domains,                  const MeshFunction<uint>& interior_facet_domains, bool reset_tensor = true);        /// Assemble scalar from given variational form    real assemble(Form& form);        /// Assemble scalar from given variational form over a sub domain    real assemble(Form& form, const SubDomain& sub_domain);        /// Assemble scalar from given variational form over sub domains    real assemble(Form& form,                  const MeshFunction<uint>& cell_domains,                  const MeshFunction<uint>& exterior_facet_domains,                  const MeshFunction<uint>& interior_facet_domains);        /// Assemble tensor from given (UFC) form, coefficients and sub domains.    /// This is the main assembly function in DOLFIN. All other assembly functions    /// end up calling this function.    ///    /// The MeshFunction arguments can be used to specify assembly over subdomains    /// of the mesh cells, exterior facets and interior facets. Either a null pointer    /// or an empty MeshFunction may be used to specify that the tensor should be    /// assembled over the entire set of cells or facets.    void assemble(GenericTensor& A, const ufc::form& form,                  const Array<Function*>& coefficients,                  const DofMapSet& dof_map_set,                  const MeshFunction<uint>* cell_domains,                  const MeshFunction<uint>* exterior_facet_domains,                  const MeshFunction<uint>* interior_facet_domains, bool reset_tensor = true);        private:     // Assemble over cells    void assembleCells(GenericTensor& A,                       const Array<Function*>& coefficients,                       const DofMapSet& dof_set_map,                       UFC& data,                       const MeshFunction<uint>* domains) const;    // Assemble over exterior facets    void assembleExteriorFacets(GenericTensor& A,                                const Array<Function*>& coefficients,                                const DofMapSet& dof_set_map,                                UFC& data,                                const MeshFunction<uint>* domains) const;    // Assemble over interior facets    void assembleInteriorFacets(GenericTensor& A,                                const Array<Function*>& coefficients,                                const DofMapSet& dof_set_map,                                UFC& data,                                const MeshFunction<uint>* domains) const;    // Check arguments    void check(const ufc::form& form,               const Array<Function*>& coefficients,               const Mesh& mesh) const;    // Initialize global tensor    void initGlobalTensor(GenericTensor& A, const DofMapSet& dof_map_set, UFC& ufc, bool reset_tensor) const;    // Pretty-printing for progress bar    std::string progressMessage(uint rank, std::string integral_type) const;    // The mesh    Mesh& mesh;  };}#endif

⌨️ 快捷键说明

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