FEAT 3
Finite Element Analysis Toolbox
Loading...
Searching...
No Matches
trace_assembler_jump_jobs.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#include <kernel/assembly/trace_assembler.hpp>
9#include <kernel/assembly/function_integral_info.hpp>
10#include <kernel/geometry/intern/face_index_mapping.hpp>
11#include <kernel/geometry/intern/face_ref_trafo.hpp>
12#include <kernel/geometry/intern/congruency_sampler.hpp>
13#include <kernel/geometry/intern/congruency_trafo.hpp>
14
15namespace FEAT
16{
17 namespace Assembly
18 {
20 namespace Intern
21 {
22 template<int max_>
23 class CommonDofMap
24 {
25 public:
26 Index glob_dofs[max_];
27 int loc1_dofs[max_];
28 int loc2_dofs[max_];
29 int num_dofs;
30
31 explicit CommonDofMap() : num_dofs(0) {}
32
33 void clear()
34 {
35 num_dofs = 0;
36 }
37
38 int push_1(Index dof, int loc)
39 {
40 for(int i(0); i < num_dofs; ++i)
41 {
42 if(dof == glob_dofs[i])
43 {
44 loc1_dofs[i] = loc;
45 return i;
46 }
47 }
48 ASSERT(num_dofs < max_);
49 glob_dofs[num_dofs] = dof;
50 loc1_dofs[num_dofs] = loc;
51 loc2_dofs[num_dofs] = -1;
52 return num_dofs++;
53 }
54
55 int push_2(Index dof, int loc)
56 {
57 for(int i(0); i < num_dofs; ++i)
58 {
59 if(dof == glob_dofs[i])
60 {
61 loc2_dofs[i] = loc;
62 return i;
63 }
64 }
65 ASSERT(num_dofs < max_);
66 glob_dofs[num_dofs] = dof;
67 loc1_dofs[num_dofs] = -1;
68 loc2_dofs[num_dofs] = loc;
69 return num_dofs++;
70 }
71
72 int loc_1(int k) const
73 {
74 return loc1_dofs[k];
75 }
76
77 int loc_2(int k) const
78 {
79 return loc2_dofs[k];
80 }
81
82 int get_num_local_dofs() const
83 {
84 return num_dofs;
85 }
86
87 Index get_index(int i) const
88 {
89 return glob_dofs[i];
90 }
91 }; // class CommonDofMap<...>
92 } // namespace Intern
94
100 template<typename DataType_, typename Space_, TrafoTags trafo_config_, TrafoTags facet_trafo_config_, SpaceTags space_config_>
102 {
103 public:
104 // this task supports pairwise assembly
105 static constexpr bool assemble_pairwise = true;
115 typedef typename TrafoType::ShapeType ShapeType;
117 typedef typename Shape::FaceTraits<ShapeType, ShapeType::dimension-1>::ShapeType FacetType;
118
120 static constexpr int shape_dim = ShapeType::dimension;
122 static constexpr int facet_dim = FacetType::dimension;
123
127 typedef typename TrafoType::template Evaluator<FacetType, DataType>::Type TrafoFacetEvaluator;
128
131
133 static constexpr TrafoTags facet_trafo_config = facet_trafo_config_ | TrafoTags::jac_mat;
134
138 typedef typename TrafoFacetEvaluator::template ConfigTraits<facet_trafo_config>::EvalDataType TrafoFacetEvalData;
141 typedef typename AsmTraits::SpaceBasisData SpaceBasisData;
142
144 typedef typename Intern::CubatureTraits<TrafoFacetEvaluator>::RuleType CubatureRuleType;
145
146 protected:
164 typename AsmTraits::BasisData null_basis_data;
166 typename AsmTraits::DofMapping dof_mapping_1, dof_mapping_2;
167 // common DOF mapping
168 static constexpr int max_common_dofs = 2 * AsmTraits::max_local_test_dofs;
169 Intern::CommonDofMap<max_common_dofs> common_map;
170
173
175 int cell_facet_ori_1, cell_facet_ori_2;
176
180 Tiny::Vector<DataType, shape_dim> face_vec_1, face_vec_2;
181 Tiny::Vector<DataType, facet_dim> ori_vec_1, ori_vec_2;
182
187
188 public:
189 explicit TraceAssemblyJumpTaskBase1(const SpaceType& space_) :
190 space(space_),
191 trafo(space.get_trafo()),
193 trafo_eval_2(trafo),
196 space_eval_2(space),
197 trafo_data_1(),
198 trafo_data_2(),
200 space_data_1(),
201 space_data_2(),
203 dof_mapping_2(space),
204 cell_pair(false),
206 cell_facet_ori_2(0)
207 {
208 null_basis_data.format();
210 face_mat_2.format();
211 ori_mat_1.format();
212 ori_mat_2.format();
213 face_vec_1.format();
214 face_vec_2.format();
215 ori_vec_1.format();
216 ori_vec_2.format();
217 }
218
219 virtual ~TraceAssemblyJumpTaskBase1() = default;
220
221 void prepare(Index facet, Index cell, int local_facet, int facet_ori)
222 {
223 // we prepare for a single cell here
224 cell_pair = false;
225
226 // compute facet trafo
227 Geometry::Intern::FaceRefTrafo<ShapeType, facet_dim>::compute(face_mat_1, face_vec_1, local_facet);
228
229 // compute orientation trafo
230 Geometry::Intern::CongruencyTrafo<FacetType>::compute(ori_mat_1, ori_vec_1, facet_ori);
231
232 // compute orientation of actual cell facet
233 cell_facet_ori_1 = Geometry::Intern::CongruencySampler<FacetType>::orientation(facet_ori)
235
236 // prepare evaluators
237 trafo_facet_eval.prepare(facet);
238 trafo_eval_1.prepare(cell);
239 space_eval_1.prepare(trafo_eval_1);
240
241 // prepare dof mapping
242 dof_mapping_1.prepare(cell);
243
244 // build local dof map
245 common_map.clear();
246 for(int i(0); i < dof_mapping_1.get_num_local_dofs(); ++i)
247 common_map.push_1(dof_mapping_1.get_index(i), i);
248 }
249
250 void prepare(Index facet, Index cell_1, Index cell_2, int local_facet_1, int local_facet_2, int facet_ori_1, int facet_ori_2)
251 {
252 // we prepare for a cell pair here
253 cell_pair = true;
254
255 // compute facet trafo
256 Geometry::Intern::FaceRefTrafo<ShapeType, facet_dim>::compute(face_mat_1, face_vec_1, local_facet_1);
257 Geometry::Intern::FaceRefTrafo<ShapeType, facet_dim>::compute(face_mat_2, face_vec_2, local_facet_2);
258
259 // compute orientation trafo
260 Geometry::Intern::CongruencyTrafo<FacetType>::compute(ori_mat_1, ori_vec_1, facet_ori_1);
261 Geometry::Intern::CongruencyTrafo<FacetType>::compute(ori_mat_2, ori_vec_2, facet_ori_2);
262
263 // compute orientation of actual cell facet
264 cell_facet_ori_1 = Geometry::Intern::CongruencySampler<FacetType>::orientation(facet_ori_1)
266 cell_facet_ori_2 = Geometry::Intern::CongruencySampler<FacetType>::orientation(facet_ori_2)
268
269 // prepare evaluators
270 trafo_facet_eval.prepare(facet);
271 trafo_eval_1.prepare(cell_1);
272 trafo_eval_2.prepare(cell_2);
273 space_eval_1.prepare(trafo_eval_1);
274 space_eval_2.prepare(trafo_eval_2);
275
276 // prepare dof mapping
277 dof_mapping_1.prepare(cell_1);
278 dof_mapping_2.prepare(cell_2);
279
280 // build local dof map
281 common_map.clear();
282 for(int i(0); i < dof_mapping_1.get_num_local_dofs(); ++i)
283 common_map.push_1(dof_mapping_1.get_index(i), i);
284 for(int i(0); i < dof_mapping_2.get_num_local_dofs(); ++i)
285 common_map.push_2(dof_mapping_2.get_index(i), i);
286 }
287
288 void prepare_point(Tiny::Vector<DataType, facet_dim>& pt)
289 {
290 // set cubature point
291 cur_point_facet = pt;
292
293 // compute facet trafo data
295
296 // compute normal vector on facet trafo data
297 trafo_facet_data.normal = Tiny::orthogonal(trafo_facet_data.jac_mat).normalize();
298
299 // transform point to local facet on reference cell
300 cur_point_1 = (face_mat_1 * ((ori_mat_1 * cur_point_facet) + ori_vec_1)) + face_vec_1;
301
302 // compute trafo data
304
305 // compute normal vector
306 trafo_data_1.normal = trafo_facet_data.normal;
307
308 // ensure that the normal vector "points outside"
309 if(cell_facet_ori_1 < 0)
310 trafo_data_1.normal.negate();
311
312 // compute space data
314
315 if(!cell_pair)
316 return;
317
318 // transform point to local facet on reference cell
319 cur_point_2 = (face_mat_2 * ((ori_mat_2 * cur_point_facet) + ori_vec_2)) + face_vec_2;
320
321 // compute trafo data
322 trafo_eval_2(trafo_data_2, cur_point_2);
323
324 // compute normal vector
325 trafo_data_2.normal = trafo_facet_data.normal;
326
327 // ensure that the normal vector "points outside"
328 if(cell_facet_ori_2 < 0)
329 trafo_data_2.normal.negate();
330
331 // compute space data
332 space_eval_2(space_data_2, trafo_data_2);
333 }
334
335 void finish()
336 {
337 if(cell_pair)
338 {
339 dof_mapping_2.finish();
340 space_eval_2.finish();
341 trafo_eval_2.finish();
342 }
343 dof_mapping_1.finish();
344 space_eval_1.finish();
345 trafo_eval_1.finish();
346 trafo_facet_eval.finish();
347 }
348 }; // class TraceAssemblyJumpTaskBase1<...>
349
378 template<typename Derived_, typename Matrix_, typename Space_,
379 TrafoTags trafo_config_, TrafoTags facet_trafo_config_, SpaceTags space_config_>
381 public TraceAssemblyJumpTaskBase1<typename Matrix_::DataType, Space_, trafo_config_, facet_trafo_config_ | TrafoTags::jac_det, space_config_>
382 {
383 public:
386
388 typedef typename Matrix_::DataType DataType;
390 typedef typename Matrix_::ValueType ValueType;
391
393 static constexpr bool need_scatter = true;
395 static constexpr bool need_combine = false;
396
399 using typename BaseClass::SpaceBasisData;
400
401 using BaseClass::max_common_dofs;
402
403 protected:
405 Matrix_& matrix;
411 typename Matrix_::ScatterAxpy scatter_axpy;
414
415 public:
431 explicit TraceAssemblyJumpMatrixTaskCRTP1(Matrix_& matrix_, const Space_& space_,
432 const Cubature::DynamicFactory& cubature_factory, DataType alpha_) :
433 BaseClass(space_),
434 matrix(matrix_),
435 cubature_rule(Cubature::ctor_factory, cubature_factory),
437 scatter_alpha(alpha_)
438 {
439 }
440
441#ifdef DOXYGEN
460 void set_point(TrafoFacetEvalData& tau_f, bool is_pair, TrafoEvalData& tau_1, TrafoEvalData& tau_2);
461
486 void eval(ValueType& val, const DataType& weight, bool is_pair,
487 const SpaceBasisData& psi_1, const SpaceBasisData& psi_2,
488 const SpaceBasisData& phi_1, const SpaceBasisData& phi_2);
489#endif // DOXYGEN
490
494 void assemble()
495 {
496 // format local matrix
498
499 // fetch number of local dofs
500 const int num_loc_dofs = this->common_map.get_num_local_dofs();
501
502 // loop over all quadrature points and integrate
503 for(int k(0); k < cubature_rule.get_num_points(); ++k)
504 {
505 // prepare point
506 static_cast<Derived_&>(*this).prepare_point(cubature_rule.get_point(k));
507
508 // evaluate operator
509 static_cast<Derived_&>(*this).set_point(this->trafo_facet_data, this->cell_pair, this->trafo_data_1, this->trafo_data_2);
510
511 // test function loop
512 for(int i(0); i < num_loc_dofs; ++i)
513 {
514 const int i_1 = this->common_map.loc_1(i);
515 const int i_2 = this->common_map.loc_2(i);
516 const SpaceBasisData& psi_1 = (i_1 > -1 ? this->space_data_1.phi[i_1] : this->null_basis_data);
517 const SpaceBasisData& psi_2 = (i_2 > -1 ? this->space_data_2.phi[i_2] : this->null_basis_data);
518
519 // trial function loop
520 for(int j(0); j < num_loc_dofs; ++j)
521 {
522 const int j_1 = this->common_map.loc_1(j);
523 const int j_2 = this->common_map.loc_2(j);
524 const SpaceBasisData& phi_1 = (j_1 > -1 ? this->space_data_1.phi[j_1] : this->null_basis_data);
525 const SpaceBasisData& phi_2 = (j_2 > -1 ? this->space_data_2.phi[j_2] : this->null_basis_data);
526
527 // evaluate operator and integrate
528 static_cast<Derived_&>(*this).eval(local_matrix(i,j),
529 this->trafo_facet_data.jac_det * cubature_rule.get_weight(k),
530 this->cell_pair, psi_1, psi_2, phi_1, phi_2);
531 } // continue with next trial function
532 } // continue with next test function
533 } // continue with next cubature point
534 }
535
539 void scatter()
540 {
541 scatter_axpy(local_matrix, this->common_map, this->common_map, scatter_alpha);
542 }
543
547 void combine()
548 {
549 // nothing to do here
550 }
551 }; // class TraceAssemblyJumpMatrixTaskCRTP1<...>
552
567 template<typename Matrix_, typename Space_>
569 {
570 public:
571 typedef typename Matrix_::DataType DataType;
572 typedef typename Matrix_::ValueType ValueType;
573
574 class Task :
575 public TraceAssemblyJumpMatrixTaskCRTP1<Task, Matrix_, Space_, TrafoTags::none, TrafoTags::jac_det, SpaceTags::grad>
576 {
577 protected:
580
583
584 using typename BaseClass::TrafoFacetEvalData;
585 using typename BaseClass::TrafoEvalData;
586 using typename BaseClass::SpaceBasisData;
587
589 const DataType jacdet_scale, jacdet_power;
590
592 DataType point_scale;
593
594 public:
596 BaseClass(job.matrix, job.space, job.cubature_factory, job.gamma),
598 jacdet_power(job.jacdet_power),
600 {
601 }
602
603 void set_point(TrafoFacetEvalData& tau_f, bool DOXY(is_pair), TrafoEvalData& DOXY(tau_1), TrafoEvalData& DOXY(tau_2))
604 {
605 // pre-compute scaling factor
606 point_scale = Math::pow(jacdet_scale * tau_f.jac_det, jacdet_power);
607 }
608
609 void eval(ValueType& val, const DataType& weight, bool DOXY(is_pair),
610 const SpaceBasisData& psi_1, const SpaceBasisData& psi_2,
611 const SpaceBasisData& phi_1, const SpaceBasisData& phi_2)
612 {
613 // integrate < [psi], [phi] >
614 Tiny::add_id(val, weight * point_scale * Tiny::dot(psi_2.grad - psi_1.grad, phi_2.grad - phi_1.grad));
615 }
616 }; // class Task
617
618 protected:
620 Matrix_& matrix;
622 const Space_& space;
626 DataType gamma;
628 DataType jacdet_scale, jacdet_power;
629
630 public:
652 explicit TraceAssemblyJumpStabilizationMatrixJob(Matrix_& matrix_, const Space_& space_, String cubature_,
653 DataType gamma_ = DataType(1), DataType jacdet_scale_ = DataType(2), DataType jacdet_power_ = DataType(2)) :
654 matrix(matrix_),
655 space(space_),
656 cubature_factory(cubature_),
657 gamma(gamma_),
658 jacdet_scale(jacdet_scale_),
659 jacdet_power(jacdet_power_)
660 {
661 }
662 }; // class TraceAssemblyJumpStabilizationMatrixJob<...>
663
688 template<typename Trafo_, typename Matrix_, typename Space_>
690 Matrix_& matrix, const Space_& space, const String& cubature,
691 const typename Matrix_::DataType gamma = typename Matrix_::DataType(1),
692 const typename Matrix_::DataType jacdet_scale = typename Matrix_::DataType(2),
693 const typename Matrix_::DataType jacdet_power = typename Matrix_::DataType(2))
694 {
695 XASSERTM(trace_asm.get_trafo() == space.get_trafo(), "trace assembler and space have different trafos");
696 XASSERTM(matrix.columns() == space.get_num_dofs(), "invalid matrix column count");
697 XASSERTM(matrix.rows() == space.get_num_dofs(), "invalid matrix row count");
698
700 gamma, jacdet_scale, jacdet_power);
701 trace_asm.assemble(job);
702 }
703
718 template<typename Matrix_, typename Space_>
720 {
721 public:
722 typedef typename Matrix_::DataType DataType;
723 typedef typename Matrix_::ValueType ValueType;
724
725 class Task :
726 public TraceAssemblyJumpMatrixTaskCRTP1<Task, Matrix_, Space_, TrafoTags::none, TrafoTags::none, SpaceTags::value>
727 {
728 protected:
731
734
735 using typename BaseClass::TrafoFacetEvalData;
736 using typename BaseClass::TrafoEvalData;
737 using typename BaseClass::SpaceBasisData;
738
739 public:
740 explicit Task(TraceAssemblyJumpMassMatrixJob& job) :
741 BaseClass(job.matrix, job.space, job.cubature_factory, job.alpha)
742 {
743 }
744
745 void eval(ValueType& val, const DataType& weight, bool,
746 const SpaceBasisData& psi_1, const SpaceBasisData& psi_2,
747 const SpaceBasisData& phi_1, const SpaceBasisData& phi_2)
748 {
749 Tiny::add_id(val, weight * (psi_2.value - psi_1.value) * (phi_2.value - phi_1.value));
750 }
751 }; // class Task
752
753 protected:
755 Matrix_& matrix;
757 const Space_& space;
761 DataType alpha;
762
763 public:
779 explicit TraceAssemblyJumpMassMatrixJob(Matrix_& matrix_, const Space_& space_, String cubature_, DataType alpha_ = DataType(1)) :
780 matrix(matrix_),
781 space(space_),
782 cubature_factory(cubature_),
783 alpha(alpha_)
784 {
785 }
786 }; // class TraceAssemblyJumpMassMatrixJob<...>
787
806 template<typename Trafo_, typename Matrix_, typename Space_>
808 Matrix_& matrix, const Space_& space, const String& cubature,
809 const typename Matrix_::DataType alpha = typename Matrix_::DataType(1))
810 {
811 XASSERTM(trace_asm.get_trafo() == space.get_trafo(), "trace assembler and space have different trafos");
812 XASSERTM(matrix.columns() == space.get_num_dofs(), "invalid matrix column count");
813 XASSERTM(matrix.rows() == space.get_num_dofs(), "invalid matrix row count");
814
815 TraceAssemblyJumpMassMatrixJob<Matrix_, Space_> job(matrix, space, cubature, alpha);
816 trace_asm.assemble(job);
817 }
818 } // namespace Assembly
819} // namespace FEAT
#define ASSERT(expr)
Debug-Assertion macro definition.
Definition: assertion.hpp:229
#define XASSERTM(expr, msg)
Assertion macro definition with custom message.
Definition: assertion.hpp:263
Common single-space assembly traits class template.
Definition: asm_traits.hpp:83
TrafoType::template Evaluator< ShapeType, DataType >::Type TrafoEvaluator
trafo evaluator type
Definition: asm_traits.hpp:104
SpaceEvalData::BasisDataType SpaceBasisData
basis function data types
Definition: asm_traits.hpp:148
SpaceEvaluator::template ConfigTraits< space_config >::EvalDataType SpaceEvalData
space evaluation data types
Definition: asm_traits.hpp:142
DataType_ DataType
data type
Definition: asm_traits.hpp:86
SpaceType::TrafoType TrafoType
trafo type
Definition: asm_traits.hpp:97
SpaceType::DofMappingType DofMapping
dof-mapping types
Definition: asm_traits.hpp:155
TrafoEvaluator::template ConfigTraits< trafo_config >::EvalDataType TrafoEvalData
trafo evaluation data type
Definition: asm_traits.hpp:138
SpaceType::template Evaluator< TrafoEvaluator >::Type SpaceEvaluator
space evaluator types
Definition: asm_traits.hpp:110
Space_ SpaceType
space type
Definition: asm_traits.hpp:88
Trace Integral Assembler class template.
void assemble(Job_ &job)
Executes a trace assembly job.
const TrafoType & get_trafo() const
TraceAssemblyJumpMatrixTaskCRTP1< Task, Matrix_, Space_, TrafoTags::none, TrafoTags::none, SpaceTags::value > BaseClass
our base-class typedef
Matrix assembly job for the mass jump operator.
Cubature::DynamicFactory cubature_factory
the cubature factory to be used for integration
const Space_ & space
a reference to the finite element space to be used as test-/trial-space
TraceAssemblyJumpMassMatrixJob(Matrix_ &matrix_, const Space_ &space_, String cubature_, DataType alpha_=DataType(1))
Constructor.
DataType alpha
the scaling factor for the assembly.
Matrix_ & matrix
a reference to the matrix that is to be assembled
Jump Matrix assembly task CRTP base-class for identical test-/trial-space.
void eval(ValueType &val, const DataType &weight, bool is_pair, const SpaceBasisData &psi_1, const SpaceBasisData &psi_2, const SpaceBasisData &phi_1, const SpaceBasisData &phi_2)
Evaluates the assembly for the a test-/trial-basis function pair.
Tiny::Matrix< ValueType, max_common_dofs, max_common_dofs > local_matrix
the local matrix to be assembled
static constexpr bool need_combine
this task has no combine
Matrix_::ScatterAxpy scatter_axpy
the matrix scatter object
static constexpr bool need_scatter
this task needs to scatter
TraceAssemblyJumpTaskBase1< typename Matrix_::DataType, Space_, trafo_config_, facet_trafo_config_|TrafoTags::jac_det, space_config_ > BaseClass
our base class
Matrix_::ValueType ValueType
the value-type of the matrix
Matrix_::DataType DataType
the data-type of the matrix
BaseClass::CubatureRuleType cubature_rule
the cubature rule used for integration
TraceAssemblyJumpMatrixTaskCRTP1(Matrix_ &matrix_, const Space_ &space_, const Cubature::DynamicFactory &cubature_factory, DataType alpha_)
Constructor.
AsmTraits::TrafoEvalData TrafoEvalData
trafo evaluation data
Matrix_ & matrix
the matrix that is to be assembled
TrafoFacetEvaluator::template ConfigTraits< facet_trafo_config >::EvalDataType TrafoFacetEvalData
trafo facet evaluation data
void set_point(TrafoFacetEvalData &tau_f, bool is_pair, TrafoEvalData &tau_1, TrafoEvalData &tau_2)
Sets the current cubature point.
TraceAssemblyJumpMatrixTaskCRTP1< Task, Matrix_, Space_, TrafoTags::none, TrafoTags::jac_det, SpaceTags::grad > BaseClass
our base-class typedef
Matrix assembly job for the edge-oriented jump stabilization operator.
TraceAssemblyJumpStabilizationMatrixJob(Matrix_ &matrix_, const Space_ &space_, String cubature_, DataType gamma_=DataType(1), DataType jacdet_scale_=DataType(2), DataType jacdet_power_=DataType(2))
Constructor.
Cubature::DynamicFactory cubature_factory
the cubature factory to be used for integration
Matrix_ & matrix
a reference to the matrix that is to be assembled
const Space_ & space
a reference to the finite element space to be used as test-/trial-space
Basic assembly task base class for a single finite element space with pairwise assembly support.
TrafoEvalData trafo_data_1
the trafo evaluation data
AsmTraits::TrafoEvaluator TrafoEvaluator
trafo evaluator type
Assembly::AsmTraits1< DataType_, Space_, trafo_config_, space_config_ > AsmTraits
our assembly traits
static constexpr int facet_dim
the facet dimension; always equal to shape_dim-1
static constexpr int shape_dim
the shape dimension
Tiny::Vector< DataType, shape_dim > cur_point_1
current cubature point on reference cell
AsmTraits::DofMapping dof_mapping_1
the space dof-mapping
SpaceEvalData space_data_1
the space evaluation data
TrafoFacetEvaluator trafo_facet_eval
the trafo facet evaluator
AsmTraits::SpaceEvalData SpaceEvalData
space evaluation data
Shape::FaceTraits< ShapeType, ShapeType::dimension-1 >::ShapeType FacetType
our facet type
Tiny::Matrix< DataType, shape_dim, facet_dim > face_mat_1
local facet trafo matrices and vectors
static constexpr TrafoTags facet_trafo_config
include jacobian in facet trafo config (required for normal vector computation)
AsmTraits::BasisData null_basis_data
null-basis data
Intern::CubatureTraits< TrafoFacetEvaluator >::RuleType CubatureRuleType
cubature rule type
AsmTraits::TrafoEvalData TrafoEvalData
trafo evaluation data
int cell_facet_ori_1
the internal cell facet orientation code
TrafoFacetEvalData trafo_facet_data
the trafo facet evaluation data
Tiny::Vector< DataType, facet_dim > cur_point_facet
current cubature point on reference facet
TrafoType::template Evaluator< FacetType, DataType >::Type TrafoFacetEvaluator
trafo facet evaluator type
AsmTraits::SpaceEvaluator SpaceEvaluator
space evaluator type
TrafoFacetEvaluator::template ConfigTraits< facet_trafo_config >::EvalDataType TrafoFacetEvalData
trafo facet evaluation data
String class implementation.
Definition: string.hpp:47
Tiny Matrix class template.
CUDA_HOST_DEVICE void format(DataType alpha=DataType(0))
Formats the matrix.
Tiny Vector class template.
CUDA_HOST_DEVICE void format(DataType alpha=DataType(0))
Formats the vector.
void assemble_jump_stabilization_matrix(TraceAssembler< Trafo_ > &trace_asm, Matrix_ &matrix, const Space_ &space, const String &cubature, const typename Matrix_::DataType gamma=typename Matrix_::DataType(1), const typename Matrix_::DataType jacdet_scale=typename Matrix_::DataType(2), const typename Matrix_::DataType jacdet_power=typename Matrix_::DataType(2))
Assembles edge-oriented jump stabilization operator into a matrix.
void assemble_jump_mass_matrix(TraceAssembler< Trafo_ > &trace_asm, Matrix_ &matrix, const Space_ &space, const String &cubature, const typename Matrix_::DataType alpha=typename Matrix_::DataType(1))
Assembles mass jump operator into a matrix.
T_ pow(T_ x, T_ y)
Returns x raised to the power of y.
Definition: math.hpp:643
CUDA_HOST_DEVICE T_ dot(const T_ &a, const T_ &b)
Computes the dot-product of two scalars.
CUDA_HOST_DEVICE void add_id(T_ &x, const T_ &alpha)
Adds a scaled identity onto a scalar.
Vector< T_, m_ > orthogonal(const Matrix< T_, m_, m_-1, sm_, sn_ > &tau)
Computes the positively oriented orthogonal vector to the columns of a m_ x (m_-1) Matrix.
FEAT namespace.
Definition: adjactor.hpp:12
SpaceTags
Space configuration tags enum.
Definition: eval_tags.hpp:97
std::uint64_t Index
Index data type.
TrafoTags
Trafo configuration tags enum.
Definition: eval_tags.hpp:22
@ jac_mat
specifies whether the trafo should supply jacobian matrices
Face traits tag struct template.
Definition: shape.hpp:106
static int facet_orientation(int facet_index)
Returns the orientation of a facet.