MFEM  v4.1.0
Finite element discretization library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
nonlinearform_ext.hpp
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 #ifndef NONLINEARFORM_EXT_HPP
13 #define NONLINEARFORM_EXT_HPP
14 
15 #include "../config/config.hpp"
16 #include "fespace.hpp"
17 
18 namespace mfem
19 {
20 class NonlinearForm;
21 
23 {
24 protected:
25  NonlinearForm *n; ///< Not owned
26 public:
28  virtual void AssemblePA() = 0;
29 };
30 
31 /// Data and methods for partially-assembled nonlinear forms
33 {
34 protected:
35  const FiniteElementSpace &fes; // Not owned
36  mutable Vector localX, localY;
37  const Operator *elem_restrict_lex; // Not owned
38 public:
40  void AssemblePA();
41  void Mult(const Vector &x, Vector &y) const;
42 };
43 }
44 #endif // NONLINEARFORM_EXT_HPP
const FiniteElementSpace & fes
Data and methods for partially-assembled nonlinear forms.
NonlinearFormExtension(NonlinearForm *form)
NonlinearForm * n
Not owned.
void Mult(const Vector &x, Vector &y) const
Operator application: y=A(x).
Class FiniteElementSpace - responsible for providing FEM view of the mesh, mainly managing the set of...
Definition: fespace.hpp:87
virtual void AssemblePA()=0
Vector data type.
Definition: vector.hpp:48
Abstract operator.
Definition: operator.hpp:24