epetrafactory.cpp
来自「利用C」· C++ 代码 · 共 48 行
CPP
48 行
// Copyright (C) 2008 Martin Sandve Alnes, Kent-Andre Mardal and Johannes Ring.// Licensed under the GNU LGPL Version 2.1.//// First added: 2008-04-21#ifdef HAS_TRILINOS#include "EpetraSparsityPattern.h"#include "EpetraMatrix.h"#include "EpetraVector.h"#include "EpetraFactory.h"#include <Epetra_SerialComm.h>using namespace dolfin;//-----------------------------------------------------------------------------EpetraFactory:: EpetraFactory() { comm = new Epetra_SerialComm(); }//-----------------------------------------------------------------------------EpetraMatrix* EpetraFactory::createMatrix() const { return new EpetraMatrix();}//-----------------------------------------------------------------------------EpetraSparsityPattern* EpetraFactory::createPattern() const { return new EpetraSparsityPattern(); }//-----------------------------------------------------------------------------EpetraVector* EpetraFactory::createVector() const { return new EpetraVector(); }//-----------------------------------------------------------------------------Epetra_SerialComm& EpetraFactory::getSerialComm(){ return *comm;};//-----------------------------------------------------------------------------// Singleton instanceEpetraFactory EpetraFactory::factory;#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?