MFEM  v4.2.0
Finite element discretization library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
plinearform.cpp
Go to the documentation of this file.
1 // Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
2 // at the Lawrence Livermore National Laboratory. All Rights reserved. See files
3 // LICENSE and NOTICE for details. LLNL-CODE-806117.
4 //
5 // This file is part of the MFEM library. For more information and source code
6 // availability visit https://mfem.org.
7 //
8 // MFEM is free software; you can redistribute it and/or modify it under the
9 // terms of the BSD-3 license. We welcome feedback and contributions, see file
10 // CONTRIBUTING.md for details.
11 
12 #include "../config/config.hpp"
13 
14 #ifdef MFEM_USE_MPI
15 
16 #include "fem.hpp"
17 
18 namespace mfem
19 {
20 
22 {
23  if (pf) { pfes = pf; }
25 }
26 
28 {
29  pfes = pf;
30  LinearForm::Update(pf,v,v_offset);
31 }
32 
34 {
35  LinearForm::MakeRef(f, v, v_offset);
36  pfes = dynamic_cast<ParFiniteElementSpace*>(f);
37  MFEM_ASSERT(pfes != NULL, "not a ParFiniteElementSpace");
38 }
39 
41 {
42  LinearForm::MakeRef(pf, v, v_offset);
43  pfes = pf;
44 }
45 
47 {
48  const Operator* prolong = pfes->GetProlongationMatrix();
49  prolong->MultTranspose(*this, tv);
50 }
51 
53 {
55  const Operator* prolong = pfes->GetProlongationMatrix();
56  prolong->MultTranspose(*this, *tv);
57  return tv;
58 }
59 
60 }
61 
62 #endif
HypreParVector * NewTrueDofVector()
Definition: pfespace.hpp:291
virtual void MakeRef(FiniteElementSpace *f, Vector &v, int v_offset)
Make the ParLinearForm reference external data on a new FiniteElementSpace.
Definition: plinearform.cpp:33
virtual const Operator * GetProlongationMatrix() const
The returned Operator is owned by the FiniteElementSpace.
Definition: pfespace.cpp:895
virtual void MakeRef(FiniteElementSpace *f, Vector &v, int v_offset)
Make the LinearForm reference external data on a new FiniteElementSpace.
Definition: linearform.cpp:207
Abstract parallel finite element space.
Definition: pfespace.hpp:28
virtual void MultTranspose(const Vector &x, Vector &y) const
Action of the transpose operator: y=A^t(x). The default behavior in class Operator is to generate an ...
Definition: operator.hpp:92
Wrapper for hypre&#39;s parallel vector class.
Definition: hypre.hpp:70
Class FiniteElementSpace - responsible for providing FEM view of the mesh, mainly managing the set of...
Definition: fespace.hpp:87
HypreParVector * ParallelAssemble()
Returns the vector assembled on the true dofs, i.e. P^t v.
Definition: plinearform.cpp:52
void Update()
Update the object according to the associated FE space fes.
Definition: linearform.hpp:166
ParFiniteElementSpace * pfes
Points to the same object as fes.
Definition: plinearform.hpp:29
Vector data type.
Definition: vector.hpp:51
Abstract operator.
Definition: operator.hpp:24
double f(const Vector &p)