MFEM  v3.3.2
Finite element discretization library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Types | Public Member Functions | List of all members
mfem::PetscBCHandler Class Reference

Helper class for handling essential boundary conditions. More...

#include <petsc.hpp>

Public Types

enum  Type { ZERO, CONSTANT, TIME_DEPENDENT }
 

Public Member Functions

 PetscBCHandler (Type _type=ZERO)
 
 PetscBCHandler (Array< int > &ess_tdof_list, Type _type=ZERO)
 
virtual ~PetscBCHandler ()
 
Type GetType () const
 Returns the type of boundary conditions. More...
 
void SetType (enum Type _type)
 Sets the type of boundary conditions. More...
 
virtual void Eval (double t, Vector &g)
 Boundary conditions evaluation. More...
 
void SetTDofs (Array< int > &list)
 Sets essential dofs (local, per-process numbering) More...
 
Array< int > & GetTDofs ()
 Gets essential dofs (local, per-process numbering) More...
 
void SetTime (double t)
 Sets the current time. More...
 
void SetUp (PetscInt n)
 SetUp the helper object, where n is the size of the solution vector. More...
 
void ApplyBC (const Vector &x, Vector &y)
 y = x on ess_tdof_list_c and y = g (internally evaluated) on ess_tdof_list More...
 
void FixResidualBC (const Vector &x, Vector &y)
 y = x-g on ess_tdof_list, the rest of y is unchanged More...
 

Detailed Description

Helper class for handling essential boundary conditions.

Definition at line 328 of file petsc.hpp.

Member Enumeration Documentation

Enumerator
ZERO 
CONSTANT 

Constant in time b.c.

TIME_DEPENDENT 

Definition at line 331 of file petsc.hpp.

Constructor & Destructor Documentation

mfem::PetscBCHandler::PetscBCHandler ( Type  _type = ZERO)
inline

Definition at line 338 of file petsc.hpp.

mfem::PetscBCHandler::PetscBCHandler ( Array< int > &  ess_tdof_list,
enum PetscBCHandler::Type  _type = ZERO 
)

Definition at line 1727 of file petsc.cpp.

virtual mfem::PetscBCHandler::~PetscBCHandler ( )
inlinevirtual

Definition at line 343 of file petsc.hpp.

Member Function Documentation

void mfem::PetscBCHandler::ApplyBC ( const Vector x,
Vector y 
)

y = x on ess_tdof_list_c and y = g (internally evaluated) on ess_tdof_list

Definition at line 1758 of file petsc.cpp.

virtual void mfem::PetscBCHandler::Eval ( double  t,
Vector g 
)
inlinevirtual

Boundary conditions evaluation.

In the result vector, g, only values at the essential dofs need to be set.

Definition at line 354 of file petsc.hpp.

void mfem::PetscBCHandler::FixResidualBC ( const Vector x,
Vector y 
)

y = x-g on ess_tdof_list, the rest of y is unchanged

Definition at line 1783 of file petsc.cpp.

Array<int>& mfem::PetscBCHandler::GetTDofs ( )
inline

Gets essential dofs (local, per-process numbering)

Definition at line 361 of file petsc.hpp.

Type mfem::PetscBCHandler::GetType ( ) const
inline

Returns the type of boundary conditions.

Definition at line 346 of file petsc.hpp.

void mfem::PetscBCHandler::SetTDofs ( Array< int > &  list)

Sets essential dofs (local, per-process numbering)

Definition at line 1735 of file petsc.cpp.

void mfem::PetscBCHandler::SetTime ( double  t)
inline

Sets the current time.

Definition at line 364 of file petsc.hpp.

void mfem::PetscBCHandler::SetType ( enum Type  _type)
inline

Sets the type of boundary conditions.

Definition at line 349 of file petsc.hpp.

void mfem::PetscBCHandler::SetUp ( PetscInt  n)

SetUp the helper object, where n is the size of the solution vector.

Definition at line 1742 of file petsc.cpp.


The documentation for this class was generated from the following files: