imaging::SimpleAssembler Class Reference
[Finite Element Module]

Assembles the stiffness matrix and force vector of a FE problem implementing SimpleEquationInterface. More...

#include <SimpleAssembler.hpp>

List of all members.

Public Member Functions

template<class fem_types, class simple_equation_t>
void assemble (const simple_equation_t &simple_equation, const Grid< fem_types > &grid, ublas::compressed_matrix< float_t > &stiffness_matrix, ublas::vector< float_t > &force_vector) const
template<class fem_types, class simple_equation_t>
void assemble_stiffness_matrix (const simple_equation_t &simple_equation, const Grid< fem_types > &grid, ublas::compressed_matrix< float_t > &stiffness_matrix) const
template<class fem_types, class simple_equation_t>
void assemble_force_vector (const simple_equation_t &simple_equation, const Grid< fem_types > &grid, ublas::vector< float_t > &force_vector) const


Detailed Description

Assembles the stiffness matrix and force vector of a FE problem implementing SimpleEquationInterface.

The SimpleAssembler class provides functions to assemble the stiffness matrix and force vector for a given equation and a given grid. In contrast to Assembler, SimpleAssembler requires the equation to implement SimpleEquationInterface.


Member Function Documentation

template<class fem_types, class simple_equation_t>
void imaging::SimpleAssembler::assemble ( const simple_equation_t &  simple_equation,
const Grid< fem_types > &  grid,
ublas::compressed_matrix< float_t > &  stiffness_matrix,
ublas::vector< float_t > &  force_vector 
) const [inline]

Assembles the stiffness matrix and the force vector for simple_equation on grid. This is done in one big loop and thus faster than calling assemble_stiffness_matrix() and assemble_force_vector() separately. For performance reasons the type of simple_equation is a template parameter.

The class simple_equation_t must implement all the functions defined in SimpleEquationInterface. It is also advised to derive simple_equation_t from SimpleEquationInterface.

The sparse matrix stiffness_matrix must be square and its size equal to the total number of nodes of the grid, as obtained from Grid::n_nodes(). It can greatly improve the performance of this function, if the matrix is pre-filled with zeros at positions where non-zero entries are expected. The position of the non-zeros entries depend on the geometry of the FE problem. Some grid construction functions provide an appropriate pre-filling of the stiffness matrix.

See also:
Image2Grid, uniform_grid()

References imaging::Assembler::assemble().

template<class fem_types, class simple_equation_t>
void imaging::SimpleAssembler::assemble_stiffness_matrix ( const simple_equation_t &  simple_equation,
const Grid< fem_types > &  grid,
ublas::compressed_matrix< float_t > &  stiffness_matrix 
) const [inline]

Assembles the stiffness matrix for simple_equation on grid. If you want to assembly both, stiffness matrix and force vector, use assemble() to save computation time. For performance reasons the type of simple_equation is a template parameter.

The class simple_equation_t must implement all the functions defined in EquationInterface. It is also advised to derive simple_equation_t from EquationInterface.

The sparse matrix stiffness_matrix must be square and its size equal to the total number of nodes of the grid, as obtained from Grid::n_nodes(). It can greatly improve the performance of this function, if the matrix is pre-filled with zeros at positions where non-zero entries are expected. The position of the non-zeros entries depend on the geometry of the FE problem. Some grid construction functions provide an appropriate pre-filling of the stiffness matrix.

See also:
Image2Grid, uniform_grid()

References imaging::Assembler::assemble_stiffness_matrix().

template<class fem_types, class simple_equation_t>
void imaging::SimpleAssembler::assemble_force_vector ( const simple_equation_t &  simple_equation,
const Grid< fem_types > &  grid,
ublas::vector< float_t > &  force_vector 
) const [inline]

Assembles the force vector for simple_equation on grid. If you want to assembly both, stiffness matrix and force vector, use assemble() to save computation time. For performance reasons the type of simple_equation is a template parameter.

The class simple_equation_t must implement all the functions defined in EquationInterface. It is also advised to derive simple_equation_t from EquationInterface.

The sparse matrix stiffness_matrix must be square and its size equal to the total number of nodes of the grid, as obtained from Grid::n_nodes(). It can greatly improve the performance of this function, if the matrix is pre-filled with zeros at positions where non-zero entries are expected. The position of the non-zeros entries depend on the geometry of the FE problem. Some grid construction functions provide an appropriate pre-filling of the stiffness matrix.

See also:
Image2Grid, uniform_grid()

References imaging::Assembler::assemble_force_vector().


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

Generated on Tue Feb 10 10:01:31 2009 for imaging2 by  doxygen 1.5.5