imaging::Assembler Class Reference
[Finite Element Module]

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

#include <Assembler.hpp>

List of all members.

Public Member Functions

template<class fem_types, class equation_t>
void assemble (const equation_t &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 equation_t>
void assemble_stiffness_matrix (const equation_t &equation, const Grid< fem_types > &grid, ublas::compressed_matrix< float_t > &stiffness_matrix) const
template<class fem_types, class equation_t>
void assemble_force_vector (const equation_t &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.

The Assembler class provides functions to assemble the stiffness matrix and force vector for a given equation and a given grid.


Member Function Documentation

template<class fem_types, class equation_t>
void imaging::Assembler::assemble ( const equation_t &  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 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 equation is a template parameter.

The class equation_t must implement all the functions defined in EquationInterface. It is also advised to derive 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::FemKernel< fem_types >::boundary_transform_determinant(), imaging::Grid< fem_types >::global_node_index(), imaging::Grid< fem_types >::is_regular(), imaging::FemKernel< fem_types >::lazy_set_element(), imaging::Grid< fem_types >::n_boundary_elements(), imaging::Grid< fem_types >::n_elements(), imaging::Grid< fem_types >::n_nodes(), imaging::Grid< fem_types >::parent_element(), imaging::FemKernel< fem_types >::set_boundary_element(), imaging::FemKernel< fem_types >::set_element(), and imaging::FemKernel< fem_types >::transform_determinant().

Referenced by imaging::SimpleAssembler::assemble().

template<class fem_types, class equation_t>
void imaging::Assembler::assemble_stiffness_matrix ( const equation_t &  equation,
const Grid< fem_types > &  grid,
ublas::compressed_matrix< float_t > &  stiffness_matrix 
) const [inline]

Assembles the stiffness matrix for 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 equation is a template parameter.

The class equation_t must implement all the functions defined in EquationInterface. It is also advised to derive 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::FemKernel< fem_types >::boundary_transform_determinant(), imaging::Grid< fem_types >::global_node_index(), imaging::Grid< fem_types >::is_regular(), imaging::FemKernel< fem_types >::lazy_set_element(), imaging::Grid< fem_types >::n_boundary_elements(), imaging::Grid< fem_types >::n_elements(), imaging::Grid< fem_types >::n_nodes(), imaging::Grid< fem_types >::parent_element(), imaging::FemKernel< fem_types >::set_boundary_element(), imaging::FemKernel< fem_types >::set_element(), and imaging::FemKernel< fem_types >::transform_determinant().

Referenced by imaging::SimpleAssembler::assemble_stiffness_matrix().

template<class fem_types, class equation_t>
void imaging::Assembler::assemble_force_vector ( const equation_t &  equation,
const Grid< fem_types > &  grid,
ublas::vector< float_t > &  force_vector 
) const [inline]

Assembles the force vector for 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 equation is a template parameter.

The class equation_t must implement all the functions defined in EquationInterface. It is also advised to derive 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::FemKernel< fem_types >::boundary_transform_determinant(), imaging::Grid< fem_types >::global_node_index(), imaging::Grid< fem_types >::is_regular(), imaging::FemKernel< fem_types >::lazy_set_element(), imaging::Grid< fem_types >::n_boundary_elements(), imaging::Grid< fem_types >::n_elements(), imaging::Grid< fem_types >::n_nodes(), imaging::Grid< fem_types >::parent_element(), imaging::FemKernel< fem_types >::set_boundary_element(), imaging::FemKernel< fem_types >::set_element(), and imaging::FemKernel< fem_types >::transform_determinant().

Referenced by imaging::SimpleAssembler::assemble_force_vector().


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

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