FEAT 3
Finite Element Analysis Toolbox
Loading...
Searching...
No Matches
FEAT::Assembly::SymbolicAssembler Class Reference

Symbolic Matrix and Graph assembler class. More...

#include <symbolic_assembler.hpp>

Static Public Member Functions

template<typename FineTestSpace_ , typename CoarseTrialSpace_ >
static Adjacency::Graph assemble_graph_2lvl (const FineTestSpace_ &fine_space, const CoarseTrialSpace_ &coarse_space)
 Assembles the 2-level refinement Dof-Adjacency graph. More...
 
template<typename Space_ >
static Adjacency::Graph assemble_graph_diag (const Space_ &space)
 Assembles the diagonal Dof-Adjacency graph for identical test- and trial-spaces. More...
 
template<typename Space_ >
static Adjacency::Graph assemble_graph_ext_facet1 (const Space_ &space)
 Assembles the extended-facet Dof-Adjacency graph for identical test- and trial-spaces. More...
 
template<typename TestSpace_ , typename TrialSpace_ >
static Adjacency::Graph assemble_graph_ext_facet2 (const TestSpace_ &test_space, const TrialSpace_ &trial_space)
 Assembles the extended-facet Dof-Adjacency graph for different test- and trial-spaces. More...
 
template<typename Space_ >
static Adjacency::Graph assemble_graph_ext_node1 (const Space_ &space)
 Assembles the extended-node Dof-Adjacency graph for identical test- and trial-spaces. More...
 
template<typename TestSpace_ , typename TrialSpace_ >
static Adjacency::Graph assemble_graph_ext_node2 (const TestSpace_ &test_space, const TrialSpace_ &trial_space)
 Assembles the extended-node Dof-Adjacency graph for different test- and trial-spaces. More...
 
template<typename TestSpace_ , typename TrialSpace_ , typename TrialToTestAdjator_ >
static Adjacency::Graph assemble_graph_intermesh (const TestSpace_ &test_space, const TrialSpace_ &trial_space, const TrialToTestAdjator_ &trial2test_adjactor)
 Assembles the Dof-Adjacency graph where test and trial spaces are defined on different meshes. More...
 
template<typename Space_ >
static Adjacency::Graph assemble_graph_std1 (const Space_ &space)
 Assembles the standard Dof-Adjacency graph for identical test- and trial-spaces. More...
 
template<typename TestSpace_ , typename TrialSpace_ >
static Adjacency::Graph assemble_graph_std2 (const TestSpace_ &test_space, const TrialSpace_ &trial_space)
 Assembles the standard Dof-Adjacency graph for different test- and trial-spaces. More...
 
template<typename MatrixType_ , typename FineSpace_ , typename CoarseSpace_ >
static void assemble_matrix_2lvl (MatrixType_ &matrix, const FineSpace_ &fine_space, const CoarseSpace_ &coarse_space)
 Assembles a 2-level matrix structure from a fine-coarse-space pair. More...
 
template<typename MatrixType_ , typename Space_ >
static void assemble_matrix_diag (MatrixType_ &matrix, const Space_ &space)
 Assembles a diagonal matrix structure from a single space. More...
 
template<typename MatrixType_ , typename Space_ >
static void assemble_matrix_ext_facet1 (MatrixType_ &matrix, const Space_ &space)
 Assembles an extended-facet matrix structure from a single space. More...
 
template<typename MatrixType_ , typename TestSpace_ , typename TrialSpace_ >
static void assemble_matrix_ext_facet2 (MatrixType_ &matrix, const TestSpace_ &test_space, const TrialSpace_ &trial_space)
 Assembles an extended-facet matrix structure from a test-trial-space pair. More...
 
template<typename MatrixType_ , typename Space_ >
static void assemble_matrix_ext_node1 (MatrixType_ &matrix, const Space_ &space)
 Assembles an extended-node matrix structure from a single space. More...
 
template<typename MatrixType_ , typename TestSpace_ , typename TrialSpace_ >
static void assemble_matrix_ext_node2 (MatrixType_ &matrix, const TestSpace_ &test_space, const TrialSpace_ &trial_space)
 Assembles an extended-node matrix structure from a test-trial-space pair. More...
 
template<typename MatrixType_ , typename TestSpace_ , typename TrialSpace_ , typename Trial2TestAdjactor_ >
static void assemble_matrix_intermesh (MatrixType_ &matrix, const TestSpace_ &test_space, const TrialSpace_ &trial_space, const Trial2TestAdjactor_ &trial2test_adjactor)
 Assembles a matrix structure from a test-trial-mesh pair defined on different meshes. More...
 
