part_disc< T > Class Template Reference

Base class for discretization modules. A discretization module provides assembling of a part of the whole system of PDEs. More...

#include <CoupledDisc.hpp>

List of all members.

Public Member Functions

virtual void PrintParam ()
 Prints the name and parameters of the module.
virtual bool consistent ()=0
 Checks if all the import parameters are connected.
virtual void set_vec_sizes (Array< int > &ref_sz, GridVec< T > &vec)=0
 Computes the MultiArray sizes for the reference grid sizes.
virtual void set_mat_sizes (Array< int > &ref_sz, SysMatrix< T > &J)=0
 Computes the SparseMatrix sizes for the ref. grid sizes.
virtual void set_init_cond (GridVec< T > &u)
 Sets the initial conditions for the assigned equation.
virtual void preprocess (GridVec< T > &u, SysMatrix< T > &J)
 Sets Dirichlet boundary conditions and prepares the discretization module.
virtual void assemble_defect (double delta_t, GridVec< T > &u, GridVec< T > &d, T s_a)=0
 Assembles the 'own' parts of the non-linear defect.
virtual bool assemble_Jacobian (double delta_t, GridVec< T > &u, SysMatrix< T > &J, T s_a)=0
 Computes the 'own' block lines of the Jacobian of the system or its approximation at a given guess.
virtual void postprocess ()
 Releases memory etc.
virtual bool is_prolongable (int i, const Array< int > &p_domain_size, const Array< int > &p_range_size)
 Returns true if the grid sizes of the i-th blocks of those assigned to 'this' discretization in the given vectors are proper sizes for the domain and the range of the prolongation.
virtual void prolong_part (GridVec< T > &src, GridVec< T > &dst)
 Prolongs the grid functions assigned to 'this' discretizations to a finer grid.
virtual void restrict_part (GridVec< T > &src, GridVec< T > &dst)
 Restricts the grid functions assigned to 'this' discretization to a coarser grid.
 part_disc (part_disc< T > *the_tl=NULL, int the_n_vec_blocks=1)
 Constructor.
virtual ~part_disc ()
 Virtual destructor.

Public Attributes

int n_vec_blocks
part_disc< T > * tl
int from_block


Detailed Description

template<typename T>
class part_disc< T >

Base class for discretization modules. A discretization module provides assembling of a part of the whole system of PDEs.


Constructor & Destructor Documentation

template<typename T>
part_disc< T >::part_disc ( part_disc< T > *  the_tl = NULL,
int  the_n_vec_blocks = 1 
) [inline]

Constructor.

Parameters:
[in] the_tl The next in the list
[in] the_n_vec_blocks Number of GridVec's for the unknowns

template<typename T>
virtual part_disc< T >::~part_disc (  )  [inline, virtual]

Virtual destructor.


Member Function Documentation

template<typename T>
virtual void part_disc< T >::PrintParam (  )  [inline, virtual]

Prints the name and parameters of the module.

template<typename T>
virtual bool part_disc< T >::consistent (  )  [pure virtual]

Checks if all the import parameters are connected.

template<typename T>
virtual void part_disc< T >::set_vec_sizes ( Array< int > &  ref_sz,
GridVec< T > &  vec 
) [pure virtual]

Computes the MultiArray sizes for the reference grid sizes.

Parameters:
[in] ref_sz The reference grid sizes
[in] vec The vector to initialize

template<typename T>
virtual void part_disc< T >::set_mat_sizes ( Array< int > &  ref_sz,
SysMatrix< T > &  J 
) [pure virtual]

Computes the SparseMatrix sizes for the ref. grid sizes.

Parameters:
[in] ref_sz The reference grid sizes
[in] J The matrix to initialize

template<typename T>
virtual void part_disc< T >::set_init_cond ( GridVec< T > &  u  )  [inline, virtual]

Sets the initial conditions for the assigned equation.

Default: do nothing!

Parameters:
[in] u A vector for the initial condition

template<typename T>
virtual void part_disc< T >::preprocess ( GridVec< T > &  u,
SysMatrix< T > &  J 
) [inline, virtual]

Sets Dirichlet boundary conditions and prepares the discretization module.

Parameters:
[in] u A vector for the guess on a time level
[in] J The matrix hierarchy for the Jacobian
Note:
Only the sizes of 'u' and 'J', not the values, may be used.

template<typename T>
virtual void part_disc< T >::assemble_defect ( double  delta_t,
GridVec< T > &  u,
GridVec< T > &  d,
s_a 
) [pure virtual]

Assembles the 'own' parts of the non-linear defect.

Parameters:
[in] delta_t The time step
[in] u The guess to compute the defect at
[in] d For the defect on the new time level
[in] s_a The factor for the stiffness part (that for the mass part is 1)

template<typename T>
virtual bool part_disc< T >::assemble_Jacobian ( double  delta_t,
GridVec< T > &  u,
SysMatrix< T > &  J,
s_a 
) [pure virtual]

Computes the 'own' block lines of the Jacobian of the system or its approximation at a given guess.

This function should return true if the Jacobian does not exist for this guess, or the approximation cannot be computed. Otherwise the function should return false

Parameters:
[in] delta_t The time step
[in] u The guess to compute the Jacobian at
[in] J For the Jacobian on the new time level
[in] s_a The factor for the stiffness matrix (that for the mass matrix is 1)

template<typename T>
virtual void part_disc< T >::postprocess (  )  [inline, virtual]

Releases memory etc.

template<typename T>
virtual bool part_disc< T >::is_prolongable ( int  i,
const Array< int > &  p_domain_size,
const Array< int > &  p_range_size 
) [inline, virtual]

Returns true if the grid sizes of the i-th blocks of those assigned to 'this' discretization in the given vectors are proper sizes for the domain and the range of the prolongation.

Parameters:
[in] i The index of the block of 'this' discretization
[in] p_domain_size For the domain of the prolongation
[in] p_range_size For the range of the prolongation
Note:
We return false because there is no standard implementation of the transfer operators

template<typename T>
virtual void part_disc< T >::prolong_part ( GridVec< T > &  src,
GridVec< T > &  dst 
) [inline, virtual]

Prolongs the grid functions assigned to 'this' discretizations to a finer grid.

Parameters:
[in] src The vector to prolong
[in] dst The result (the sizes must be initialized!)

template<typename T>
virtual void part_disc< T >::restrict_part ( GridVec< T > &  src,
GridVec< T > &  dst 
) [inline, virtual]

Restricts the grid functions assigned to 'this' discretization to a coarser grid.

Parameters:
[in] src The vector to restrict
[in] dst The result (the sizes must be initialized!)


Member Data Documentation

template<typename T>
int part_disc< T >::n_vec_blocks

number of GridVec's for the unknowns

template<typename T>
part_disc<T>* part_disc< T >::tl

the next discretization module in the bundle

template<typename T>
int part_disc< T >::from_block

the initial index in the GridVec's


The documentation for this class was generated from the following file:
Generated on Fri Sep 21 12:34:26 2007 for SG2 by  doxygen 1.5.2