FEAT 3
Finite Element Analysis Toolbox
Loading...
Searching...
No Matches
stokes_fbm_assembler.hpp
1// FEAT3: Finite Element Analysis Toolbox, Version 3
2// Copyright (C) 2010 by Stefan Turek & the FEAT group
3// FEAT3 is released under the GNU General Public License version 3,
4// see the file 'copyright.txt' in the top level directory for details.
5
6#pragma once
7
8// includes, FEAT
11#include <kernel/util/dist.hpp>
12#include <kernel/geometry/mesh_node.hpp>
13#include <kernel/assembly/unit_filter_assembler.hpp>
14#include <kernel/lafem/dense_vector.hpp>
15#include <kernel/lafem/dense_vector_blocked.hpp>
16#include <kernel/lafem/sparse_matrix_csr.hpp>
17#include <kernel/lafem/sparse_matrix_bcsr.hpp>
18#include <kernel/lafem/unit_filter.hpp>
19#include <kernel/lafem/unit_filter_blocked.hpp>
20#include <kernel/global/matrix.hpp>
21
22// includes, system
23#include <array>
24#include <vector>
25#include <memory>
26
27namespace FEAT
28{
29 namespace Assembly
30 {
61 template<typename MeshType_>
63 {
64 public:
66 typedef MeshType_ MeshType;
68 static constexpr int shape_dim = MeshType::shape_dim;
69
70 protected:
73
90 std::array<std::vector<int>, shape_dim+1> _fbm_masks;
92 std::unique_ptr<Geometry::MeshPart<MeshType>> _fbm_meshpart_inside;
94 std::unique_ptr<Geometry::MeshPart<MeshType>> _fbm_meshpart_interface;
96 std::unique_ptr<Assembly::UnitFilterAssembler<MeshType_>> _unit_asm_inside;
98 std::unique_ptr<Assembly::UnitFilterAssembler<MeshType_>> _unit_asm_interface;
101
102 public:
109 explicit StokesFBMAssembler(const MeshType& mesh_) :
110 _mesh(mesh_),
111 _fbm_masks(),
116 _compiled(false)
117 {
118 // allocate FBM mask vectors
119 for(int i(0); i <= shape_dim; ++i)
120 _fbm_masks.at(std::size_t(i)).resize(_mesh.get_num_entities(i), 0);
121 }
122
123 // no move, no copy, no problems
124 StokesFBMAssembler(const StokesFBMAssembler&) = delete;
126 StokesFBMAssembler& operator=(const StokesFBMAssembler&) = delete;
127 StokesFBMAssembler& operator=(StokesFBMAssembler&&) = delete;
128
131 {
132 }
133
137 void clear()
138 {
139 for(int i(0); i <= shape_dim; ++i)
140 {
141 _fbm_masks.at(std::size_t(i)).clear();
142 _fbm_masks.at(std::size_t(i)).resize(_mesh.get_num_entities(i), 0);
143 }
144 _fbm_meshpart_inside.reset();
146 _unit_asm_inside.reset();
147 _unit_asm_interface.reset();
148 _compiled = false;
149 }
150
160 const std::vector<int>& get_fbm_mask_vector(int dim) const
161 {
162 XASSERT((dim >= 0) && (dim <= shape_dim));
163 return _fbm_masks.at(std::size_t(dim));
164 }
165
173 {
174 XASSERTM(!_compiled, "assembler has already been compiled!");
175 for(int i(0); i <= shape_dim; ++i)
176 _add_fbm_target_set(_get_target_set(fbm_part.get_target_set_holder(), i), i);
177 }
178
190 void sync(const Geometry::RootMeshNode<MeshType>& mesh_node, const Dist::Comm& comm)
191 {
192 XASSERTM(!_compiled, "assembler has already been compiled!");
193
194 // get halo map
195 const auto& halo_map = mesh_node.get_halo_map();
196 const std::size_t num_halos = halo_map.size();
197
198 static constexpr std::size_t dim1(shape_dim + 1);
199
200 // create buffers for all halos [halo][idx]
201 std::vector<std::array<std::vector<int>, dim1>> send_bufs, recv_bufs;
202 send_bufs.resize(num_halos);
203 recv_bufs.resize(num_halos);
204
205 // create request vectors
206 Dist::RequestVector send_reqs, recv_reqs;
207 send_reqs.reserve(num_halos*dim1);
208 recv_reqs.reserve(num_halos*dim1);
209
210 // loop over all halos
211 auto it = halo_map.begin();
212 for(Index h(0); h < num_halos; ++h, ++it)
213 {
214 // loop over all dimensions
215 for(std::size_t d(0); d < dim1; ++d)
216 {
217 // get halo target set and its size
218 const Geometry::TargetSet& halo_trg_set = _get_target_set(it->second->get_target_set_holder(), int(d));
219 const Index n = halo_trg_set.get_num_entities();
220
221 // nothing to do?
222 if(n == Index(0))
223 continue;
224
225 // resize buffers
226 send_bufs[h][d].resize(n);
227 recv_bufs[h][d].resize(n);
228 int* sbuf = send_bufs[h][d].data();
229
230 // post receive request
231 recv_reqs.push_back(comm.irecv(recv_bufs[h][d].data(), n, it->first));
232
233 // gather send data via mirror
234 for(Index i(0); i < n; ++i)
235 sbuf[i] = _fbm_masks[d][halo_trg_set[i]];
236
237 // send
238 send_reqs.push_back(comm.isend(sbuf, n, it->first));
239 }
240 }
241
242 // wait for all receives to finish
243 recv_reqs.wait_all();
244
245 // loop over all halos
246 it = halo_map.begin();
247 for(Index h(0); h < num_halos; ++h, ++it)
248 {
249 // loop over all dimensions
250 for(std::size_t d(0); d < dim1; ++d)
251 {
252 // get halo target set and its size
253 const Geometry::TargetSet& halo_trg_set = _get_target_set(it->second->get_target_set_holder(), int(d));
254 const Index n = halo_trg_set.get_num_entities();
255
256 // nothing to do?
257 if(n == Index(0))
258 continue;
259
260 int* rbuf = recv_bufs[h][d].data();
261
262 // scatter receive data via mirror
263 for(Index i(0); i < n; ++i)
264 _fbm_masks[d][halo_trg_set[i]] |= rbuf[i];
265 }
266 }
267
268 // wait for all sends to finish
269 send_reqs.wait_all();
270 }
271
275 void compile()
276 {
277 XASSERTM(!_compiled, "assembler has already been compiled!");
278
279 // process the mask
280 _process_shapes(_fbm_masks, _mesh.get_index_set_holder());
281
282 // count masked entities
283 Index counts_i[shape_dim+1], counts_o[shape_dim+1];
284 for(int d(0); d <= shape_dim; ++d)
285 {
286 Index c0(0u), c1(0u);
287 for(int x : _fbm_masks.at(std::size_t(d)))
288 {
289 //c0 += Index( x & 1); // count number of bit 0 set to 1
290 //c1 += Index((x >> 1) & 1); // count number of bit 1 set to 1
291 c0 += Index(x == 1);
292 c1 += Index(x == 3);
293 }
294 counts_i[d] = c0;
295 counts_o[d] = c1;
296 }
297
298 // allocate mesh-part
299 this->_fbm_meshpart_interface.reset(new Geometry::MeshPart<MeshType>(counts_i, false));
300 this->_fbm_meshpart_inside.reset(new Geometry::MeshPart<MeshType>(counts_o, false));
301
302 // compute target sets
303 for(int d(0); d <= shape_dim; ++d)
304 {
305 _build_tbm_target_set(_get_target_set(_fbm_meshpart_interface->get_target_set_holder(), d), d, 1);
306 _build_tbm_target_set(_get_target_set(_fbm_meshpart_inside->get_target_set_holder(), d), d, 3);
307 }
308
309 // set up unit filter assemblers
310 this->_unit_asm_interface.reset(new Assembly::UnitFilterAssembler<MeshType>());
311 this->_unit_asm_inside.reset(new Assembly::UnitFilterAssembler<MeshType>());
312 _unit_asm_interface->add_mesh_part(*this->_fbm_meshpart_interface);
313 _unit_asm_inside->add_mesh_part(*this->_fbm_meshpart_inside);
314
315 // done
316 _compiled = true;
317 }
318
321 {
322 XASSERTM(_compiled, "FBM assembler must be compiled first!");
324 }
325
328 {
329 XASSERTM(_compiled, "FBM assembler must be compiled first!");
330 return *_fbm_meshpart_inside;
331 }
332
335 {
336 XASSERTM(_compiled, "FBM assembler must be compiled first!");
337 return *_unit_asm_interface;
338 }
339
342 {
343 XASSERTM(_compiled, "FBM assembler must be compiled first!");
344 return *_unit_asm_inside;
345 }
346
365 template<typename DT_, typename IT_, typename Space_>
367 const DT_ val_outside = DT_(0), const DT_ val_inside = DT_(1), const DT_ val_intface = DT_(1)) const
368 {
369 XASSERTM(_compiled, "FBM assembler must be compiled first!");
370 if(vector.empty())
371 vector = LAFEM::DenseVector<DT_, IT_>(space.get_num_dofs());
372
373 LAFEM::UnitFilter<DT_, IT_> filter_i(space.get_num_dofs());
374 LAFEM::UnitFilter<DT_, IT_> filter_o(space.get_num_dofs());
375 _unit_asm_interface->assemble(filter_i, space);
376 _unit_asm_inside->assemble(filter_o, space);
377
378 filter_i.get_filter_vector().format(val_intface);
379 filter_o.get_filter_vector().format(val_inside);
380
381 vector.format(val_outside);
382 filter_i.filter_sol(vector);
383 filter_o.filter_sol(vector);
384 }
385
395 template<typename DT_, typename IT_, typename Space_>
396 void assemble_inside_filter(LAFEM::UnitFilter<DT_, IT_>& filter, const Space_& space) const
397 {
398 XASSERTM(_compiled, "FBM assembler must be compiled first!");
399 this->_unit_asm_inside->assemble(filter, space);
400 }
401
411 template<typename DT_, typename IT_, typename Space_, int dim_>
413 {
414 XASSERTM(_compiled, "FBM assembler must be compiled first!");
415 this->_unit_asm_inside->assemble(filter, space);
416 }
417
439 template<typename DT_, typename IT_, typename Space_>
441 const LAFEM::SparseMatrixCSR<DT_, IT_>& matrix_a, const LAFEM::SparseMatrixCSR<DT_, IT_>& matrix_m, bool no_scale = false) const
442 {
443 XASSERTM(_compiled, "FBM assembler must be compiled first!");
444 this->_unit_asm_interface->assemble(filter, space);
445
446 if(no_scale)
447 filter.get_filter_vector().format(DT_(1));
448 else
449 {
450 auto diag_a = matrix_a.create_vector_l();
451 auto diag_m = matrix_m.create_vector_l();
452 matrix_a.extract_diag(diag_a, true);
453 matrix_m.extract_diag(diag_m, true);
454 filter.get_filter_vector().format(diag_a.max_abs_element() / diag_m.max_abs_element());
455 }
456 }
457
479 template<typename DT_, typename IT_, typename Space_, int bh_, int bw_>
481 const LAFEM::SparseMatrixBCSR<DT_, IT_, bh_, bw_>& matrix_a, const LAFEM::SparseMatrixBCSR<DT_, IT_, bh_, bw_>& matrix_m, bool no_scale = false) const
482 {
483 XASSERTM(_compiled, "FBM assembler must be compiled first!");
484 this->_unit_asm_interface->assemble(filter, space);
485
486 if(no_scale)
487 filter.get_filter_vector().format(DT_(1));
488 else
489 {
490 auto diag_a = matrix_a.create_vector_l();
491 auto diag_m = matrix_m.create_vector_l();
492 matrix_a.extract_diag(diag_a);
493 matrix_m.extract_diag(diag_m);
494 filter.get_filter_vector().format(diag_a.max_abs_element() / diag_m.max_abs_element());
495 }
496 }
497
515 template<typename DT_, typename IT_, typename Space_, typename Mirror_>
517 const Global::Matrix<LAFEM::SparseMatrixCSR<DT_, IT_>, Mirror_, Mirror_>& matrix_a,
518 const Global::Matrix<LAFEM::SparseMatrixCSR<DT_, IT_>, Mirror_, Mirror_>& matrix_m, bool no_scale = false) const
519 {
520 XASSERTM(_compiled, "FBM assembler must be compiled first!");
521 this->_unit_asm_interface->assemble(filter, space);
522
523 if(no_scale)
524 filter.get_filter_vector().format(DT_(1));
525 else
526 {
527 auto diag_a = matrix_a.create_vector_l();
528 auto diag_m = matrix_m.create_vector_l();
529 matrix_a.extract_diag(diag_a, true);
530 matrix_m.extract_diag(diag_m, true);
531 filter.get_filter_vector().format(diag_a.max_abs_element() / diag_m.max_abs_element());
532 }
533 }
534
552 template<typename DT_, typename IT_, typename Space_, typename Mirror_, int bh_, int bw_>
554 const Global::Matrix<LAFEM::SparseMatrixBCSR<DT_, IT_, bh_, bw_>, Mirror_, Mirror_>& matrix_a,
555 const Global::Matrix<LAFEM::SparseMatrixBCSR<DT_, IT_, bh_, bw_>, Mirror_, Mirror_>& matrix_m, bool no_scale = false) const
556 {
557 XASSERTM(_compiled, "FBM assembler must be compiled first!");
558 this->_unit_asm_interface->assemble(filter, space);
559
560 if(no_scale)
561 filter.get_filter_vector().format(DT_(1));
562 else
563 {
564 auto diag_a = matrix_a.create_vector_l();
565 auto diag_m = matrix_m.create_vector_l();
566 matrix_a.extract_diag(diag_a, true);
567 matrix_m.extract_diag(diag_m, true);
568 filter.get_filter_vector().format(diag_a.max_abs_element() / diag_m.max_abs_element());
569 }
570 }
571
572 protected:
574 void _add_fbm_target_set(const Geometry::TargetSet& target_set, int dim)
575 {
576 std::vector<int>& mask = _fbm_masks.at(std::size_t(dim));
577 const Index n = target_set.get_num_entities();
578 for(Index i(0); i < n; ++i)
579 mask.at(target_set[i]) |= 3;
580 }
581
583 void _build_tbm_target_set(Geometry::TargetSet& target_set, int dim, int mask_value)
584 {
585 const std::vector<int>& mask = _fbm_masks.at(std::size_t(dim));
586
587 for(Index i(0), k(0); i < mask.size(); ++i)
588 {
589 if(mask[i] == mask_value)
590 {
591 target_set[k] = i;
592 ++k;
593 }
594 }
595 }
596
598 template<typename Shape_>
599 static const Geometry::TargetSet& _get_target_set(const Geometry::TargetSetHolder<Shape_>& tsh, int dim)
600 {
601 XASSERT(Shape_::dimension >= dim);
602 typedef typename Shape::FaceTraits<Shape_, Shape_::dimension - 1>::ShapeType FacetType;
603 if(Shape_::dimension == dim)
604 return tsh.template get_target_set<Shape_::dimension>();
605 else
606 return _get_target_set(static_cast<const Geometry::TargetSetHolder<FacetType>&>(tsh), dim);
607 }
608
610 static const Geometry::TargetSet& _get_target_set(const Geometry::TargetSetHolder<Shape::Vertex>& tsh, int dim)
611 {
612 XASSERT(dim == 0);
613 return tsh.template get_target_set<0>();
614 }
615
617 template<typename Shape_>
618 static Geometry::TargetSet& _get_target_set(Geometry::TargetSetHolder<Shape_>& tsh, int dim)
619 {
620 XASSERT(Shape_::dimension >= dim);
621 typedef typename Shape::FaceTraits<Shape_, Shape_::dimension - 1>::ShapeType FacetType;
622 if(Shape_::dimension == dim)
623 return tsh.template get_target_set<Shape_::dimension>();
624 else
625 return _get_target_set(static_cast<Geometry::TargetSetHolder<FacetType>&>(tsh), dim);
626 }
627
629 static Geometry::TargetSet& _get_target_set(Geometry::TargetSetHolder<Shape::Vertex>& tsh, int dim)
630 {
631 XASSERT(dim == 0);
632 return tsh.template get_target_set<0>();
633 }
634
650 template<int m_>
651 static void _process_mask(std::vector<int>& shape_mask, const std::vector<int>& face_mask, const Geometry::IndexSet<m_>& faces_at_shape)
652 {
653 XASSERT(Index(shape_mask.size()) == faces_at_shape.get_num_entities());
654 XASSERT(Index(face_mask.size()) == faces_at_shape.get_index_bound());
655
656 const Index n = faces_at_shape.get_num_entities();
657 const int m = faces_at_shape.get_num_indices();
658 for(Index i(0); i < n; ++i)
659 {
660 // bit 1 of shape mask is only 1 if bit 0 of all faces (of all dimensions) are 1
661 int bit1 = (shape_mask[i] >> 1) & 1;
662 for(int j(0); j < m; ++j)
663 bit1 &= (face_mask[faces_at_shape(i,j)] & 1);
664 shape_mask[i] = (shape_mask[i] & 1) | (bit1 << 1);
665 }
666 }
667
669 template<typename Shape_, int face_dim_, std::size_t n_>
670 static void _process_masks(std::array<std::vector<int>, n_>& masks, const Geometry::IndexSetWrapper<Shape_, face_dim_>& idx_wrapper)
671 {
672 _process_masks(masks, static_cast<const Geometry::IndexSetWrapper<Shape_, face_dim_-1>&>(idx_wrapper));
673 _process_mask(masks.at(Shape_::dimension), masks.at(std::size_t(face_dim_)), idx_wrapper.template get_index_set<face_dim_>());
674 }
675
677 template<typename Shape_, std::size_t n_>
678 static void _process_masks(std::array<std::vector<int>, n_>& masks, const Geometry::IndexSetWrapper<Shape_, 0>& idx_wrapper)
679 {
680 _process_mask(masks.at(Shape_::dimension), masks.front(), idx_wrapper.template get_index_set<0>());
681 }
682
684 template<typename Shape_, std::size_t n_>
685 static void _process_shapes(std::array<std::vector<int>, n_>& masks, const Geometry::IndexSetHolder<Shape_>& idx_holder)
686 {
687 typedef typename Shape::FaceTraits<Shape_, Shape_::dimension-1>::ShapeType FacetType;
688 _process_shapes(masks, static_cast<const Geometry::IndexSetHolder<FacetType>&>(idx_holder));
689 _process_masks(masks, idx_holder.template get_index_set_wrapper<Shape_::dimension>());
690 }
691
693 template<std::size_t n_>
694 static void _process_shapes(std::array<std::vector<int>, n_>&, const Geometry::IndexSetHolder<Shape::Vertex>&)
695 {
696 // end of recursion; nothing to do here
697 }
698 }; // class StokesFBMAssembler
699 } // namespace Assembly
700} // namespace FEAT
#define XASSERT(expr)
Assertion macro definition.
Definition: assertion.hpp:262
#define XASSERTM(expr, msg)
Assertion macro definition with custom message.
Definition: assertion.hpp:263
FEAT Kernel base header.
Stokes Fictitious Boundary Method assembler class.
virtual ~StokesFBMAssembler()
virtual destructor
const Assembly::UnitFilterAssembler< MeshType > & get_unit_asm_inside() const
Returns a reference to the internal unit-filter assembler inside the FBM region.
static void _process_masks(std::array< std::vector< int >, n_ > &masks, const Geometry::IndexSetWrapper< Shape_, face_dim_ > &idx_wrapper)
auxiliary function: process masks for all face dimensions for a given shape
const std::vector< int > & get_fbm_mask_vector(int dim) const
Returns a reference to an internal FBM mask vector.
void _add_fbm_target_set(const Geometry::TargetSet &target_set, int dim)
auxiliary function: add a target set to the FBM mask vector
static const Geometry::TargetSet & _get_target_set(const Geometry::TargetSetHolder< Shape::Vertex > &tsh, int dim)
auxiliary function: get a target set from a target set holder (recursion end overload)
void assemble_characteristic_vector(LAFEM::DenseVector< DT_, IT_ > &vector, const Space_ &space, const DT_ val_outside=DT_(0), const DT_ val_inside=DT_(1), const DT_ val_intface=DT_(1)) const
Assembles a characteristic vector on the FBM region.
void assemble_interface_filter(LAFEM::UnitFilter< DT_, IT_ > &filter, const Space_ &space, const LAFEM::SparseMatrixCSR< DT_, IT_ > &matrix_a, const LAFEM::SparseMatrixCSR< DT_, IT_ > &matrix_m, bool no_scale=false) const
Assembles a UnitFilter on the FBM interface (non-parallel version)
void assemble_interface_filter(LAFEM::UnitFilterBlocked< DT_, IT_, bh_ > &filter, const Space_ &space, const Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, bh_, bw_ >, Mirror_, Mirror_ > &matrix_a, const Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, bh_, bw_ >, Mirror_, Mirror_ > &matrix_m, bool no_scale=false) const
Assembles a UnitFilterBlocked on the FBM interface (parallel version)
std::unique_ptr< Geometry::MeshPart< MeshType > > _fbm_meshpart_interface
the meshpart representing the FBM interface region
std::array< std::vector< int >, shape_dim+1 > _fbm_masks
Array of FBM mask vectors.
static Geometry::TargetSet & _get_target_set(Geometry::TargetSetHolder< Shape::Vertex > &tsh, int dim)
auxiliary function: get a target set from a target set holder (recursion end overload)
static const Geometry::TargetSet & _get_target_set(const Geometry::TargetSetHolder< Shape_ > &tsh, int dim)
auxiliary function: get a target set from a target set holder
void add_fbm_meshpart(const Geometry::MeshPart< MeshType > &fbm_part)
Adds a FBM mesh-part to the assembler.
StokesFBMAssembler(const MeshType &mesh_)
Constructor.
static void _process_shapes(std::array< std::vector< int >, n_ > &masks, const Geometry::IndexSetHolder< Shape_ > &idx_holder)
auxiliary function: process masks shape dimensions
const Geometry::MeshPart< MeshType > & get_meshpart_inside() const
Returns a reference to the mesh-part representing the FBM inside region.
const Geometry::MeshPart< MeshType > & get_meshpart_interface() const
Returns a reference to the mesh-part representing the FBM interface.
void _build_tbm_target_set(Geometry::TargetSet &target_set, int dim, int mask_value)
auxiliary function: build target set from mask vector
static constexpr int shape_dim
our shape dimension
void assemble_interface_filter(LAFEM::UnitFilter< DT_, IT_ > &filter, const Space_ &space, const Global::Matrix< LAFEM::SparseMatrixCSR< DT_, IT_ >, Mirror_, Mirror_ > &matrix_a, const Global::Matrix< LAFEM::SparseMatrixCSR< DT_, IT_ >, Mirror_, Mirror_ > &matrix_m, bool no_scale=false) const
Assembles a UnitFilter on the FBM interface (parallel version)
void assemble_interface_filter(LAFEM::UnitFilterBlocked< DT_, IT_, bh_ > &filter, const Space_ &space, const LAFEM::SparseMatrixBCSR< DT_, IT_, bh_, bw_ > &matrix_a, const LAFEM::SparseMatrixBCSR< DT_, IT_, bh_, bw_ > &matrix_m, bool no_scale=false) const
Assembles a UnitFilterBlocked on the FBM interface (non-parallel version)
static Geometry::TargetSet & _get_target_set(Geometry::TargetSetHolder< Shape_ > &tsh, int dim)
auxiliary function: get a target set from a target set holder
static void _process_masks(std::array< std::vector< int >, n_ > &masks, const Geometry::IndexSetWrapper< Shape_, 0 > &idx_wrapper)
auxiliary function: process masks for all face dimensions for a given shape (recursion end)
std::unique_ptr< Assembly::UnitFilterAssembler< MeshType_ > > _unit_asm_inside
unit-filter assembler on inside mesh-part
static void _process_shapes(std::array< std::vector< int >, n_ > &, const Geometry::IndexSetHolder< Shape::Vertex > &)
auxiliary function: process masks shape dimensions (recursion end)
static void _process_mask(std::vector< int > &shape_mask, const std::vector< int > &face_mask, const Geometry::IndexSet< m_ > &faces_at_shape)
Auxiliary function: update bit 1 of the mask vector for a shape based on a bit 0 of its face mask vec...
void compile()
Compiles the assembler.
void sync(const Geometry::RootMeshNode< MeshType > &mesh_node, const Dist::Comm &comm)
Synchronizes the assembler over all processes in a parallel simulation.
std::unique_ptr< Geometry::MeshPart< MeshType > > _fbm_meshpart_inside
the meshpart representing the FBM inside region
const MeshType & _mesh
a reference to our mesh object
std::unique_ptr< Assembly::UnitFilterAssembler< MeshType_ > > _unit_asm_interface
unit-filter assembler on interface mesh-part
void assemble_inside_filter(LAFEM::UnitFilter< DT_, IT_ > &filter, const Space_ &space) const
Assembles a UnitFilter inside the FBM region.
const Assembly::UnitFilterAssembler< MeshType > & get_unit_asm_interface() const
Returns a reference to the internal unit-filter assembler on the FBM interface.
void assemble_inside_filter(LAFEM::UnitFilterBlocked< DT_, IT_, dim_ > &filter, const Space_ &space) const
Assembles a UnitFilterBlocked inside the FBM region.
Unit-Filter assembly class template.
Communicator class.
Definition: dist.hpp:1349
Request irecv(void *buffer, std::size_t count, const Datatype &datatype, int source, int tag=0) const
Nonblocking Receive.
Definition: dist.cpp:716
Request isend(const void *buffer, std::size_t count, const Datatype &datatype, int dest, int tag=0) const
Nonblocking Send.
Definition: dist.cpp:704
Communication Request vector class.
Definition: dist.hpp:640
void push_back(Request &&request)
Inserts a new request at the end of the request vector.
Definition: dist.hpp:886
void reserve(std::size_t size_)
Reserves sufficient space for a specified number of requests.
Definition: dist.hpp:813
void wait_all()
Blocks until all active requests are fulfilled.
Definition: dist.cpp:324
Conformal Index-Set class template.
Definition: index_set.hpp:82
Index get_index_bound() const
Returns the index bound.
Definition: index_set.hpp:190
Index get_num_entities() const
Returns the number of entities.
Definition: index_set.hpp:180
int get_num_indices() const
Returns the number of indices per entity.
Definition: index_set.hpp:170
Class template for partial meshes.
Definition: mesh_part.hpp:90
Root mesh node class template.
Definition: mesh_node.hpp:748
const std::map< int, std::unique_ptr< MeshPartType > > & get_halo_map() const
Definition: mesh_node.hpp:896
Target set class.
Definition: target_set.hpp:27
Index get_num_entities() const
Returns the number of entities.
Definition: target_set.hpp:92
Global Matrix wrapper class template.
Definition: matrix.hpp:40
bool empty() const
Checks whether the container is empty.
Definition: container.hpp:1165
void format(DT_ value=DT_(0))
Reset all elements of the container to a given value or zero if missing.
Definition: container.hpp:851
Dense data vector class template.
CSR based blocked sparse matrix.
void extract_diag(VectorTypeL &diag, DenseVector< IT_, IT_ > &diag_indices) const
extract main diagonal vector from matrix
CSR based sparse matrix.
VectorTypeL create_vector_l() const
Returns a new compatible L-Vector.
void extract_diag(VectorTypeL &diag, DenseVector< IT_, IT_ > &diag_indices) const
extract main diagonal vector from matrix
Unit Filter Blocked class template.
Unit Filter class template.
Definition: unit_filter.hpp:29
void filter_sol(DenseVector< DT_, IT_ > &vector) const
Applies the filter onto the solution vector.
FEAT namespace.
Definition: adjactor.hpp:12
std::uint64_t Index
Index data type.
Face traits tag struct template.
Definition: shape.hpp:106