template<typename DT_ , typename IT_ , int BH_, int BW_, typename Space_ >
static void assemble_matrix_std1 (LAFEM::NullMatrix< DT_, IT_, BH_, BW_ > &matrix, const Space_ &space)
 specialization for NullMatrix More...
 
template<typename MatrixType_ , typename Space_ >
static void assemble_matrix_std1 (MatrixType_ &matrix, const Space_ &space)
 Assembles a standard matrix structure from a single space. More...
 
template<typename DT_ , typename IT_ , int BH_, int BW_, typename TestSpace_ , typename TrialSpace_ >
static void assemble_matrix_std2 (LAFEM::NullMatrix< DT_, IT_, BH_, BW_ > &matrix, const TestSpace_ &test_space, const TrialSpace_ &trial_space)
 specialization for NullMatrix More...
 
template<typename MatrixType_ , typename TestSpace_ , typename TrialSpace_ >
static void assemble_matrix_std2 (MatrixType_ &matrix, const TestSpace_ &test_space, const TrialSpace_ &trial_space)
 Assembles a standard matrix structure from a test-trial-space pair. More...
 

Detailed Description

Symbolic Matrix and Graph assembler class.

This class is used for the assembly of matrix sparsity patterns, which are either assembled into an Adjacency::Graph structure or directly into a sparse matrix container as e.g. LAFEM::SparseMatrixCSR.

This class supports the assembly of the following sparsity patterns:

  • Standard pattern for identical or different test-/trial-spaces defined on the same mesh. This pattern is used for standard operator matrices. The corresponding functions are assemble_matrix_std1 and assemble_matrix_std2.
  • Extended-facet pattern for identical or different test-/trial-spaces on the same mesh. This pattern is used for matrices which include operator coupling over neighbor elements, e.g. for jump-stabilization or discontinuous Galerkin methods. The corresponding functions are assemble_matrix_ext_facet1 and assemble_matrix_ext_facet2.
  • Extended-node pattern for identical or different test-/trial-spaces on the same mesh. This pattern is used for matrices which include operator coupling over neighbor nodes. The corresponding functions are assemble_matrix_ext_node1 and assemble_matrix_ext-node2.
  • Standard pattern for test-/trial-spaces defined on a 2-level-refined mesh pair. This pattern is used for prolongation and restriction matrices in multigrid methods. The corresponding function is assemble_matrix_2lvl.
Author
Peter Zajac

Definition at line 46 of file symbolic_assembler.hpp.

Member Function Documentation

◆ assemble_graph_2lvl()

template<typename FineTestSpace_ , typename CoarseTrialSpace_ >
static Adjacency::Graph FEAT::Assembly::SymbolicAssembler::assemble_graph_2lvl ( const FineTestSpace_ &  fine_space,
const CoarseTrialSpace_ &  coarse_space 
)
inlinestatic

Assembles the 2-level refinement Dof-Adjacency graph.

Parameters
[in]fine_spaceThe transient test-space defined on the refined mesh.
[in]coarse_spaceThe transient trial-space defined on the coarse mesh.
Attention
This function silently assumes that fine_space is defined on the mesh that was obtained by applying the standard 2-level refinement algorithm on the underlying mesh of coarse_space.
Returns
The standard Dof-Adjacency graph for the fine-test- and coarse-trial-space combination.

Definition at line 394 of file symbolic_assembler.hpp.

References assemble_graph_intermesh().

Referenced by assemble_matrix_2lvl().

◆ assemble_graph_diag()

template<typename Space_ >
static Adjacency::Graph FEAT::Assembly::SymbolicAssembler::assemble_graph_diag ( const Space_ &  space)
inlinestatic

Assembles the diagonal Dof-Adjacency graph for identical test- and trial-spaces.

Parameters
[in]spaceThe transient space representing the test- and trial spaces to be used for the assembly.
Returns
The diagonal Dof-Adjacency graph of the space.

Definition at line 279 of file symbolic_assembler.hpp.

References FEAT::Adjacency::Graph::get_domain_ptr(), and FEAT::Adjacency::Graph::get_image_idx().

Referenced by assemble_matrix_diag().

◆ assemble_graph_ext_facet1()

template<typename Space_ >
static Adjacency::Graph FEAT::Assembly::SymbolicAssembler::assemble_graph_ext_facet1 ( const Space_ &  space)
inlinestatic

Assembles the extended-facet Dof-Adjacency graph for identical test- and trial-spaces.

Parameters
[in]spaceThe transient space representing the test- and trial spaces to be used for the assembly.
Returns
The extended-facet Dof-Adjacency graph of the space.

