OpenFCST: The open-source Fuel Cell Simulation Toolbox
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
MeshWorker::Assembler::ResidualLocalBlocksToGlobalBlocks< number > Class Template Reference

Assemble local residuals into global residuals. More...

#include <mesh_worker_assembler.h>

Collaboration diagram for MeshWorker::Assembler::ResidualLocalBlocksToGlobalBlocks< number >:
Collaboration graph
[legend]

Public Member Functions

void initialize (const BlockInfo &block_info, FEVectors &residuals)
 Copy the BlockInfo and the matrix pointers into local variables and initialize cell vectors.
 
template<int dim>
void assemble (const InfoObjects::DoFInfo< dim > &info)
 Assemble the residuals R1 into the global residuals and reset them to zero.
 
template<int dim>
void assemble (const InfoObjects::DoFInfo< dim > &info1, const InfoObjects::DoFInfo< dim > &info2)
 Assemble both local residuals into the global residual and reset them to zero.
 

Public Attributes

std::vector< BlockVector
< number > > 
R1
 The local residuals on the cell or on the first cell on a face.
 
std::vector< BlockVector
< number > > 
R2
 The local residuals on the second cell on a face.
 

Private Member Functions

void assemble (FEVector &global, const BlockVector< number > &local, const std::vector< unsigned int > &dof)
 Assemble a single local residual into the global.
 

Private Attributes

BlockInfo block_info
 Information on block sizes and block start indices.
 
FEVectors residuals
 The global matrices, stored as a vector of pointers.
 

Detailed Description

template<typename number = double>
class MeshWorker::Assembler::ResidualLocalBlocksToGlobalBlocks< number >

Assemble local residuals into global residuals.

The global residuals are expected as an FEVectors object. The local residuals are block vectors.

Depending on whether the BlockInfo object was initialize with BlockInfo::initialize_local(), the comprehensive or block data model is used locally.

In the block model, each of the blocks of the local vectors corresponds to the restriction of a single block of the system to this cell (GlossBlock). Thus, the size of this local block is the number of degrees of freedom of the corresponding base element of the FESystem.

Todo:
Comprehensive model currently not implemented.
Author
Guido Kanschat, 2009

Member Function Documentation

template<typename number >
template<int dim>
void MeshWorker::Assembler::ResidualLocalBlocksToGlobalBlocks< number >::assemble ( const InfoObjects::DoFInfo< dim > &  info)
inline

Assemble the residuals R1 into the global residuals and reset them to zero.

References MeshWorker::InfoObjects::DoFInfo< dim, spacedim >::indices.

template<typename number >
template<int dim>
void MeshWorker::Assembler::ResidualLocalBlocksToGlobalBlocks< number >::assemble ( const InfoObjects::DoFInfo< dim > &  info1,
const InfoObjects::DoFInfo< dim > &  info2 
)
inline

Assemble both local residuals into the global residual and reset them to zero.

References MeshWorker::InfoObjects::DoFInfo< dim, spacedim >::indices.

template<typename number>
void MeshWorker::Assembler::ResidualLocalBlocksToGlobalBlocks< number >::assemble ( FEVector &  global,
const BlockVector< number > &  local,
const std::vector< unsigned int > &  dof 
)
inlineprivate

Assemble a single local residual into the global.

template<typename number >
void MeshWorker::Assembler::ResidualLocalBlocksToGlobalBlocks< number >::initialize ( const BlockInfo block_info,
FEVectors &  residuals 
)
inline

Copy the BlockInfo and the matrix pointers into local variables and initialize cell vectors.

If the BlockInfo object has been initialized with BlockInfo::initialize_local(), the vectors R1 and R2 will have as many blocks as the global system. If not, there will be only a single block.

Referenced by AppFrame::LocalResidual< dim >::initialize().

Here is the caller graph for this function:

Member Data Documentation

template<typename number = double>
BlockInfo MeshWorker::Assembler::ResidualLocalBlocksToGlobalBlocks< number >::block_info
private

Information on block sizes and block start indices.

template<typename number = double>
std::vector<BlockVector<number> > MeshWorker::Assembler::ResidualLocalBlocksToGlobalBlocks< number >::R1

The local residuals on the cell or on the first cell on a face.

template<typename number = double>
std::vector<BlockVector<number> > MeshWorker::Assembler::ResidualLocalBlocksToGlobalBlocks< number >::R2

The local residuals on the second cell on a face.

template<typename number = double>
FEVectors MeshWorker::Assembler::ResidualLocalBlocksToGlobalBlocks< number >::residuals
private

The global matrices, stored as a vector of pointers.


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