Plugins
|
Class of the prolongation and the restriction of the Nedelec DoFs. More...
#include <nedelec_transfer.h>
Classes | |
struct | AssembleProlongationMatrix |
a helper class to call all the type-dependent assembling functions More... | |
Public Types | |
typedef TAlgebra | algebra_type |
Type of algebra. More... | |
typedef ITransferOperator< TDomain, TAlgebra > | base_type |
Type of base class. More... | |
typedef TDomain | domain_type |
Type of Domain. More... | |
typedef TAlgebra::matrix_type | matrix_type |
Type of Vector. More... | |
typedef NedelecTransfer< TDomain, TAlgebra > | this_type |
This type. More... | |
typedef TAlgebra::vector_type | vector_type |
Type of Vector. More... | |
Public Types inherited from ug::ITransferOperator< TDomain, TAlgebra > | |
typedef TDomain | domain_type |
typedef TAlgebra::matrix_type | matrix_type |
typedef TAlgebra::vector_type | vector_type |
Public Member Functions | |
SmartPtr< ITransferOperator< TDomain, TAlgebra > > | clone () |
returns new instance with same setting More... | |
void | do_restrict (vector_type &uCoarse, const vector_type &uFine) |
apples the restriction = transposed prolongation More... | |
void | init () |
initializes the operator (computes the prolongation matrix etc) More... | |
NedelecTransfer (SmartPtr< ApproximationSpace< TDomain > > approxSpace) | |
Constructor setting approximation space. More... | |
void | prolongate (vector_type &uFineOut, const vector_type &uCoarse) |
applies the prolongation More... | |
virtual void | set_levels (GridLevel coarseLevel, GridLevel fineLevel) |
Set levels. More... | |
Public Member Functions inherited from ug::ITransferOperator< TDomain, TAlgebra > | |
virtual void | add_constraint (SmartPtr< IConstraint< TAlgebra > > pp) |
virtual void | clear_constraints () |
ITransferOperator () | |
virtual SmartPtr< matrix_type > | prolongation (const GridLevel &fineGL, const GridLevel &coarseGL, ConstSmartPtr< ApproximationSpace< TDomain > > spApproxSpace) |
virtual void | remove_constraint (SmartPtr< IConstraint< TAlgebra > > pp) |
virtual SmartPtr< matrix_type > | restriction (const GridLevel &coarseGL, const GridLevel &fineGL, ConstSmartPtr< ApproximationSpace< TDomain > > spApproxSpace) |
virtual | ~ITransferOperator () |
Static Public Attributes | |
static const int | WDim = TDomain::dim |
world dimention More... | |
Private Member Functions | |
template<typename TElem > | |
void | assemble_prolongation_matrix (matrix_type &mat, std::vector< bool > &vIsRestricted, const DoFDistribution &coarseDD, const DoFDistribution &fineDD) |
assembles the prolongation matrix for one type of the grid elements More... | |
void | check_approximation_space () |
checks the approximation space More... | |
Private Attributes | |
bool | m_bInit |
initialization flag More... | |
GridLevel | m_coarseLevel |
coarse grid level More... | |
GridLevel | m_fineLevel |
fine grid level More... | |
matrix_type | m_prolongation_matrix |
matrix to store prolongation More... | |
SmartPtr< ApproximationSpace< TDomain > > | m_spApproxSpace |
approximation space More... | |
std::vector< bool > | m_vIsRestricted |
restriction flag More... | |
Additional Inherited Members | |
Protected Attributes inherited from ug::ITransferOperator< TDomain, TAlgebra > | |
std::vector< SmartPtr< IConstraint< TAlgebra > > > | m_vConstraint |
Class of the prolongation and the restriction of the Nedelec DoFs.
The prolongation is based on the transformation of the Nelelec DoF values into the vector-valued functions using the basis Nedelec (Whitney-1) shape functions on the coarse grid elements and the computation of the Nedelec DoF values of these vector functions on the fine grid (son) elements. Note that the DoF values are merely the circulations of the vector functions over the edges.
The restriction is the transposed prolongation.
Note the special case of the "projected boundaries", i.e. when after the regular refinement, new vertices on the boundary sides of the coarse grid elements (or anywhere else) are moved to the actual geometric boundary. In this case, this implementation of the transfer operators works as if it would be applied before moving the new fine grid vertices, i.e. just after the regular refinement. So, the procedure can be considered as "refine regularily - transfer - project the boundary". Due to this approach, the restricted defect belongs to the image of the coarse grid matrix, so that all the systems in the multigrid hierarchy are solvable. Otherwise this may not be the case, cf. O. Sterz. Modellierung und Numerik zeitharmonischer Wirbelstromprobleme in 3D. PhD thesis, 2003.
To this end, the evaluations of the Nedelec (Whitney-1) shape functions are performed not according to the geometrical (global) coordinates of the new vertices, but according to their local coordinates in the full-dim. parent element, whereas these local coordinates are computed using averaging of the local coordinates of the corresponding corners. Thus this local coordinates correspond to the positions "before the moving" and not to the actual positions in the space.
For grid functions having several Nedelec DoFs on every edge, the prolongation and the restriction is performed separately for every subfunction.
typedef TAlgebra ug::Electromagnetism::NedelecTransfer< TDomain, TAlgebra >::algebra_type |
Type of algebra.
typedef ITransferOperator<TDomain, TAlgebra> ug::Electromagnetism::NedelecTransfer< TDomain, TAlgebra >::base_type |
Type of base class.
typedef TDomain ug::Electromagnetism::NedelecTransfer< TDomain, TAlgebra >::domain_type |
Type of Domain.
typedef TAlgebra::matrix_type ug::Electromagnetism::NedelecTransfer< TDomain, TAlgebra >::matrix_type |
Type of Vector.
typedef NedelecTransfer<TDomain, TAlgebra> ug::Electromagnetism::NedelecTransfer< TDomain, TAlgebra >::this_type |
This type.
typedef TAlgebra::vector_type ug::Electromagnetism::NedelecTransfer< TDomain, TAlgebra >::vector_type |
Type of Vector.
|
inline |
Constructor setting approximation space.
|
private |
assembles the prolongation matrix for one type of the grid elements
[out] | mat | the interpolation matrix |
[out] | vIsRestricted | whether a coarse grid DoF has children |
[in] | coarseDD | the coarse grid DD |
[in] | fineDD | the fine grid DD |
|
private |
checks the approximation space
Checks the approximation space
References ug::LFEID::NEDELEC, type(), and UG_THROW.
|
virtual |
returns new instance with same setting
Copies parameters from another object
Implements ug::ITransferOperator< TDomain, TAlgebra >.
|
virtual |
apples the restriction = transposed prolongation
Performs prolongation by applying the prolongation matrix to the given vector.
[out] | uCoarse | the restricted vector |
[in] | uFine | the vector to restrict |
Implements ug::ITransferOperator< TDomain, TAlgebra >.
References ug::CT_ALL, ug::CT_DIRICHLET, type(), UG_ASSERT, UG_CATCH_THROW, and UG_THROW.
|
virtual |
initializes the operator (computes the prolongation matrix etc)
Initializes the object: Verifies the data and computes the prolongation matrix.
Implements ug::ITransferOperator< TDomain, TAlgebra >.
References ug::DoFDistribution::num_indices(), ug::PST_CONSISTENT, and UG_CATCH_THROW.
|
virtual |
applies the prolongation
Performs prolongation by applying the prolongation matrix to the given vector.
[out] | uFine | the prolongated vector |
[in] | uCoarse | the vector to prolongate |
Implements ug::ITransferOperator< TDomain, TAlgebra >.
References ug::CT_ALL, ug::CT_DIRICHLET, type(), UG_ASSERT, UG_CATCH_THROW, and UG_THROW.
|
virtual |
Set levels.
Sets and checks the grid levels to work on:
[in] | coarseLevel | the coarse grid level |
[in] | fineLevel | the fine grid level |
Implements ug::ITransferOperator< TDomain, TAlgebra >.
References ug::GridLevel::LEVEL, and UG_THROW.
|
private |
initialization flag
|
private |
coarse grid level
|
private |
fine grid level
|
private |
matrix to store prolongation
Referenced by ug::Electromagnetism::NedelecTransfer< TDomain, TAlgebra >::AssembleProlongationMatrix::operator()().
|
private |
approximation space
|
private |
restriction flag
Referenced by ug::Electromagnetism::NedelecTransfer< TDomain, TAlgebra >::AssembleProlongationMatrix::operator()().
|
static |
world dimention