Plugins
ug::Electromagnetism::NedelecProlongationMatrixHelper< TDomain, TAlgebra, TElem > Class Template Reference

#include <nedelec_transfer.h>

Static Public Member Functions

static void assemble_prolongation_matrix (const domain_type &domain, const DoFDistribution &coarseDD, const DoFDistribution &fineDD, matrix_type &mat, std::vector< bool > &vIsRestricted)
 assembles the prolongation matrix for one type of the grid elements More...
 

Private Types

typedef TAlgebra algebra_type
 Type of algebra. More...
 
typedef TDomain domain_type
 Type of Domain. More...
 
typedef TAlgebra::matrix_type matrix_type
 Type of Vector. More...
 
typedef TDomain::position_type position_type
 position type in the domain More...
 
typedef reference_element_traits< TElem >::reference_element_type ref_elem_type
 reference element type More...
 

Static Private Member Functions

static void GetRegularLocalCoordinate (const MultiGrid *mg, Vertex *vrt, TElem *base, MathVector< TElem::dim > &local)
 computes the local coordinates of a vertex according to the assumption of the regular refinement More...
 

Static Private Attributes

static const int dim = ref_elem_type::dim
 dimensionality of the reference element More...
 
static const int WDim = TDomain::dim
 world dimention More...
 

Detailed Description

template<typename TDomain, typename TAlgebra, typename TElem>
class ug::Electromagnetism::NedelecProlongationMatrixHelper< TDomain, TAlgebra, TElem >

Helper class for assembling the prolongation matrix

Member Typedef Documentation

◆ algebra_type

template<typename TDomain , typename TAlgebra , typename TElem >
typedef TAlgebra ug::Electromagnetism::NedelecProlongationMatrixHelper< TDomain, TAlgebra, TElem >::algebra_type
private

Type of algebra.

◆ domain_type

template<typename TDomain , typename TAlgebra , typename TElem >
typedef TDomain ug::Electromagnetism::NedelecProlongationMatrixHelper< TDomain, TAlgebra, TElem >::domain_type
private

Type of Domain.

◆ matrix_type

template<typename TDomain , typename TAlgebra , typename TElem >
typedef TAlgebra::matrix_type ug::Electromagnetism::NedelecProlongationMatrixHelper< TDomain, TAlgebra, TElem >::matrix_type
private

Type of Vector.

◆ position_type

template<typename TDomain , typename TAlgebra , typename TElem >
typedef TDomain::position_type ug::Electromagnetism::NedelecProlongationMatrixHelper< TDomain, TAlgebra, TElem >::position_type
private

position type in the domain

◆ ref_elem_type

template<typename TDomain , typename TAlgebra , typename TElem >
typedef reference_element_traits<TElem>::reference_element_type ug::Electromagnetism::NedelecProlongationMatrixHelper< TDomain, TAlgebra, TElem >::ref_elem_type
private

reference element type

Member Function Documentation

◆ assemble_prolongation_matrix()

template<typename TDomain , typename TAlgebra , typename TElem >
void ug::Electromagnetism::NedelecProlongationMatrixHelper< TDomain, TAlgebra, TElem >::assemble_prolongation_matrix ( const domain_type domain,
const DoFDistribution coarseDD,
const DoFDistribution fineDD,
matrix_type mat,
std::vector< bool > &  vIsRestricted 
)
static

assembles the prolongation matrix for one type of the grid elements

Assembles the prolongation matrix for the DoFs between the edges for one type of the grid elements. (This instantiation assumes that the dimensionality of the element is greater than 1.) To get the total prolongation matrix, the functions for all the types should be called.

Parameters
[in]domainthe domain
[in]coarseDDthe coarse grid DD
[in]fineDDthe fine grid DD
[out]matthe interpolation matrix
[out]vIsRestrictedwhether a coarse grid DoF has children

References ug::DoFDistribution::dof_indices(), ug::DoFRef(), SmartPtr< MultiGrid >::get(), ug::Electromagnetism::NedelecT1_LDisc< TDomain, TElem >::get_shapes(), grid(), ug::DoFDistribution::inner_dof_indices(), ug::DimReferenceMapping< TDim, TWorldDim >::local_to_global(), ug::DoFDistribution::multi_grid(), ug::DoFDistributionInfoProvider::num_fct(), ug::DoFDistributionInfoProvider::num_subsets(), UG_ASSERT, UG_THROW, ug::DimReferenceMapping< TDim, TWorldDim >::update(), ug::VecAdd(), ug::VecDot(), ug::VecSubtract(), and ug::EdgeVertices::vertex().

Referenced by ug::Electromagnetism::NedelecTransfer< TDomain, TAlgebra >::AssembleProlongationMatrix::operator()().

◆ GetRegularLocalCoordinate()

template<typename TDomain , typename TAlgebra , typename TElem >
void ug::Electromagnetism::NedelecProlongationMatrixHelper< TDomain, TAlgebra, TElem >::GetRegularLocalCoordinate ( const MultiGrid mg,
Vertex v,
TElem *  base,
MathVector< TElem::dim > &  local 
)
staticprivate

computes the local coordinates of a vertex according to the assumption of the regular refinement

Computes the local coordinates of a vertex according to the assumption of the regular refinement. The local coordinates are computed w.r.t. a given basis element that should be associated with the parent of the vertex whose all corners must be corners of the base element. (Otherwise an exception is thrown.) The vector of the local coordinates of the given vertex is the arithmetical average of the vectors of the local coordinates of its parent w.r.t. the base element.

Acknowledgements to S. Reiter.

Parameters
[in]mgthe grid hierarchy
[in]vthe vertex
[in]basethe base element (for the local coordinates)
[out]localto save the local coordinates

References ug::Provider< class >::get(), ug::MultiGrid::get_parent(), ug::GetVertexIndex(), local(), ug::PointerConstArray< class >::size(), UG_ASSERT, and UG_THROW.

Member Data Documentation

◆ dim

template<typename TDomain , typename TAlgebra , typename TElem >
const int ug::Electromagnetism::NedelecProlongationMatrixHelper< TDomain, TAlgebra, TElem >::dim = ref_elem_type::dim
staticprivate

dimensionality of the reference element

◆ WDim

template<typename TDomain , typename TAlgebra , typename TElem >
const int ug::Electromagnetism::NedelecProlongationMatrixHelper< TDomain, TAlgebra, TElem >::WDim = TDomain::dim
staticprivate

world dimention


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