Definition at line 158 of file symbolic_assembler.hpp.

References FEAT::Adjacency::injectify, FEAT::Adjacency::injectify_sorted, FEAT::Space::DofMappingRenderer::render(), and FEAT::Adjacency::transpose.

Referenced by assemble_matrix_ext_facet1().

◆ assemble_graph_ext_facet2()

template<typename TestSpace_ , typename TrialSpace_ >
static Adjacency::Graph FEAT::Assembly::SymbolicAssembler::assemble_graph_ext_facet2 ( const TestSpace_ &  test_space,
const TrialSpace_ &  trial_space 
)
inlinestatic

Assembles the extended-facet Dof-Adjacency graph for different test- and trial-spaces.

Parameters
[in]test_space,trial_spaceThe transient test- and trial-spaces to be used for the assembly. Must be defined on the same mesh.
Returns
The extended-facet Dof-Adjacency graph of the test- and trial-space combination.

Definition at line 113 of file symbolic_assembler.hpp.

References FEAT::Adjacency::injectify, FEAT::Adjacency::injectify_sorted, FEAT::Space::DofMappingRenderer::render(), FEAT::Adjacency::transpose, and XASSERTM.

Referenced by assemble_matrix_ext_facet2().

◆ assemble_graph_ext_node1()

template<typename Space_ >
static Adjacency::Graph FEAT::Assembly::SymbolicAssembler::assemble_graph_ext_node1 ( const Space_ &  space)
inlinestatic

Assembles the extended-node Dof-Adjacency graph for identical test- and trial-spaces.

Parameters
[in]spaceThe transient space representing the test- and trial spaces to be used for the assembly.
Returns
The extended-node Dof-Adjacency graph of the space.

Definition at line 241 of file symbolic_assembler.hpp.

References FEAT::Adjacency::injectify, FEAT::Adjacency::injectify_sorted, FEAT::Space::DofMappingRenderer::render(), and FEAT::Adjacency::transpose.

Referenced by assemble_matrix_ext_node1().

◆ assemble_graph_ext_node2()

template<typename TestSpace_ , typename TrialSpace_ >
static Adjacency::Graph FEAT::Assembly::SymbolicAssembler::assemble_graph_ext_node2 ( const TestSpace_ &  test_space,
const TrialSpace_ &  trial_space 
)
inlinestatic

Assembles the extended-node Dof-Adjacency graph for different test- and trial-spaces.

Parameters
[in]test_space,trial_spaceThe transient test- and trial-spaces to be used for the assembly. Must be defined on the same mesh.
Returns
The extended-node Dof-Adjacency graph of the test- and trial-space combination.

Definition at line 196 of file symbolic_assembler.hpp.

References FEAT::Adjacency::injectify, FEAT::Adjacency::injectify_sorted, FEAT::Space::DofMappingRenderer::render(), FEAT::Adjacency::transpose, and XASSERTM.

Referenced by assemble_matrix_ext_node2().

◆ assemble_graph_intermesh()

template<typename TestSpace_ , typename TrialSpace_ , typename TrialToTestAdjator_ >
static Adjacency::Graph FEAT::Assembly::SymbolicAssembler::assemble_graph_intermesh ( const TestSpace_ &  test_space,
const TrialSpace_ &  trial_space,
const TrialToTestAdjator_ &  trial2test_adjactor 
)
inlinestatic

Assembles the Dof-Adjacency graph where test and trial spaces are defined on different meshes.

Parameters
[in]test_spaceThe transient test-space defined on the test space mesh.
[in]trial_spaceThe transient trial-space defined on the trial space mesh.
[in]trial2test_adjactorA transient object implementing the adjactor interface, which maps from the set of trial space mesh cells to the test space mesh cells, which iterates over the set of all test space mesh cells intersecting with a given trial space mesh cell.
Returns
The inter-mesh Dof-Adjacency graph for the test- and trial-space combination defined on different meshes.

Definition at line 316 of file symbolic_assembler.hpp.

References FEAT::Adjacency::as_is, FEAT::Adjacency::Permutation::empty(), FEAT::Adjacency::Permutation::identity, FEAT::Adjacency::injectify_sorted, FEAT::Adjacency::injectify_transpose, FEAT::Adjacency::Graph::permute_indices(), and FEAT::Space::DofMappingRenderer::render().

Referenced by assemble_graph_2lvl(), and assemble_matrix_intermesh().

◆ assemble_graph_std1()

template<typename Space_ >
static Adjacency::Graph FEAT::Assembly::SymbolicAssembler::assemble_graph_std1 ( const Space_ &  space)
inlinestatic

Assembles the standard Dof-Adjacency graph for identical test- and trial-spaces.

Parameters
[in]spaceThe transient space representing the test- and trial spaces to be used for the assembly.
Returns
The standard Dof-Adjacency graph of the space.

Definition at line 88 of file symbolic_assembler.hpp.

References FEAT::Adjacency::injectify_sorted, FEAT::Space::DofMappingRenderer::render(), and FEAT::Adjacency::transpose.

Referenced by assemble_matrix_std1().

◆ assemble_graph_std2()

template<typename TestSpace_ , typename TrialSpace_ >
static Adjacency::Graph FEAT::Assembly::SymbolicAssembler::assemble_graph_std2 ( const TestSpace_ &  test_space,
const TrialSpace_ &  trial_space 
)
inlinestatic

Assembles the standard Dof-Adjacency graph for different test- and trial-spaces.

Parameters
[in]test_space,trial_spaceThe transient test- and trial-spaces to be used for the assembly. Must be defined on the same mesh.
Returns
The standard Dof-Adjacency graph of the test- and trial-space combination.

Definition at line 59 of file symbolic_assembler.hpp.

References FEAT::Adjacency::injectify_sorted, FEAT::Space::DofMappingRenderer::render(), FEAT::Adjacency::transpose, and XASSERTM.

Referenced by FEAT::Assembly::GradPresDivVeloAssembler::assemble(), FEAT::Assembly::GradOperatorAssembler::assemble(), and assemble_matrix_std2().

◆ assemble_matrix_2lvl()

template<typename MatrixType_ , typename FineSpace_ , typename CoarseSpace_ >
static void FEAT::Assembly::SymbolicAssembler::assemble_matrix_2lvl ( MatrixType_ &  matrix,
const FineSpace_ &  fine_space,
const CoarseSpace_ &  coarse_space 
)
inlinestatic

Assembles a 2-level matrix structure from a fine-coarse-space pair.

Parameters
[out]matrixA transient reference to the matrix to be assembled.
[in]fine_space,coarse_spaceThe transient fine and coarse spaces to be used for the assembly.
Attention
This function silently assumes that fine_space is defined on the mesh that was obtained by applying the standard 2-level refinement algorithm on the underlying mesh of coarse_space.

Definition at line 570 of file symbolic_assembler.hpp.

References assemble_graph_2lvl().

Referenced by FEAT::Control::Meshopt::MeshoptSystemLevel< DT_, IT_, Functional_ >::assemble_system_transfer().

◆ assemble_matrix_diag()

template<typename MatrixType_ , typename Space_ >
static void FEAT::Assembly::SymbolicAssembler::assemble_matrix_diag ( MatrixType_ &  matrix,
const Space_ &  space 
)
inlinestatic

Assembles a diagonal matrix structure from a single space.

Parameters
[out]matrixA transient reference to the matrix to be assembled.
[in]spaceThe transient space to be used for the assembly.

Definition at line 528 of file symbolic_assembler.hpp.

References assemble_graph_diag().

◆ assemble_matrix_ext_facet1()

template<typename MatrixType_ , typename Space_ >
static void FEAT::Assembly::SymbolicAssembler::assemble_matrix_ext_facet1 ( MatrixType_ &  matrix,
const Space_ &  space 
)
inlinestatic

Assembles an extended-facet matrix structure from a single space.

Parameters
[out]matrixA transient reference to the matrix to be assembled.
[in]spaceThe transient space to be used for the assembly.

Definition at line 482 of file symbolic_assembler.hpp.

References assemble_graph_ext_facet1().

◆ assemble_matrix_ext_facet2()

template<typename MatrixType_ , typename TestSpace_ , typename TrialSpace_ >
static void FEAT::Assembly::SymbolicAssembler::assemble_matrix_ext_facet2 ( MatrixType_ &  matrix,
const TestSpace_ &  test_space,
const TrialSpace_ &  trial_space 
)
inlinestatic

Assembles an extended-facet matrix structure from a test-trial-space pair.

Parameters
[out]matrixA transient reference to the matrix to be assembled.
[in]test_space,trial_spaceThe transient test- and trial-spaces to be used for the assembly.

Definition at line 466 of file symbolic_assembler.hpp.

References assemble_graph_ext_facet2().

◆ assemble_matrix_ext_node1()

template<typename MatrixType_ , typename Space_ >
static void FEAT::Assembly::SymbolicAssembler::assemble_matrix_ext_node1 ( MatrixType_ &  matrix,
const Space_ &  space 
)
inlinestatic

Assembles an extended-node matrix structure from a single space.

Parameters
[out]matrixA transient reference to the matrix to be assembled.
[in]spaceThe transient space to be used for the assembly.

