9#include <kernel/util/dist.hpp>
10#include <kernel/geometry/export_vtk.hpp>
11#include <kernel/lafem/dense_vector.hpp>
12#include <kernel/lafem/power_vector.hpp>
13#include <kernel/lafem/tuple_vector.hpp>
14#include <kernel/lafem/vector_mirror.hpp>
15#include <kernel/lafem/power_mirror.hpp>
16#include <kernel/lafem/tuple_mirror.hpp>
17#include <kernel/lafem/unit_filter.hpp>
18#include <kernel/lafem/mean_filter.hpp>
19#include <kernel/lafem/none_filter.hpp>
20#include <kernel/lafem/power_filter.hpp>
21#include <kernel/lafem/tuple_filter.hpp>
22#include <kernel/lafem/sparse_matrix_csr.hpp>
23#include <kernel/lafem/saddle_point_matrix.hpp>
24#include <kernel/lafem/tuple_diag_matrix.hpp>
25#include <kernel/lafem/power_diag_matrix.hpp>
26#include <kernel/lafem/power_col_matrix.hpp>
27#include <kernel/lafem/power_row_matrix.hpp>
28#include <kernel/lafem/transfer.hpp>
29#include <kernel/analytic/common.hpp>
30#include <kernel/assembly/mirror_assembler.hpp>
31#include <kernel/assembly/symbolic_assembler.hpp>
32#include <kernel/assembly/domain_assembler_basic_jobs.hpp>
33#include <kernel/assembly/bilinear_operator_assembler.hpp>
34#include <kernel/assembly/linear_functional_assembler.hpp>
35#include <kernel/assembly/common_operators.hpp>
36#include <kernel/assembly/common_functionals.hpp>
37#include <kernel/assembly/grid_transfer.hpp>
38#include <kernel/assembly/discrete_projector.hpp>
39#include <kernel/assembly/mean_filter_assembler.hpp>
40#include <kernel/assembly/unit_filter_assembler.hpp>
41#include <kernel/global/gate.hpp>
42#include <kernel/global/muxer.hpp>
43#include <kernel/global/vector.hpp>
44#include <kernel/global/matrix.hpp>
45#include <kernel/global/filter.hpp>
46#include <kernel/global/mean_filter.hpp>
47#include <kernel/global/transfer.hpp>
49#include <control/domain/domain_control.hpp>
57 typename DataType_ =
Real,
58 typename IndexType_ =
Index,
59 typename ScalarMatrix_ = LAFEM::SparseMatrixCSR<DataType_, IndexType_>,
60 typename TransferMatrix_ = LAFEM::SparseMatrixCSR<DataType_, IndexType_> >
63 static_assert(std::is_same<DataType_, typename ScalarMatrix_::DataType>::value,
"DataType mismatch!");
64 static_assert(std::is_same<IndexType_, typename ScalarMatrix_::IndexType>::value,
"IndexType mismatch!");
67 static constexpr int dim = dim_;
68 typedef DataType_ DataType;
69 typedef IndexType_ IndexType;
72 typedef ScalarMatrix_ LocalScalarMatrix;
79 typedef typename LocalScalarMatrix::VectorTypeR LocalScalarVector;
81 typedef LocalScalarVector LocalPresVector;
85 typedef TransferMatrix_ LocalScalarTransferMatrix;
87 typedef TransferMatrix_ LocalPresTransferMatrix;
153 matrix_sys(&gate_sys, &gate_sys),
154 matrix_a(&gate_velo, &gate_velo),
155 matrix_b(&gate_velo, &gate_pres),
156 matrix_d(&gate_pres, &gate_velo),
157 matrix_s(&gate_pres, &gate_pres),
159 transfer_pres(&coarse_muxer_pres),
160 transfer_sys(&coarse_muxer_sys)
172 void compile_system_transfer()
181 transfer_sys.compile();
184 void compile_system_matrix()
191 template<
typename D_,
typename I_,
typename SM_,
typename TM_>
192 void convert(
const StokesPowerSystemLevel<dim_, D_, I_, SM_, TM_> & other)
202 matrix_a.convert(&gate_velo, &gate_velo,
other.matrix_a);
203 matrix_b.convert(&gate_velo, &gate_pres,
other.matrix_b);
204 matrix_d.convert(&gate_pres, &gate_velo,
other.matrix_d);
205 matrix_s.convert(&gate_pres, &gate_pres,
other.matrix_s);
207 compile_system_matrix();
209 compile_system_transfer();
213 template<
typename DomainLevel_>
216 const auto& dom_level = virt_dom_lvl.level();
217 const auto& dom_layer = virt_dom_lvl.layer();
218 const auto& space_velo = dom_level.space_velo;
219 const auto& space_pres = dom_level.space_pres;
222 this->gate_velo.
set_comm(dom_layer.comm_ptr());
223 this->gate_pres.
set_comm(dom_layer.comm_ptr());
224 this->gate_sys.
set_comm(dom_layer.comm_ptr());
227 for(
Index i(0); i < dom_layer.neighbor_count(); ++i)
229 int rank = dom_layer.neighbor_rank(i);
232 const auto* halo = dom_level.find_halo_part(rank);
250 if(!mirror_velo.
empty())
251 this->gate_velo.
push(rank, std::move(mirror_velo));
252 if(!mirror_pres.
empty())
253 this->gate_pres.
push(rank, std::move(mirror_pres));
254 if(!mirror_sys.
empty())
255 this->gate_sys.
push(rank, std::move(mirror_sys));
260 LocalPresVector tmpl_p(space_pres.get_num_dofs());
264 this->gate_velo.
compile(std::move(tmpl_v));
265 this->gate_pres.
compile(std::move(tmpl_p));
266 this->gate_sys.
compile(std::move(tmpl_s));
269 template<
typename DomainLevel_>
273 if(virt_lvl_coarse.is_parent())
275 XASSERT(virt_lvl_coarse.is_child());
277 const auto& layer_c = virt_lvl_coarse.layer_c();
278 const DomainLevel_& level_p = virt_lvl_coarse.level_p();
281 for(
Index i(0); i < layer_c.child_count(); ++i)
283 const auto* child = level_p.find_patch_part(
int(i));
285 SystemMirror child_mirror_sys;
286 VeloMirror& child_mirror_v = child_mirror_sys.template at<0>();
287 PresMirror& child_mirror_p = child_mirror_sys.template at<1>();
292 this->coarse_muxer_sys.
push_child(std::move(child_mirror_sys));
297 if(virt_lvl_coarse.is_child())
299 const auto& layer_c = virt_lvl_coarse.layer_c();
300 const DomainLevel_& level_c = virt_lvl_coarse.level_c();
302 SystemMirror parent_mirror_sys;
303 VeloMirror& parent_mirror_v = parent_mirror_sys.template at<0>();
304 PresMirror& parent_mirror_p = parent_mirror_sys.template at<1>();
308 Index n = level_c.space_velo.get_num_dofs();
309 parent_mirror_v._sub_mirror = ScalarMirror(n, n);
310 auto* idx = parent_mirror_v._sub_mirror.indices();
311 for(
Index i(0); i < n; ++i)
315 Index n = level_c.space_pres.get_num_dofs();
316 parent_mirror_p = ScalarMirror(n, n);
317 auto* idx = parent_mirror_p.indices();
318 for(
Index i(0); i < n; ++i)
324 layer_c.sibling_comm_ptr(),
325 layer_c.get_parent_rank(),
329 layer_c.sibling_comm_ptr(),
330 layer_c.get_parent_rank(),
334 layer_c.sibling_comm_ptr(),
335 layer_c.get_parent_rank(),
336 std::move(parent_mirror_sys)
340 LocalVeloVector tmpl_v(level_c.space_velo.get_num_dofs());
341 LocalPresVector tmpl_p(level_c.space_pres.get_num_dofs());
342 LocalSystemVector tmpl_s(tmpl_v.clone(), tmpl_p.clone());
343 this->coarse_muxer_velo.
compile(tmpl_v);
344 this->coarse_muxer_pres.
compile(tmpl_p);
345 this->coarse_muxer_sys.
compile(tmpl_s);
349 template<
typename DomainLevel_,
typename Cubature_>
350 void assemble_velocity_transfer(
351 const Domain::VirtualLevel<DomainLevel_>& virt_lvl_fine,
352 const Domain::VirtualLevel<DomainLevel_>& virt_lvl_coarse,
353 const Cubature_& cubature)
356 const DomainLevel_& level_f = *virt_lvl_fine;
357 const DomainLevel_& level_c = virt_lvl_coarse.is_child() ? virt_lvl_coarse.level_c() : *virt_lvl_coarse;
359 const auto& space_f = level_f.space_velo;
360 const auto& space_c = level_c.space_velo;
363 LocalVeloTransfer& loc_trans = this->transfer_velo.
local();
366 LocalVeloTransferMatrix& loc_prol_v = loc_trans.get_mat_prol();
367 LocalVeloTransferMatrix& loc_rest_v = loc_trans.get_mat_rest();
370 LocalScalarTransferMatrix& loc_prol_vx = loc_prol_v.get(0,0);
371 LocalScalarTransferMatrix& loc_rest_vx = loc_rest_v.get(0,0);
374 if(loc_prol_vx.empty())
378 for(
int i(1); i < loc_prol_v.num_row_blocks; ++i)
383 LocalVeloVector loc_vec_weight = loc_prol_v.create_vector_l();
386 LocalScalarVector& loc_vec_wx = loc_vec_weight.get(0);
390 loc_prol_vx.format();
391 loc_vec_weight.format();
397 for(
int i(1); i < loc_vec_weight.num_blocks; ++i)
398 loc_vec_weight.get(i).copy(loc_vec_wx);
400 this->gate_velo.
sync_0(loc_vec_weight);
403 loc_vec_weight.component_invert(loc_vec_weight);
406 loc_prol_vx.scale_rows(loc_prol_vx, loc_vec_wx);
409 loc_rest_vx = loc_prol_vx.transpose();
410 for(
int i(1); i < loc_prol_v.num_row_blocks; ++i)
418 this->transfer_velo.compile();
421 template<
typename DomainLevel_,
typename Cubature_>
422 void assemble_pressure_transfer(
423 const Domain::VirtualLevel<DomainLevel_>& virt_lvl_fine,
424 const Domain::VirtualLevel<DomainLevel_>& virt_lvl_coarse,
425 const Cubature_& cubature)
428 const DomainLevel_& level_f = *virt_lvl_fine;
429 const DomainLevel_& level_c = virt_lvl_coarse.is_child() ? virt_lvl_coarse.level_c() : *virt_lvl_coarse;
431 const auto& space_f = level_f.space_pres;
432 const auto& space_c = level_c.space_pres;
435 LocalPresTransfer& loc_trans = this->transfer_pres.
local();
438 LocalPresTransferMatrix& loc_prol_p = loc_trans.get_mat_prol();
439 LocalPresTransferMatrix& loc_rest_p = loc_trans.get_mat_rest();
442 if(loc_prol_p.empty())
447 LocalPresVector loc_vec_weight = loc_prol_p.create_vector_l();
452 loc_vec_weight.format();
458 this->gate_pres.
sync_0(loc_vec_weight);
461 loc_vec_weight.component_invert(loc_vec_weight);
464 loc_prol_p.scale_rows(loc_prol_p, loc_vec_weight);
467 loc_rest_p = loc_prol_p.transpose();
471 this->transfer_pres.compile();
474 template<
typename DomainLevel_,
typename Cubature_>
475 void assemble_transfers(
476 const Domain::VirtualLevel<DomainLevel_>& virt_lvl_fine,
477 const Domain::VirtualLevel<DomainLevel_>& virt_lvl_coarse,
478 const Cubature_& cubature)
480 this->assemble_velocity_transfer(virt_lvl_fine, virt_lvl_coarse, cubature);
481 this->assemble_pressure_transfer(virt_lvl_fine, virt_lvl_coarse, cubature);
482 this->compile_system_transfer();
485 template<
typename DomainLevel_,
typename Cubature_>
486 void assemble_velocity_truncation(
487 const Domain::VirtualLevel<DomainLevel_>& virt_lvl_fine,
488 const Domain::VirtualLevel<DomainLevel_>& virt_lvl_coarse,
489 const Cubature_& cubature,
490 const StokesPowerSystemLevel* sys_lvl_coarse =
nullptr)
493 XASSERT((sys_lvl_coarse !=
nullptr) || !virt_lvl_coarse.is_parent());
496 const DomainLevel_& level_f = *virt_lvl_fine;
497 const DomainLevel_& level_c = virt_lvl_coarse.is_child() ? virt_lvl_coarse.level_c() : *virt_lvl_coarse;
499 const auto& space_f = level_f.space_velo;
500 const auto& space_c = level_c.space_velo;
503 LocalVeloTransfer& loc_trans = this->transfer_velo.
local();
506 const LocalVeloTransferMatrix& loc_rest_v = loc_trans.get_mat_rest();
507 LocalVeloTransferMatrix& loc_trunc_v = loc_trans.get_mat_trunc();
510 const LocalScalarTransferMatrix& loc_rest_vx = loc_rest_v.get(0,0);
511 LocalScalarTransferMatrix& loc_trunc_vx = loc_trunc_v.get(0,0);
514 XASSERTM(loc_rest_vx.size() >
Index(0),
"you need to call 'assemble_velocity_transfer' first");
520 LocalVeloVector loc_vec_weight = loc_rest_v.create_vector_l();
523 LocalScalarVector& loc_vec_wx = loc_vec_weight.get(0);
526 loc_trunc_vx.format();
533 for(
int i(1); i < loc_vec_weight.num_blocks; ++i)
534 loc_vec_weight.get(i).copy(loc_vec_wx);
542 if(!virt_lvl_coarse.is_child())
546 sys_lvl_coarse->gate_velo.sync_0(loc_vec_weight);
548 else if(virt_lvl_coarse.is_parent())
560 this->coarse_muxer_velo.
join(loc_vec_weight, loc_tmp);
563 sys_lvl_coarse->gate_velo.sync_0(loc_tmp);
566 this->coarse_muxer_velo.
split(loc_vec_weight, loc_tmp);
574 this->coarse_muxer_velo.
join_send(loc_vec_weight);
578 this->coarse_muxer_velo.
split_recv(loc_vec_weight);
582 loc_vec_weight.component_invert(loc_vec_weight);
585 loc_trunc_vx.scale_rows(loc_trunc_vx, loc_vec_wx);
588 for(
int i(1); i < loc_trunc_v.num_row_blocks; ++i)
592 template<
typename DomainLevel_,
typename Cubature_>
593 void assemble_pressure_truncation(
594 const Domain::VirtualLevel<DomainLevel_>& virt_lvl_fine,
595 const Domain::VirtualLevel<DomainLevel_>& virt_lvl_coarse,
596 const Cubature_& cubature,
597 const StokesPowerSystemLevel* sys_lvl_coarse =
nullptr)
600 XASSERT((sys_lvl_coarse !=
nullptr) || !virt_lvl_coarse.is_parent());
603 const DomainLevel_& level_f = *virt_lvl_fine;
604 const DomainLevel_& level_c = virt_lvl_coarse.is_child() ? virt_lvl_coarse.level_c() : *virt_lvl_coarse;
606 const auto& space_f = level_f.space_pres;
607 const auto& space_c = level_c.space_pres;
610 LocalPresTransfer& loc_trans = this->transfer_pres.
local();
613 const LocalPresTransferMatrix& loc_rest = loc_trans.get_mat_rest();
614 LocalPresTransferMatrix& loc_trunc = loc_trans.get_mat_trunc();
617 XASSERTM(loc_rest.size() >
Index(0),
"you need to call 'assemble_prescity_transfer' first");
623 LocalPresVector loc_vec_weight = loc_trunc.create_vector_l();
627 loc_vec_weight.format();
638 if(!virt_lvl_coarse.is_child())
642 sys_lvl_coarse->gate_pres.sync_0(loc_vec_weight);
644 else if(virt_lvl_coarse.is_parent())
656 this->coarse_muxer_pres.
join(loc_vec_weight, loc_tmp);
659 sys_lvl_coarse->gate_pres.sync_0(loc_tmp);
662 this->coarse_muxer_pres.
split(loc_vec_weight, loc_tmp);
670 this->coarse_muxer_pres.
join_send(loc_vec_weight);
674 this->coarse_muxer_pres.
split_recv(loc_vec_weight);
678 loc_vec_weight.component_invert(loc_vec_weight);
681 loc_trunc.scale_rows(loc_trunc, loc_vec_weight);
684 template<
typename DomainLevel_,
typename Cubature_>
685 void assemble_truncations(
686 const Domain::VirtualLevel<DomainLevel_>& virt_lvl_fine,
687 const Domain::VirtualLevel<DomainLevel_>& virt_lvl_coarse,
688 const Cubature_& cubature,
689 const StokesPowerSystemLevel* sys_lvl_coarse =
nullptr)
691 this->assemble_velocity_truncation(virt_lvl_fine, virt_lvl_coarse, cubature, sys_lvl_coarse);
692 this->assemble_pressure_truncation(virt_lvl_fine, virt_lvl_coarse, cubature, sys_lvl_coarse);
693 this->compile_system_transfer();
696 template<
typename Trafo_,
typename SpaceVelo_,
typename Cubature_>
697 void assemble_velocity_laplace_matrix(Assembly::DomainAssembler<Trafo_>& dom_asm,
698 const SpaceVelo_& space_velo,
const Cubature_& cubature,
const DataType nu = DataType(1))
701 LocalMatrixBlockA& mat_loc_a = this->matrix_a.
local();
704 LocalScalarMatrix& mat_loc_a1 = mat_loc_a.
get(0,0);
707 if(mat_loc_a1.empty())
713 for(
int i(1); i < mat_loc_a.num_row_blocks; ++i)
720 Assembly::Common::LaplaceOperator laplace_op;
725 for(
int i(1); i < mat_loc_a.num_row_blocks; ++i)
726 mat_loc_a.get(i,i).copy(mat_loc_a1);
729 template<
typename Trafo_,
typename SpaceVelo_,
typename SpacePres_,
typename Cubature_>
731 const SpaceVelo_& space_velo,
const SpacePres_& space_pres,
const Cubature_& cubature)
738 LocalScalarMatrix& mat_loc_b1 = mat_loc_b.
get(0,0);
741 if(mat_loc_b1.empty())
751 LocalScalarMatrix& mat_loc_bi = mat_loc_b.
get(ider,0);
760 mat_loc_d.
get(0,i) = mat_loc_b.
get(i,0).transpose();
766 typename DataType_ =
Real,
767 typename IndexType_ =
Index,
793 return this->matrix_sys.
local().
bytes () + this->matrix_s.
local().bytes() + filter_sys.local().
bytes();
796 void compile_system_filter()
805 template<
typename D_,
typename I_,
typename SM_>
808 BaseClass::convert(other);
809 filter_velo.convert(other.filter_velo);
810 filter_pres.convert(other.filter_pres);
812 compile_system_filter();
819 typename DataType_ =
Real,
820 typename IndexType_ =
Index,
847 return this->matrix_sys.
local().
bytes () + this->matrix_s.
local().bytes() + filter_sys.local().
bytes();
850 void compile_system_filter()
859 template<
typename D_,
typename I_,
typename SM_>
862 BaseClass::convert(other);
863 filter_velo.convert(other.filter_velo);
864 filter_pres.convert(other.filter_pres);
866 compile_system_filter();
869 template<
typename SpacePres_,
typename Cubature_>
870 void assemble_pressure_mean_filter(
const SpacePres_& space_pres,
const Cubature_& cubature)
873 LocalPresFilter& fil_loc_p = this->filter_pres.local();
876 typename BaseClass::GlobalPresVector vec_glob_v(&this->gate_pres), vec_glob_w(&this->gate_pres);
879 typename BaseClass::LocalPresVector& vec_loc_v = vec_glob_v.local();
880 typename BaseClass::LocalPresVector& vec_loc_w = vec_glob_w.local();
883 typename BaseClass::LocalPresVector& vec_loc_f = this->gate_pres.
_freqs;
893 fil_loc_p = LocalPresFilter(vec_loc_v.clone(), vec_loc_w.clone(), vec_loc_f.clone(), this->gate_pres.get_comm());
#define XASSERT(expr)
Assertion macro definition.
#define XASSERTM(expr, msg)
Assertion macro definition with custom message.
Test-Derivative operator implementation.
Domain Integral Assembler class template.
static void assemble_truncation(Matrix_ &matrix, Vector_ &vector, const FineSpace_ &fine_space, const CoarseSpace_ &coarse_space, const String &cubature_name)
Assembles a truncation matrix and its corresponding weight vector.
static void assemble_prolongation(Matrix_ &matrix, Vector_ &vector, const FineSpace_ &fine_space, const CoarseSpace_ &coarse_space, const String &cubature_name)
Assembles a prolongation matrix and its corresponding weight vector.
static void assemble(LAFEM::DenseVector< DataType_, IndexType_ > &vec_prim, LAFEM::DenseVector< DataType_, IndexType_ > &vec_dual, const Space_ &space, const String &cubature_name)
Assembles an integral mean filter.
static void assemble_mirror(LAFEM::VectorMirror< DataType_, IndexType_ > &vec_mirror, const Space_ &space, const MeshPart_ &mesh_part)
Assembles a VectorMirror from a space and a mesh-part.
static void assemble_matrix_std1(MatrixType_ &matrix, const Space_ &space)
Assembles a standard matrix structure from a single space.
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.
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.
Virtual Domain Level class template.
Global Filter wrapper class template.
Global gate implementation.
void compile(LocalVector_ &&vector)
Compiles the gate to finish its setup.
void sync_0(LocalVector_ &vector) const
Synchronizes a type-0 vector, resulting in a type-1 vector.
void convert(const Gate< LVT2_, MT2_ > &other)
Conversion function for same vector container type but with different MDI-Type.
void push(int rank, Mirror_ &&mirror)
Adds a mirror for a neighbor process.
void set_comm(const Dist::Comm *comm_)
Sets the communicator for this gate.
LocalVector_ _freqs
frequency vector
Global Matrix wrapper class template.
LocalMatrix_ & local()
Returns a reference to the internal local LAFEM matrix object.
Mean Filter class template.
MeanFilter clone(LAFEM::CloneMode clone_mode=LAFEM::CloneMode::Deep) const
Creates a clone of itself.
Global multiplexer/demultiplexer implementation.
void join_send(const LocalVector_ &vec_src) const
Sends a join operation to the parent process.
void compile(const LocalVector_ &vec_tmp_)
Compiles the muxer.
void convert(const Muxer< LVT2_, MT2_ > &other)
Conversion function for same vector container type but with different MDI-Type.
void split_recv(LocalVector_ &vec_trg) const
Receives a split operation from the parent process.
void join(const LocalVector_ &vec_src, LocalVector_ &vec_trg) const
Performs a join operation on the parent process.
void push_child(Mirror_ &&child_mirror)
Adds a child rank and mirror for a parent process.
void set_parent(const Dist::Comm *sibling_comm_, int parent_rank, Mirror_ &&parent_mirror)
Sets the sibling communicator.
void split(LocalVector_ &vec_trg, const LocalVector_ &vec_src) const
Performs a split operation on the parent process.
Global grid-transfer operator class template.
Transfer clone(LAFEM::CloneMode clone_mode=LAFEM::CloneMode::Weak) const
Creates a clone of this object.
Global vector wrapper class template.
None Filter class template.
NoneFilter clone(CloneMode=CloneMode::Deep) const
Creates a (empty) clone of itself.
Power-Col-Matrix meta class template.
PowerColMatrix clone(LAFEM::CloneMode mode=LAFEM::CloneMode::Weak) const
Creates and returns a deep copy of this matrix.
static constexpr int num_row_blocks
number of row blocks (vertical size)
SubMatrixType & get(int i, int j)
Returns a sub-matrix block.
Power-Diag-Matrix meta class template.
SubMatrixType & get(int i, int j)
Returns a sub-matrix block.
PowerDiagMatrix clone(LAFEM::CloneMode mode=LAFEM::CloneMode::Weak) const
Creates and returns a deep copy of this matrix.
PowerVector meta-filter class template.
PowerFilter clone(CloneMode clone_mode=CloneMode::Deep) const
Creates a clone of itself.
PowerVector meta-mirror class template.
PowerMirror clone(CloneMode clone_mode=CloneMode::Weak) const
Clone operation.
bool empty() const
Checks whether the mirror is empty.
Power-Row-Matrix meta class template.
SubMatrixType & get(int i, int j)
Returns a sub-matrix block.
PowerRowMatrix clone(LAFEM::CloneMode mode=LAFEM::CloneMode::Weak) const
Creates and returns a deep copy of this matrix.
Power-Vector meta class template.
PowerVector clone(LAFEM::CloneMode mode=LAFEM::CloneMode::Weak) const
Creates and returns a copy of this vector.
Saddle-Point matrix meta class template.
MatrixTypeA & block_a()
Returns the sub-matrix block A.
std::size_t bytes() const
Returns the total amount of bytes allocated.
MatrixTypeB & block_b()
Returns the sub-matrix block B.
MatrixTypeD & block_d()
Returns the sub-matrix block D.
Grid-Transfer operator class template.
Tuple-Diag-Matrix meta class template.
TupleVector meta-filter class template.
std::size_t bytes() const
Returns the total amount of bytes allocated.
TupleVector meta-mirror class template.
bool empty() const
Checks whether the mirror is empty.
Variadic TupleVector class template.
Unit Filter class template.
Handles vector prolongation, restriction and serialization.
VectorMirror clone(CloneMode clone_mode=CloneMode::Weak) const
Clone operation.
bool empty() const
Checks whether the mirror is empty.
void assemble_bilinear_operator_matrix_2(DomainAssembler< Trafo_ > &dom_asm, Matrix_ &matrix, const BilOp_ &bilinear_operator, const TestSpace_ &test_space, const TrialSpace_ &trial_space, const String &cubature, const typename Matrix_::DataType alpha=typename Matrix_::DataType(1))
Assembles a bilinear operator into a matrix with different test- and trial-spaces.
void assemble_bilinear_operator_matrix_1(DomainAssembler< Trafo_ > &dom_asm, Matrix_ &matrix, const BilOp_ &bilinear_operator, const Space_ &space, const String &cubature, const typename Matrix_::DataType alpha=typename Matrix_::DataType(1))
Assembles a bilinear operator into a matrix with identical test- and trial-spaces.
@ other
generic/other permutation strategy
double Real
Real data type.
std::uint64_t Index
Index data type.
GlobalVeloTransfer transfer_velo
our global transfer operator
void assemble_gates(const Domain::VirtualLevel< DomainLevel_ > &virt_dom_lvl)
void assemble_grad_div_matrices(Assembly::DomainAssembler< Trafo_ > &dom_asm, const SpaceVelo_ &space_velo, const SpacePres_ &space_pres, const Cubature_ &cubature)
VeloMuxer coarse_muxer_velo
our coarse-level system muxer
std::size_t bytes() const
Returns the total amount of bytes allocated.
void convert(const StokesPowerUnitVeloMeanPresSystemLevel< dim_, D_, I_, SM_ > &other)
Conversion method.
void convert(const StokesPowerUnitVeloNonePresSystemLevel< dim_, D_, I_, SM_ > &other)
Conversion method.
std::size_t bytes() const
Returns the total amount of bytes allocated.