MFEM
v3.0
Main Page
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Pages
fem
nonlinearform.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_NONLINEARFORM
13
#define MFEM_NONLINEARFORM
14
15
#include "../config/config.hpp"
16
#include "
nonlininteg.hpp
"
17
#include "
fespace.hpp
"
18
19
namespace
mfem
20
{
21
22
class
NonlinearForm
:
public
Operator
23
{
24
protected
:
26
FiniteElementSpace
*
fes
;
27
29
Array<NonlinearFormIntegrator*>
dfi
;
30
31
mutable
SparseMatrix
*
Grad
;
32
33
// A list of all essential vdofs
34
Array<int>
ess_vdofs
;
35
36
public
:
37
NonlinearForm
(
FiniteElementSpace
*f)
38
:
Operator
(f->GetVSize()) {
fes
= f;
Grad
= NULL; }
39
41
void
AddDomainIntegrator
(
NonlinearFormIntegrator
*nlfi)
42
{
dfi
.Append(nlfi); }
43
44
virtual
void
SetEssentialBC
(
const
Array<int>
&bdr_attr_is_ess,
45
Vector
*rhs = NULL);
46
47
void
SetEssentialVDofs
(
const
Array<int>
&ess_vdofs_list)
48
{
49
ess_vdofs_list.
Copy
(
ess_vdofs
);
// ess_vdofs_list --> ess_vdofs
50
}
51
52
virtual
double
GetEnergy
(
const
Vector
&x)
const
;
53
54
virtual
void
Mult
(
const
Vector
&x,
Vector
&y)
const
;
55
56
virtual
Operator
&
GetGradient
(
const
Vector
&x)
const
;
57
58
virtual
~NonlinearForm
();
59
};
60
61
}
62
63
#endif
mfem::NonlinearForm::AddDomainIntegrator
void AddDomainIntegrator(NonlinearFormIntegrator *nlfi)
Adds new Domain Integrator.
Definition:
nonlinearform.hpp:41
mfem::Array::Copy
void Copy(Array ©) const
Create a copy of the current array.
Definition:
array.hpp:155
mfem::NonlinearForm::fes
FiniteElementSpace * fes
FE space on which the form lives.
Definition:
nonlinearform.hpp:26
mfem::SparseMatrix
Data type sparse matrix.
Definition:
sparsemat.hpp:38
mfem::Array
Definition:
array.hpp:51
mfem::NonlinearForm::NonlinearForm
NonlinearForm(FiniteElementSpace *f)
Definition:
nonlinearform.hpp:37
mfem::NonlinearForm::ess_vdofs
Array< int > ess_vdofs
Definition:
nonlinearform.hpp:34
fespace.hpp
mfem::NonlinearForm
Definition:
nonlinearform.hpp:22
mfem::NonlinearForm::Mult
virtual void Mult(const Vector &x, Vector &y) const
Operator application.
Definition:
nonlinearform.cpp:66
mfem::FiniteElementSpace
Abstract finite element space.
Definition:
fespace.hpp:61
mfem::NonlinearForm::dfi
Array< NonlinearFormIntegrator * > dfi
Set of Domain Integrators to be assembled (added).
Definition:
nonlinearform.hpp:29
mfem::NonlinearForm::~NonlinearForm
virtual ~NonlinearForm()
Definition:
nonlinearform.cpp:132
mfem::NonlinearFormIntegrator
Definition:
nonlininteg.hpp:26
mfem::NonlinearForm::GetGradient
virtual Operator & GetGradient(const Vector &x) const
Evaluate the gradient operator at the point x.
Definition:
nonlinearform.cpp:94
mfem::NonlinearForm::SetEssentialBC
virtual void SetEssentialBC(const Array< int > &bdr_attr_is_ess, Vector *rhs=NULL)
Definition:
nonlinearform.cpp:17
mfem::Vector
Vector data type.
Definition:
vector.hpp:29
mfem::NonlinearForm::Grad
SparseMatrix * Grad
Definition:
nonlinearform.hpp:31
mfem::NonlinearForm::GetEnergy
virtual double GetEnergy(const Vector &x) const
Definition:
nonlinearform.cpp:42
mfem::NonlinearForm::SetEssentialVDofs
void SetEssentialVDofs(const Array< int > &ess_vdofs_list)
Definition:
nonlinearform.hpp:47
nonlininteg.hpp
mfem::Operator
Abstract operator.
Definition:
operator.hpp:21
Generated on Fri Feb 18 2022 18:57:40 for MFEM by
1.8.5