Basic implementation of scalar finite element problem. More...
#include <Galeri_LinearProblem.h>
Public Member Functions | |
LinearProblem (const AbstractGrid &Grid, const AbstractVariational &Variational, Epetra_CrsMatrix &A, Epetra_MultiVector &LHS, Epetra_MultiVector &RHS) | |
Constructor. More... | |
virtual | ~LinearProblem () |
Destructor. | |
void | Compute () |
Fills the linear system matrix and the right-hand side, zeros out the solution. | |
void | ComputeNorms (Epetra_MultiVector &RowMatrixField, int(*ExactSolution)(double, double, double, double *), const bool verbose=true, double *Solution=0, double *Exact=0, double *Diff=0) |
Computes L2, semi-H1 and H1 norms. More... | |
virtual Epetra_RowMatrix & | A () |
Returns a reference to the linear system matrix. | |
virtual Epetra_CrsMatrix & | CrsA () |
Returns a reference to the linear system matrix as Epetra_CrsMatrix. | |
virtual Epetra_MultiVector & | RHS () |
Returns a reference to the multi-vector of right-hand side. | |
virtual Epetra_MultiVector & | LHS () |
Returns a reference to the multi-vector of starting solution. | |
virtual const AbstractGrid & | Grid () const |
Returns a reference to the grid object. | |
virtual const AbstractVariational & | Variational () const |
Returns a reference to the variational object. | |
Public Member Functions inherited from Galeri::FiniteElements::AbstractProblem | |
virtual | ~AbstractProblem () |
Destructor. | |
Public Attributes | |
const AbstractGrid & | Grid_ |
const AbstractVariational & | Variational_ |
Epetra_CrsMatrix & | A_ |
Epetra_MultiVector & | LHS_ |
Epetra_MultiVector & | RHS_ |
Basic implementation of scalar finite element problem.
This class fill the linea system matrix (defined as an Epetra_CrsMatrix), the right-hand side (defined as an Epetra_MultiVector) and the starting solution (defined as a zero Epetra_MultiVector). In the current implementation, only one rhs is created.
|
inline |
Constructor.
Grid | - (In) Reference to an AbstractGrid object |
Variational | - (In) Reference to an AbstractVariational object |
A | - (In/Out) Epetra_CrsMatrix, whose Map is Grid().RowMap(), that will contain the linear system matrix. |
LHS | - (In/Out) Epetra_MultiVector, whose Map is Grid().RowMap(), that will contain the starting solution (zero vector). |
RHS | - (In/Out) Epetra_MultiVector, whose Map is Grid().RowMap(), that will contain the right-hand side. |
|
inlinevirtual |
Computes L2, semi-H1 and H1 norms.
double xq, yq, zq;
Implements Galeri::FiniteElements::AbstractProblem.
References Galeri::FiniteElements::AbstractGrid::Comm(), Galeri::FiniteElements::AbstractVariational::ElementNorm(), Galeri::FiniteElements::AbstractGrid::ElementVertices(), Galeri::FiniteElements::AbstractGrid::ExportToVertexMap(), Grid(), Galeri::FiniteElements::AbstractGrid::NumMyElements(), Galeri::FiniteElements::AbstractGrid::NumVerticesPerElement(), Variational(), Galeri::FiniteElements::AbstractGrid::VertexCoord(), and Galeri::FiniteElements::AbstractGrid::VertexMap().