libMesh
Public Member Functions | Private Attributes | List of all members
CoupledFEMFunctionsx Class Referenceabstract

#include <coupled_system.h>

Inheritance diagram for CoupledFEMFunctionsx:
[legend]

Public Member Functions

 CoupledFEMFunctionsx (System &, unsigned int var_number)
 
virtual ~CoupledFEMFunctionsx ()
 
virtual UniquePtr< FEMFunctionBase< Number > > clone () const
 
virtual void operator() (const FEMContext &, const Point &, const Real, DenseVector< Number > &)
 
virtual Number operator() (const FEMContext &, const Point &p, const Real time=0.)
 
virtual void init_context (const FEMContext &)
 Prepares a context object for use. More...
 
void operator() (const FEMContext &, const Point &p, DenseVector< Number > &output)
 Evaluation function for time-independent vector-valued functions. More...
 
virtual void operator() (const FEMContext &, const Point &p, const Real time, DenseVector< Number > &output)=0
 Evaluation function for time-dependent vector-valued functions. More...
 
virtual Number component (const FEMContext &, unsigned int i, const Point &p, Real time=0.)
 

Private Attributes

unsigned int var
 

Detailed Description

Definition at line 108 of file coupled_system.h.

Constructor & Destructor Documentation

CoupledFEMFunctionsx::CoupledFEMFunctionsx ( System ,
unsigned int  var_number 
)

Definition at line 112 of file coupled_system.h.

114  {var = var_number;}
virtual CoupledFEMFunctionsx::~CoupledFEMFunctionsx ( )
virtual

Definition at line 117 of file coupled_system.h.

117 {}

Member Function Documentation

virtual UniquePtr<FEMFunctionBase<Number> > CoupledFEMFunctionsx::clone ( ) const
virtual
Returns
A new copy of the function.

The new copy should be as "deep" as necessary to allow independent destruction and simultaneous evaluations of the copies in different threads.

Implements libMesh::FEMFunctionBase< Number >.

Definition at line 119 of file coupled_system.h.

120  {
122  }
std::unique_ptr< T > UniquePtr
Definition: auto_ptr.h:46
CoupledFEMFunctionsx(System &, unsigned int var_number)
virtual Number libMesh::FEMFunctionBase< Number >::component ( const FEMContext ,
unsigned int  i,
const Point p,
Real  time = 0. 
)
virtualinherited
Returns
The vector component i at coordinate p and time time.
Note
Subclasses aren't required to override this, since the default implementation is based on the full vector evaluation, which is often correct.
Subclasses are recommended to override this, since the default implementation is based on a vector evaluation, which is usually unnecessarily inefficient.
virtual void libMesh::FEMFunctionBase< Number >::init_context ( const FEMContext )
virtualinherited

Prepares a context object for use.

Most problems will want to reimplement this for efficiency, in order to call FE::get_*() as their particular function requires.

Reimplemented in SlitFunc.

Definition at line 71 of file fem_function_base.h.

References libMesh::FEMFunctionBase< Output >::clone(), libMesh::FEMFunctionBase< Output >::component(), libMesh::FEMFunctionBase< Output >::operator()(), and libMesh::Real.

71 {}
void libMesh::FEMFunctionBase< Number >::operator() ( const FEMContext ,
const Point p,
DenseVector< Number > &  output 
)
inherited

Evaluation function for time-independent vector-valued functions.

Sets output values in the passed-in output DenseVector.

virtual void libMesh::FEMFunctionBase< Number >::operator() ( const FEMContext ,
const Point p,
const Real  time,
DenseVector< Number > &  output 
)
pure virtualinherited

Evaluation function for time-dependent vector-valued functions.

Sets output values in the passed-in output DenseVector.

Pure virtual, so you have to override it.

virtual void CoupledFEMFunctionsx::operator() ( const FEMContext ,
const Point ,
const Real  ,
DenseVector< Number > &   
)
virtual

Definition at line 124 of file coupled_system.h.

References libMesh::Real.

128  { libmesh_not_implemented(); }
Number CoupledFEMFunctionsx::operator() ( const FEMContext ,
const Point p,
const Real  time = 0. 
)
virtual
Returns
The scalar function value at coordinate p and time time, which defaults to zero.

Pure virtual, so you have to override it.

Implements libMesh::FEMFunctionBase< Number >.

Definition at line 412 of file coupled_system.C.

References libMesh::FEMContext::point_gradient(), libMesh::FEMContext::point_value(), and libMesh::MeshTools::weight().

415 {
416  Number weight = 0.0;
417 
418  switch(var)
419  {
420  case 0:
421  {
422  Gradient grad_C = c.point_gradient(3, p);
423 
424  weight = grad_C(0);
425  }
426  break;
427 
428  case 3:
429  {
430  Number u = c.point_value(0, p);
431 
432  weight = u;
433  }
434  break;
435 
436  default:
437  libmesh_error_msg("Wrong variable number " \
438  << var \
439  << " passed to CoupledFEMFunctionsx object! Quitting!");
440  }
441 
442  return weight;
443 }
dof_id_type weight(const MeshBase &mesh, const processor_id_type pid)
Definition: mesh_tools.C:245

Member Data Documentation

unsigned int CoupledFEMFunctionsx::var
private

Definition at line 135 of file coupled_system.h.


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