Galeri::FiniteElements::LinearProblem Class Reference

Basic implementation of scalar finite element problem. More...

#include <Galeri_LinearProblem.h>

Inheritance diagram for Galeri::FiniteElements::LinearProblem:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 LinearProblem (const AbstractGrid &Grid, const AbstractVariational &Variational, Epetra_CrsMatrix &A, Epetra_MultiVector &LHS, Epetra_MultiVector &RHS)
 Constructor.
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.
virtual Epetra_RowMatrixA ()
 Returns a reference to the linear system matrix.
virtual Epetra_CrsMatrixCrsA ()
 Returns a reference to the linear system matrix as Epetra_CrsMatrix.
virtual Epetra_MultiVectorRHS ()
 Returns a reference to the multi-vector of right-hand side.
virtual Epetra_MultiVectorLHS ()
 Returns a reference to the multi-vector of starting solution.
virtual const AbstractGridGrid () const
 Returns a reference to the grid object.
virtual const AbstractVariationalVariational () const
 Returns a reference to the variational object.

Public Attributes

const AbstractGridGrid_
const AbstractVariationalVariational_
Epetra_CrsMatrixA_
Epetra_MultiVectorLHS_
Epetra_MultiVectorRHS_

Detailed Description

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.

Note:
Neumann boundary conditions are still to be fixed.
Author:
Marzio Sala, SNL 9214.
Date:
Last updated on Apr-05.

Definition at line 65 of file Galeri_LinearProblem.h.


Constructor & Destructor Documentation

Galeri::FiniteElements::LinearProblem::LinearProblem ( const AbstractGrid Grid,
const AbstractVariational Variational,
Epetra_CrsMatrix A,
Epetra_MultiVector LHS,
Epetra_MultiVector RHS 
) [inline]

Constructor.

Parameters:
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.

Definition at line 86 of file Galeri_LinearProblem.h.

virtual Galeri::FiniteElements::LinearProblem::~LinearProblem (  )  [inline, virtual]

Destructor.

Definition at line 98 of file Galeri_LinearProblem.h.


Member Function Documentation

void Galeri::FiniteElements::LinearProblem::Compute (  )  [inline, virtual]

Fills the linear system matrix and the right-hand side, zeros out the solution.

Implements Galeri::FiniteElements::AbstractProblem.

Definition at line 101 of file Galeri_LinearProblem.h.

void Galeri::FiniteElements::LinearProblem::ComputeNorms ( Epetra_MultiVector RowMatrixField,
int(*)(double, double, double, double *)  ExactSolution,
const bool  verbose = true,
double *  Solution = 0,
double *  Exact = 0,
double *  Diff = 0 
) [inline, virtual]

Computes L2, semi-H1 and H1 norms.

double xq, yq, zq;

Implements Galeri::FiniteElements::AbstractProblem.

Definition at line 229 of file Galeri_LinearProblem.h.

virtual Epetra_RowMatrix& Galeri::FiniteElements::LinearProblem::A (  )  [inline, virtual]

Returns a reference to the linear system matrix.

Implements Galeri::FiniteElements::AbstractProblem.

Definition at line 330 of file Galeri_LinearProblem.h.

virtual Epetra_CrsMatrix& Galeri::FiniteElements::LinearProblem::CrsA (  )  [inline, virtual]

Returns a reference to the linear system matrix as Epetra_CrsMatrix.

Definition at line 336 of file Galeri_LinearProblem.h.

virtual Epetra_MultiVector& Galeri::FiniteElements::LinearProblem::RHS (  )  [inline, virtual]

Returns a reference to the multi-vector of right-hand side.

Implements Galeri::FiniteElements::AbstractProblem.

Definition at line 341 of file Galeri_LinearProblem.h.

virtual Epetra_MultiVector& Galeri::FiniteElements::LinearProblem::LHS (  )  [inline, virtual]

Returns a reference to the multi-vector of starting solution.

Implements Galeri::FiniteElements::AbstractProblem.

Definition at line 346 of file Galeri_LinearProblem.h.

virtual const AbstractGrid& Galeri::FiniteElements::LinearProblem::Grid (  )  const [inline, virtual]

Returns a reference to the grid object.

Implements Galeri::FiniteElements::AbstractProblem.

Definition at line 351 of file Galeri_LinearProblem.h.

virtual const AbstractVariational& Galeri::FiniteElements::LinearProblem::Variational (  )  const [inline, virtual]

Returns a reference to the variational object.

Implements Galeri::FiniteElements::AbstractProblem.

Definition at line 356 of file Galeri_LinearProblem.h.


Member Data Documentation

Definition at line 363 of file Galeri_LinearProblem.h.

Definition at line 364 of file Galeri_LinearProblem.h.

Definition at line 365 of file Galeri_LinearProblem.h.

Definition at line 366 of file Galeri_LinearProblem.h.

Definition at line 367 of file Galeri_LinearProblem.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Defines
Generated on Wed Apr 13 10:08:41 2011 for Galeri Package Browser (Single Doxygen Collection) by  doxygen 1.6.3