NSF Postdoctoral Research
A set of C++ code developed by Andrew E. Slaughter
SlaughterFEM::EqDataBase Class Reference

A base class including nodal data. More...

#include <fem/common/eq_data_base.h>

Inheritance diagram for SlaughterFEM::EqDataBase:
Collaboration diagram for SlaughterFEM::EqDataBase:

List of all members.

Public Member Functions

void add_variable (const std::string &var, const FEType &type, const std::set< subdomain_id_type > *const active_subdomains=NULL)
 A short-cut for adding a variable (see libmesh)
void add_variable (const std::string &var, const Order order=FIRST, const FEFamily family=MONOMIAL, const std::set< subdomain_id_type > *const active_subdomains=NULL)
 A short-cut for adding a variable (see libmesh)
void update_solution (Real t=0)
 Projects the nodal data at the prescribed time.
const unsigned int dimension ()
 Returns the number of dimensions for the system.

Protected Member Functions

 EqDataBase (EquationSystems &sys, string data_name)
 Class constructor.
virtual void value (DenseVector< Number > &output, const Point &p, const Real t=0)=0
 A pure virtual function that will act as a function for libmesh.

Detailed Description

A base class including nodal data.

Provides mechanims for defining nodal data using libMesh a libmesh system. The data may very spatially and temporally. In the inherited class the pure virtual function value dictates the behavior.

See also:
example3
Examples:
fem/examples/example3.cpp, and fem/examples/example5.cpp.

Constructor & Destructor Documentation

EqDataBase::EqDataBase ( EquationSystems &  sys,
string  data_name 
) [protected]

Class constructor.

This class is meant to be inherited, as such the constructor is protected.

The class requires that an existing EquationSystem object be passed in, the system with the name given by data_name is added to the EquationSystem object.

Parameters:
syslibmesh::EquationSystems object that the new system for storing data will be added
data_nameThe name given the the system for storing data
See also:
example3.cpp

Member Function Documentation

void EqDataBase::add_variable ( const std::string &  var,
const FEType &  type,
const std::set< subdomain_id_type > *const  active_subdomains = NULL 
)

A short-cut for adding a variable (see libmesh)

Replicates the behavior of libMesh add_variable from the TransientExplicitSystem, see libmesh documentation for further details.

Parameters:
varThe name of the variable
typeThe type of FE variable
active_subdomainsLimit the variable to a sub-domain
void EqDataBase::add_variable ( const std::string &  var,
const Order  order = FIRST,
const FEFamily  family = MONOMIAL,
const std::set< subdomain_id_type > *const  active_subdomains = NULL 
)

A short-cut for adding a variable (see libmesh)

Replicates the behavior of libMesh add_variable from the TransientExplicitSystem, see libmesh documentation for further details.

Parameters:
varThe name of the variable
orderThe order of the data (assumed FIRST)
familyThe FEfamily, assumed to be MONOMIAL which is recommended for storing data
active_subdomainsLimit the variable to a sub-domain
const unsigned int SlaughterFEM::EqDataBase::dimension ( )

Returns the number of dimensions for the system.

Returns:
A constant value of the number of dimensions for the system.
void EqDataBase::update_solution ( Real  t = 0)

Projects the nodal data at the prescribed time.

This function creates a boost::function pointer to the value member of this class, packages that pointer into a libmesh acceptable format with MyAnalyticFunction, and then uses it to project the nodal data.

Parameters:
tA libmesh::Real containing the current time, this time is used to redefine the TransientExplicitSystem time that contains the nodal data, thus it may be used for temporal data or it may just be ignored by letting it default to zero.
virtual void SlaughterFEM::EqDataBase::value ( DenseVector< Number > &  output,
const Point &  p,
const Real  t = 0 
) [protected, pure virtual]

A pure virtual function that will act as a function for libmesh.

The inheriting class must redefine this function, see example3::cpp .

Parameters:
outputA reference to the vector that stores the stores the computed flux
pA libMesh point
tThe time, this time is not actually used libmesh automatically uses zero.
See also:
update_solution
example3.cpp

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs