MFEM v2.0
|
00001 // Copyright (c) 2010, Lawrence Livermore National Security, LLC. Produced at 00002 // the Lawrence Livermore National Laboratory. LLNL-CODE-443211. All Rights 00003 // reserved. See file COPYRIGHT for details. 00004 // 00005 // This file is part of the MFEM library. For more information and source code 00006 // availability see http://mfem.googlecode.com. 00007 // 00008 // MFEM is free software; you can redistribute it and/or modify it under the 00009 // terms of the GNU Lesser General Public License (as published by the Free 00010 // Software Foundation) version 2.1 dated February 1999. 00011 00012 #ifndef MFEM_PBILINEARFORM 00013 #define MFEM_PBILINEARFORM 00014 00016 class ParBilinearForm : public BilinearForm 00017 { 00018 protected: 00019 ParFiniteElementSpace *pfes; 00020 00021 HypreParMatrix *ParallelAssemble(SparseMatrix *m); 00022 00023 public: 00024 ParBilinearForm(ParFiniteElementSpace *pf) 00025 : BilinearForm(pf) { pfes = pf; } 00026 00027 ParBilinearForm(ParFiniteElementSpace *pf, ParBilinearForm *bf) 00028 : BilinearForm(pf, bf) { pfes = pf; } 00029 00031 HypreParMatrix *ParallelAssemble() { return ParallelAssemble(mat); } 00032 00034 HypreParMatrix *ParallelAssembleElim() { return ParallelAssemble(mat_e); } 00035 00036 virtual ~ParBilinearForm() { } 00037 }; 00038 00041 class ParDiscreteLinearOperator : public DiscreteLinearOperator 00042 { 00043 protected: 00044 ParFiniteElementSpace *domain_fes; 00045 ParFiniteElementSpace *range_fes; 00046 00047 HypreParMatrix *ParallelAssemble(SparseMatrix *m); 00048 00049 public: 00050 ParDiscreteLinearOperator(ParFiniteElementSpace *dfes, 00051 ParFiniteElementSpace *rfes) 00052 : DiscreteLinearOperator(dfes, rfes) { domain_fes=dfes; range_fes=rfes; } 00053 00055 HypreParMatrix *ParallelAssemble() { return ParallelAssemble(mat); } 00056 00059 void GetParBlocks(Array2D<HypreParMatrix *> &blocks) const; 00060 00061 virtual ~ParDiscreteLinearOperator() { } 00062 }; 00063 00064 #endif