Definition at line 513 of file symbolic_assembler.hpp.

References assemble_graph_ext_node1().

◆ assemble_matrix_ext_node2()

template<typename MatrixType_ , typename TestSpace_ , typename TrialSpace_ >
static void FEAT::Assembly::SymbolicAssembler::assemble_matrix_ext_node2 ( MatrixType_ &  matrix,
const TestSpace_ &  test_space,
const TrialSpace_ &  trial_space 
)
inlinestatic

Assembles an extended-node matrix structure from a test-trial-space pair.

Parameters
[out]matrixA transient reference to the matrix to be assembled.
[in]test_space,trial_spaceThe transient test- and trial-spaces to be used for the assembly.

Definition at line 497 of file symbolic_assembler.hpp.

References assemble_graph_ext_node2().

◆ assemble_matrix_intermesh()

template<typename MatrixType_ , typename TestSpace_ , typename TrialSpace_ , typename Trial2TestAdjactor_ >
static void FEAT::Assembly::SymbolicAssembler::assemble_matrix_intermesh ( MatrixType_ &  matrix,
const TestSpace_ &  test_space,
const TrialSpace_ &  trial_space,
const Trial2TestAdjactor_ &  trial2test_adjactor 
)
inlinestatic

Assembles a matrix structure from a test-trial-mesh pair defined on different meshes.

Parameters
[out]matrixA transient reference to the matrix to be assembled.
[in]test_space,trials_spaceThe transient fine and coarse spaces to be used for the assembly.
[in]trial2test_adjactorA transient object implementing the adjactor interface, which maps from the set of trial space mesh cells to the test space mesh cells, which iterates over the set of all test space mesh cells intersecting with a given trial space mesh cell.

Definition at line 548 of file symbolic_assembler.hpp.

References assemble_graph_intermesh().

◆ assemble_matrix_std1() [1/2]

template<typename DT_ , typename IT_ , int BH_, int BW_, typename Space_ >
static void FEAT::Assembly::SymbolicAssembler::assemble_matrix_std1 ( LAFEM::NullMatrix< DT_, IT_, BH_, BW_ > &  matrix,
const Space_ &  space 
)
inlinestatic

specialization for NullMatrix

Definition at line 449 of file symbolic_assembler.hpp.

References FEAT::LAFEM::NullMatrix< DT_, IT_, BlockHeight_, BlockWidth_ >::resize().

◆ assemble_matrix_std1() [2/2]

template<typename MatrixType_ , typename Space_ >
static void FEAT::Assembly::SymbolicAssembler::assemble_matrix_std1 ( MatrixType_ &  matrix,
const Space_ &  space 
)
inlinestatic

Assembles a standard matrix structure from a single space.

Parameters
[out]matrixA transient reference to the matrix to be assembled.
[in]spaceThe transient space to be used for the assembly.

Definition at line 442 of file symbolic_assembler.hpp.

References assemble_graph_std1().

Referenced by FEAT::Meshopt::DuDvFunctional< DT_, IT_, TrafoType_, MatrixType_ >::DuDvFunctional().

◆ assemble_matrix_std2() [1/2]

template<typename DT_ , typename IT_ , int BH_, int BW_, typename TestSpace_ , typename TrialSpace_ >
static void FEAT::Assembly::SymbolicAssembler::assemble_matrix_std2 ( LAFEM::NullMatrix< DT_, IT_, BH_, BW_ > &  matrix,
const TestSpace_ &  test_space,
const TrialSpace_ &  trial_space 
)
inlinestatic

specialization for NullMatrix

Definition at line 424 of file symbolic_assembler.hpp.

References FEAT::LAFEM::NullMatrix< DT_, IT_, BlockHeight_, BlockWidth_ >::resize().

◆ assemble_matrix_std2() [2/2]

template<typename MatrixType_ , typename TestSpace_ , typename TrialSpace_ >
static void FEAT::Assembly::SymbolicAssembler::assemble_matrix_std2 ( MatrixType_ &  matrix,
const TestSpace_ &  test_space,
const TrialSpace_ &  trial_space 
)
inlinestatic

Assembles a standard matrix structure from a test-trial-space pair.

Parameters
[out]matrixA transient reference to the matrix to be assembled.
[in]test_space,trial_spaceThe transient test- and trial-spaces to be used for the assembly.

Definition at line 416 of file symbolic_assembler.hpp.

References assemble_graph_std2().

Referenced by FEAT::Control::StokesPowerSystemLevel< dim_, DataType_, IndexType_, ScalarMatrix_, TransferMatrix_ >::assemble_grad_div_matrices().


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