MFEM
v3.0
Main Page
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Pages
fem
pnonlinearform.hpp
Go to the documentation of this file.
1
// Copyright (c) 2010, Lawrence Livermore National Security, LLC. Produced at
2
// the Lawrence Livermore National Laboratory. LLNL-CODE-443211. All Rights
3
// reserved. See file COPYRIGHT for details.
4
//
5
// This file is part of the MFEM library. For more information and source code
6
// availability see http://mfem.googlecode.com.
7
//
8
// MFEM is free software; you can redistribute it and/or modify it under the
9
// terms of the GNU Lesser General Public License (as published by the Free
10
// Software Foundation) version 2.1 dated February 1999.
11
12
#ifndef MFEM_PNONLINEARFORM
13
#define MFEM_PNONLINEARFORM
14
15
#include "../config/config.hpp"
16
17
#ifdef MFEM_USE_MPI
18
19
#include "
pgridfunc.hpp
"
20
#include "
nonlinearform.hpp
"
21
22
namespace
mfem
23
{
24
26
class
ParNonlinearForm
:
public
NonlinearForm
27
{
28
protected
:
29
mutable
ParGridFunction
X
,
Y
;
30
mutable
HypreParMatrix
*
pGrad
;
31
32
public
:
33
ParNonlinearForm
(
ParFiniteElementSpace
*pf)
34
:
NonlinearForm
(pf),
X
(pf),
Y
(pf)
35
{
height
=
width
= pf->
TrueVSize
();
pGrad
= NULL; }
36
37
ParFiniteElementSpace
*
ParFESpace
()
const
38
{
return
(
ParFiniteElementSpace
*)
fes
; }
39
40
// Here, rhs is a true dof vector
41
virtual
void
SetEssentialBC
(
const
Array<int>
&bdr_attr_is_ess,
42
Vector
*rhs = NULL);
43
45
virtual
double
GetEnergy
(
const
ParGridFunction
&x)
const
;
46
48
virtual
double
GetEnergy
(
const
Vector
&x)
const
;
49
50
virtual
void
Mult
(
const
Vector
&x,
Vector
&y)
const
;
51
53
const
SparseMatrix
&
GetLocalGradient
(
const
Vector
&x)
const
;
54
55
virtual
Operator
&
GetGradient
(
const
Vector
&x)
const
;
56
57
virtual
~ParNonlinearForm
() {
delete
pGrad
; }
58
};
59
60
}
61
62
#endif // MFEM_USE_MPI
63
64
#endif
mfem::ParNonlinearForm::ParFESpace
ParFiniteElementSpace * ParFESpace() const
Definition:
pnonlinearform.hpp:37
mfem::ParNonlinearForm::~ParNonlinearForm
virtual ~ParNonlinearForm()
Definition:
pnonlinearform.hpp:57
mfem::ParNonlinearForm
Parallel non-linear operator on the true dofs.
Definition:
pnonlinearform.hpp:26
mfem::ParFiniteElementSpace
Abstract parallel finite element space.
Definition:
pfespace.hpp:28
mfem::NonlinearForm::fes
FiniteElementSpace * fes
FE space on which the form lives.
Definition:
nonlinearform.hpp:26
nonlinearform.hpp
mfem::ParNonlinearForm::ParNonlinearForm
ParNonlinearForm(ParFiniteElementSpace *pf)
Definition:
pnonlinearform.hpp:33
mfem::ParNonlinearForm::GetEnergy
virtual double GetEnergy(const ParGridFunction &x) const
Compute the energy of a ParGridFunction.
Definition:
pnonlinearform.cpp:38
mfem::SparseMatrix
Data type sparse matrix.
Definition:
sparsemat.hpp:38
mfem::ParNonlinearForm::pGrad
HypreParMatrix * pGrad
Definition:
pnonlinearform.hpp:30
mfem::ParNonlinearForm::Y
ParGridFunction Y
Definition:
pnonlinearform.hpp:29
mfem::ParNonlinearForm::X
ParGridFunction X
Definition:
pnonlinearform.hpp:29
mfem::Array< int >
mfem::ParFiniteElementSpace::TrueVSize
int TrueVSize()
Definition:
pfespace.hpp:105
mfem::ParNonlinearForm::Mult
virtual void Mult(const Vector &x, Vector &y) const
Operator application.
Definition:
pnonlinearform.cpp:56
mfem::NonlinearForm
Definition:
nonlinearform.hpp:22
mfem::ParNonlinearForm::GetLocalGradient
const SparseMatrix & GetLocalGradient(const Vector &x) const
Return the local gradient matrix for the given true-dof vector x.
Definition:
pnonlinearform.cpp:67
mfem::Operator::height
int height
Definition:
operator.hpp:24
mfem::ParNonlinearForm::GetGradient
virtual Operator & GetGradient(const Vector &x) const
Evaluate the gradient operator at the point x.
Definition:
pnonlinearform.cpp:76
mfem::ParNonlinearForm::SetEssentialBC
virtual void SetEssentialBC(const Array< int > &bdr_attr_is_ess, Vector *rhs=NULL)
Definition:
pnonlinearform.cpp:21
mfem::Vector
Vector data type.
Definition:
vector.hpp:29
pgridfunc.hpp
mfem::ParGridFunction
Class for parallel grid function.
Definition:
pgridfunc.hpp:31
mfem::Operator
Abstract operator.
Definition:
operator.hpp:21
mfem::HypreParMatrix
Wrapper for hypre's ParCSR matrix class.
Definition:
hypre.hpp:103
mfem::Operator::width
int width
Definition:
operator.hpp:24
Generated on Fri Feb 18 2022 18:57:40 for MFEM by
1.8.5