LehrFEM++ 1.0.0
A simple Finite Element Library for teaching
loc_comp_ellbvp.h
1
9#ifndef LF_FE_LOCCOMPELLBVP
10#define LF_FE_LOCCOMPELLBVP
11/***************************************************************************
12 * LehrFEM++ - A simple C++ finite element libray for teaching
13 * Developed from 2018 at the Seminar of Applied Mathematics of ETH Zurich,
14 * lead developers Dr. R. Casagrande and Prof. R. Hiptmair
15 ***************************************************************************/
16#include <lf/mesh/utils/utils.h>
17#include <lf/quad/quad.h>
18
19#include <iostream>
20#include <map>
21
22#include "scalar_fe_space.h"
23#include "scalar_reference_finite_element.h"
24
25namespace lf::fe {
58template <typename SCALAR, typename DIFF_COEFF>
60 static_assert(mesh::utils::isMeshFunction<DIFF_COEFF>);
61
62 public:
66 using Scalar =
68 Eigen::Matrix<SCALAR, Eigen::Dynamic, 1>())::Scalar;
69 using ElemMat = Eigen::Matrix<Scalar, Eigen::Dynamic, Eigen::Dynamic>;
70
74 delete;
76 default;
78 const DiffusionElementMatrixProvider &) = delete;
80 delete;
97 std::shared_ptr<const ScalarFESpace<SCALAR>> fe_space, DIFF_COEFF alpha);
98
102 bool isActive(const lf::mesh::Entity & /*cell*/) const { return true; }
119 ElemMat Eval(const lf::mesh::Entity &cell) const;
120
123
124 private:
128 DIFF_COEFF alpha_;
132 std::shared_ptr<const ScalarFESpace<SCALAR>> fe_space_;
133
135};
136
140extern std::shared_ptr<spdlog::logger> diffusion_element_matrix_provider_logger;
141
142template <class PTR, class DIFF_COEFF>
143DiffusionElementMatrixProvider(PTR fe_space, DIFF_COEFF alpha)
144 -> DiffusionElementMatrixProvider<typename PTR::element_type::Scalar,
145 DIFF_COEFF>;
146
147// First constructor (internal construction of quadrature rules
148template <typename SCALAR, typename DIFF_COEFF>
151 std::shared_ptr<const ScalarFESpace<SCALAR>> fe_space, DIFF_COEFF alpha)
152 : alpha_(std::move(alpha)), fe_space_(std::move(fe_space)) {}
153
154// TODO(craffael) remove const once
155// https://developercommunity.visualstudio.com/content/problem/180948/vs2017-155-c-cv-qualifiers-lost-on-type-alias-used.html
156// is resolved
157template <typename SCALAR, typename DIFF_COEFF>
160 const lf::mesh::Entity &cell) const {
161 // Query the shape of the cell
162 const lf::geometry::Geometry *geo_ptr = cell.Geometry();
163 LF_ASSERT_MSG(geo_ptr != nullptr, "Invalid geometry!");
164 LF_ASSERT_MSG((geo_ptr->DimLocal() == 2),
165 "Only 2D implementation available!");
167 "{}, shape = \n{}", cell.RefEl(),
168 geo_ptr->Global(cell.RefEl().NodeCoords()));
169 // Physical dimension of the cell
170 const dim_t world_dim = geo_ptr->DimGlobal();
171
172 // Get a quadrature rule of sufficiently high degree on the element
173 const auto sfl = fe_space_->ShapeFunctionLayout(cell);
174 const lf::quad::QuadRule qr = qr_cache_.Get(cell.RefEl(), 2 * sfl->Degree());
175
176 const Eigen::VectorXd determinants(geo_ptr->IntegrationElement(qr.Points()));
177 LF_ASSERT_MSG(
178 determinants.size() == qr.NumPoints(),
179 "Mismatch " << determinants.size() << " <-> " << qr.NumPoints());
180 // Fetch the transformation matrices for the gradients
181 const Eigen::MatrixXd JinvT(geo_ptr->JacobianInverseGramian(qr.Points()));
182 LF_ASSERT_MSG(JinvT.cols() == 2 * qr.NumPoints(),
183 "Mismatch " << JinvT.cols() << " <-> " << 2 * qr.NumPoints());
184 LF_ASSERT_MSG(JinvT.rows() == world_dim,
185 "Mismatch " << JinvT.rows() << " <-> " << world_dim);
186 // Fetch values of diffusion coefficient alpha at quadrature points:
187 auto alphaval = alpha_(cell, qr.Points());
188 // The requested element matrix is square, size = number of local shape
189 // functions
190 ElemMat mat(sfl->NumRefShapeFunctions(), sfl->NumRefShapeFunctions());
191 mat.setZero();
192 // Compute the gradients of the reference shape functions in the quadrature
193 // points
194 const auto grsf = sfl->GradientsReferenceShapeFunctions(qr.Points());
195 // Quadrature formula: loop over quadrature points
196 for (base::size_type k = 0; k < qr.NumPoints(); ++k) {
197 const double w = qr.Weights()[k] * determinants[k];
198 // Transformed gradient in current quadrature node
199 const auto trf_grad(JinvT.block(0, 2 * k, world_dim, 2) *
200 grsf.block(0, 2 * k, mat.rows(), 2).transpose());
201 // Transformed gradients multiplied with coefficient
202 mat += w * trf_grad.adjoint() * (alphaval[k] * trf_grad);
203 }
204 return mat;
205}
206
237template <typename SCALAR, typename REACTION_COEFF>
239 static_assert(mesh::utils::isMeshFunction<REACTION_COEFF>);
240
241 public:
245 using Scalar =
247 Eigen::Matrix<SCALAR, Eigen::Dynamic, 1>())::Scalar;
248 using ElemMat = Eigen::Matrix<Scalar, Eigen::Dynamic, Eigen::Dynamic>;
249
255 delete;
272 std::shared_ptr<const ScalarFESpace<SCALAR>> fe_space,
273 REACTION_COEFF gamma);
274
279 bool isActive(const lf::mesh::Entity & /*cell*/) const { return true; }
296 ElemMat Eval(const lf::mesh::Entity &cell) const;
297
300
301 private:
305 REACTION_COEFF gamma_;
309 std::shared_ptr<const ScalarFESpace<SCALAR>> fe_space_;
310
312};
313
317extern std::shared_ptr<spdlog::logger> mass_element_matrix_provider_logger;
318
319template <class PTR, class REACTION_COEFF>
320MassElementMatrixProvider(PTR fe_space, REACTION_COEFF gamma)
321 -> MassElementMatrixProvider<typename PTR::element_type::Scalar,
322 REACTION_COEFF>;
323
324// First constructor
325template <typename SCALAR, typename REACTION_COEFF>
327 std::shared_ptr<const ScalarFESpace<SCALAR>> fe_space, REACTION_COEFF gamma)
328 : gamma_(std::move(gamma)), fe_space_(std::move(fe_space)) {}
329
330// TODO(craffael) remove const once
331// https://developercommunity.visualstudio.com/content/problem/180948/vs2017-155-c-cv-qualifiers-lost-on-type-alias-used.html
332// is resolved
333template <typename SCALAR, typename REACTION_COEFF>
336 const lf::mesh::Entity &cell) const {
337 // Query the shape of the cell
338 const lf::geometry::Geometry *geo_ptr = cell.Geometry();
339 LF_ASSERT_MSG(geo_ptr != nullptr, "Invalid geometry!");
340 LF_ASSERT_MSG((geo_ptr->DimLocal() == 2),
341 "Only 2D implementation available!");
342 SPDLOG_LOGGER_TRACE(mass_element_matrix_provider_logger, "{}, shape = \n{}",
343 cell.RefEl(), geo_ptr->Global(cell.RefEl().NodeCoords()));
344 // Physical dimension of the cell
345 const dim_t world_dim = geo_ptr->DimGlobal();
346
347 // Get a quadrature rule of sufficiently high degree on the element
348 const auto sfl = fe_space_->ShapeFunctionLayout(cell);
349 const lf::quad::QuadRule qr = qr_cache_.Get(cell.RefEl(), 2 * sfl->Degree());
350 // Metric factors in quadrature nodes
351 const Eigen::VectorXd determinants(geo_ptr->IntegrationElement(qr.Points()));
352 LF_ASSERT_MSG(
353 determinants.size() == qr.NumPoints(),
354 "Mismatch " << determinants.size() << " <-> " << qr.NumPoints());
355 // Fetch values of reaction coefficient gamma at quadrature points:
356 auto gammaval = gamma_(cell, qr.Points());
357 // Alocated element matrix
358 ElemMat mat(sfl->NumRefShapeFunctions(), sfl->NumRefShapeFunctions());
359 mat.setZero();
360 // Compute the reference shape functions in the quadrature points
361 const auto rsf = sfl->EvalReferenceShapeFunctions(qr.Points());
362 // Loop over quadrature points to evaluate quadrature formula
363 for (base::size_type k = 0; k < qr.NumPoints(); ++k) {
364 const double w = qr.Weights()[k] * determinants[k];
365 mat += w * ((gammaval[k] * rsf.col(k)) * (rsf.col(k).adjoint()));
366 }
367 return mat;
368}
369
391template <typename SCALAR, typename COEFF, typename EDGESELECTOR>
393 public:
394 using scalar_t =
395 decltype(SCALAR(0) * mesh::utils::MeshFunctionReturnType<COEFF>(0));
396 using ElemMat = Eigen::Matrix<scalar_t, Eigen::Dynamic, Eigen::Dynamic>;
397
402 MassEdgeMatrixProvider &operator=(const MassEdgeMatrixProvider &) = delete;
417 MassEdgeMatrixProvider(std::shared_ptr<const ScalarFESpace<SCALAR>> fe_space,
418 COEFF gamma,
419 EDGESELECTOR edge_selector = base::PredicateTrue{})
420 : gamma_(std::move(gamma)),
421 edge_sel_(std::move(edge_selector)),
422 fe_space_(fe_space) {}
423
430 bool isActive(const lf::mesh::Entity &edge) const {
431 LF_ASSERT_MSG(edge.RefEl() == lf::base::RefEl::kSegment(),
432 "Wrong type for an edge");
433 return edge_sel_(edge);
434 }
435
451 ElemMat Eval(const lf::mesh::Entity &edge) const;
452
454
455 private:
456 COEFF gamma_; // functor for coefficient
457 EDGESELECTOR edge_sel_; // Defines the active edges
458 // FE Space
459 std::shared_ptr<const ScalarFESpace<SCALAR>> fe_space_;
460
462};
463
467extern std::shared_ptr<spdlog::logger> mass_edge_matrix_provider_logger;
468
469// deduction guide:
470template <class PTR, class COEFF, class EDGESELECTOR = base::PredicateTrue>
471MassEdgeMatrixProvider(PTR, COEFF coeff,
472 EDGESELECTOR edge_predicate = base::PredicateTrue{})
473 -> MassEdgeMatrixProvider<typename PTR::element_type::Scalar, COEFF,
474 EDGESELECTOR>;
475
476// Eval() method
477// TODO(craffael) remove const once
478// https://
479// developercommunity.visualstudio.com/content/problem/180948/vs2017-155-c-cv-qualifiers-lost-on-type-alias-used.html
480// is resolved
481template <class SCALAR, class COEFF, class EDGESELECTOR>
484 const lf::mesh::Entity &edge) const {
485 const lf::geometry::Geometry *geo_ptr = edge.Geometry();
486 // Get the shape function layout on the edge
487 const auto sfl = fe_space_->ShapeFunctionLayout(edge);
488 // Compute a quadrature rule on the given entity
489 const lf::quad::QuadRule qr = qr_cache_.Get(edge.RefEl(), 2 * sfl->Degree());
490 // Obtain the metric factors for the quadrature points
491 const Eigen::VectorXd determinants(geo_ptr->IntegrationElement(qr.Points()));
492 LF_ASSERT_MSG(
493 determinants.size() == qr.NumPoints(),
494 "Mismatch " << determinants.size() << " <-> " << qr.NumPoints());
495
496 // Element matrix
497 ElemMat mat(sfl->NumRefShapeFunctions(), sfl->NumRefShapeFunctions());
498 mat.setZero();
499
500 auto gammaval = gamma_(edge, qr.Points());
501
502 // Compute the reference shape functions
503 const auto rsf = sfl->EvalReferenceShapeFunctions(qr.Points());
504 // Loop over quadrature points
505 for (long k = 0; k < determinants.size(); ++k) {
506 // Build local matrix by summing rank-1 contributions
507 // from quadrature points.
508 const auto w = (qr.Weights()[k] * determinants[k]) * gammaval[k];
509 mat += ((rsf.col(k)) * (rsf.col(k).adjoint())) * w;
510 }
511 return mat;
512}
513
539template <typename SCALAR, typename MESH_FUNCTION>
541 static_assert(mesh::utils::isMeshFunction<MESH_FUNCTION>);
542
543 public:
544 using scalar_t = decltype(
546 using ElemVec = Eigen::Matrix<scalar_t, Eigen::Dynamic, 1>;
547
551 delete;
553 default;
555 const ScalarLoadElementVectorProvider &) = delete;
569 std::shared_ptr<const ScalarFESpace<SCALAR>> fe_space, MESH_FUNCTION f);
571 bool isActive(const lf::mesh::Entity & /*cell*/) const { return true; }
572 /*
573 * @brief Main method for computing the element vector
574 *
575 * @param cell current cell for which the element vector is desired
576 * @return local load vector as column vector
577 *
578 */
579 ElemVec Eval(const lf::mesh::Entity &cell) const;
580
582
583 private:
585 MESH_FUNCTION f_;
586
587 std::shared_ptr<const ScalarFESpace<SCALAR>> fe_space_;
588
590};
591
595extern std::shared_ptr<spdlog::logger>
597
598// Deduction guide
599template <class PTR, class MESH_FUNCTION>
600ScalarLoadElementVectorProvider(PTR fe_space, MESH_FUNCTION mf)
601 -> ScalarLoadElementVectorProvider<typename PTR::element_type::Scalar,
602 MESH_FUNCTION>;
603
604// Constructors
605template <typename SCALAR, typename MESH_FUNCTION>
608 std::shared_ptr<const ScalarFESpace<SCALAR>> fe_space, MESH_FUNCTION f)
609 : f_(std::move(f)), fe_space_(std::move(fe_space)) {}
610
611// TODO(craffael) remove const once
612// http://developercommunity.visualstudio.com/content/problem/180948/vs2017-155-c-cv-qualifiers-lost-on-type-alias-used.html
613// is resolved
614template <typename SCALAR, typename MESH_FUNCTION>
617 const lf::mesh::Entity &cell) const {
618 // Type for source function
620
621 // Get the shape function layout for the given cell
622 const auto sfl = fe_space_->ShapeFunctionLayout(cell);
623
624 // Initialize a quadrature rule of sufficiently high degree
625 const lf::quad::QuadRule qr = qr_cache_.Get(cell.RefEl(), 2 * sfl->Degree());
626
627 // Query the shape of the cell
628 const lf::geometry::Geometry *geo_ptr = cell.Geometry();
629 LF_ASSERT_MSG(geo_ptr != nullptr, "Invalid geometry!");
630 LF_ASSERT_MSG((geo_ptr->DimLocal() == 2),
631 "Only 2D implementation available!");
633 "{}, shape = \n{}", cell.RefEl(),
634 geo_ptr->Global(cell.RefEl().NodeCoords()));
635
636 // Obtain the metric factors for the quadrature points
637 const Eigen::VectorXd determinants(geo_ptr->IntegrationElement(qr.Points()));
638 LF_ASSERT_MSG(
639 determinants.size() == qr.NumPoints(),
640 "Mismatch " << determinants.size() << " <-> " << qr.NumPoints());
642 "LOCVEC({}): Metric factors :\n{}", cell.RefEl(),
643 determinants.transpose());
644 // Element vector
645 ElemVec vec(sfl->NumRefShapeFunctions());
646 vec.setZero();
647
648 auto fval = f_(cell, qr.Points());
649
650 // Compute the reference shape functions
651 const auto rsf = sfl->EvalReferenceShapeFunctions(qr.Points());
652
653 // Loop over quadrature points
654 for (long k = 0; k < determinants.size(); ++k) {
656 "LOCVEC: [{}] -> [weight = {}]",
657 qr.Points().transpose(), qr.Weights()[k]);
658 // Contribution of current quadrature point
659 vec +=
660 (qr.Weights()[k] * determinants[k] * fval[k]) * rsf.col(k).conjugate();
661 }
662
664 "LOCVEC = \n{}", vec.transpose());
665 return vec;
666}
667
700template <class SCALAR, class FUNCTOR, class EDGESELECTOR = base::PredicateTrue>
702 public:
703 static_assert(mesh::utils::isMeshFunction<FUNCTOR>,
704 "FUNCTOR does not fulfill the concept of a mesh function.");
705 using Scalar =
706 decltype(SCALAR(0) * mesh::utils::MeshFunctionReturnType<FUNCTOR>(0));
707 using ElemVec = Eigen::Matrix<Scalar, Eigen::Dynamic, 1>;
708
713 default;
715 const ScalarLoadEdgeVectorProvider &) = delete;
717 delete;
731 std::shared_ptr<const ScalarFESpace<SCALAR>> fe_space, FUNCTOR g,
732 EDGESELECTOR edge_sel = base::PredicateTrue{})
733 : g_(std::move(g)), edge_sel_(std::move(edge_sel)), fe_space_(fe_space) {}
734
736 bool isActive(const lf::mesh::Entity &cell) const { return edge_sel_(cell); }
737 /*
738 * @brief Main method for computing the element vector
739 *
740 * @param cell current cell for which the element vector is desired
741 * @return local load vector as column vector
742 *
743 */
744 ElemVec Eval(const lf::mesh::Entity &edge) const;
745
747
748 private:
749 FUNCTOR g_; // source function
750 EDGESELECTOR edge_sel_; // selects edges
751 std::shared_ptr<const ScalarFESpace<SCALAR>> fe_space_;
752
754};
755
759extern std::shared_ptr<spdlog::logger> scalar_load_edge_vector_provider_logger;
760
761// deduction guide
762template <class PTR, class FUNCTOR, class EDGESELECTOR = base::PredicateTrue>
764 -> ScalarLoadEdgeVectorProvider<typename PTR::element_type::Scalar, FUNCTOR,
765 EDGESELECTOR>;
766
767// Eval() method
768// TODO(craffael) remove const once
769// https://developercommunity.visualstudio.com/content/problem/180948/vs2017-155-c-cv-qualifiers-lost-on-type-alias-used.html
770// is resolved
771template <class SCALAR, class FUNCTOR, class EDGESELECTOR>
774 const lf::mesh::Entity &edge) const {
775 // Query the shape of the edge
776 const lf::geometry::Geometry *geo_ptr = edge.Geometry();
777 LF_ASSERT_MSG(geo_ptr != nullptr, "Invalid geometry!");
778 LF_ASSERT_MSG(geo_ptr->DimLocal() == 1, "The passed entity is not an edge!");
779
780 // Get the shape function layout of the given edge
781 const auto sfl = fe_space_->ShapeFunctionLayout(edge);
782
783 // Quadrature points on physical edge
784 const lf::quad::QuadRule qr = qr_cache_.Get(edge.RefEl(), 2 * sfl->Degree());
785
786 // Obtain the metric factors for the quadrature points
787 const Eigen::VectorXd determinants(geo_ptr->IntegrationElement(qr.Points()));
788 LF_ASSERT_MSG(
789 determinants.size() == qr.NumPoints(),
790 "Mismatch " << determinants.size() << " <-> " << qr.NumPoints());
791
792 // Element vector
793 ElemVec vec(sfl->NumRefShapeFunctions());
794 vec.setZero();
795
796 auto g_vals = g_(edge, qr.Points());
797
798 // Compute the reference shape functions
799 const auto rsf = sfl->EvalReferenceShapeFunctions(qr.Points());
800
801 // Loop over quadrature points
802 for (base::size_type k = 0; k < qr.NumPoints(); ++k) {
803 // Add contribution of quadrature point to local vector
804 const auto w = (qr.Weights()[k] * determinants[k]) * g_vals[k];
805 vec += rsf.col(k).conjugate() * w;
806 }
807 return vec;
808}
809
810} // namespace lf::fe
811
812#endif
A Function Object that can be invoked with any arguments and that always returns the value true.
static constexpr RefEl kSegment()
Returns the (1-dimensional) reference segment.
Definition: ref_el.h:150
const Eigen::MatrixXd & NodeCoords() const
Get the coordinates of the nodes of this reference element.
Definition: ref_el.h:238
Class for computing element matrices for general scalar-valued finite elements and homogeneous 2nd-or...
Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > ElemMat
DiffusionElementMatrixProvider(DiffusionElementMatrixProvider &&) noexcept=default
ElemMat Eval(const lf::mesh::Entity &cell) const
main routine for the computation of element matrices
DiffusionElementMatrixProvider(const DiffusionElementMatrixProvider &)=delete
standard constructors
std::shared_ptr< const ScalarFESpace< SCALAR > > fe_space_
bool isActive(const lf::mesh::Entity &) const
All cells are considered active.
typename decltype(mesh::utils::MeshFunctionReturnType< DIFF_COEFF >() *Eigen::Matrix< SCALAR, Eigen::Dynamic, 1 >())::Scalar Scalar
type of returned element matrix
Quadrature-based computation of local mass matrix for an edge.
MassEdgeMatrixProvider(MassEdgeMatrixProvider &&) noexcept=default
bool isActive(const lf::mesh::Entity &edge) const
If true, then an edge is taken into account during assembly.
ElemMat Eval(const lf::mesh::Entity &edge) const
actual computation of edge mass matrix
decltype(SCALAR(0) *mesh::utils::MeshFunctionReturnType< COEFF >(0)) scalar_t
Eigen::Matrix< scalar_t, Eigen::Dynamic, Eigen::Dynamic > ElemMat
MassEdgeMatrixProvider(const MassEdgeMatrixProvider &)=delete
std::shared_ptr< const ScalarFESpace< SCALAR > > fe_space_
Class for local quadrature based computation of element matrix for Lagrangian finite elements and a w...
MassElementMatrixProvider(const MassElementMatrixProvider &)=delete
standard constructors
typename decltype(mesh::utils::MeshFunctionReturnType< REACTION_COEFF >() *Eigen::Matrix< SCALAR, Eigen::Dynamic, 1 >())::Scalar Scalar
type of returned element matrix
std::shared_ptr< const ScalarFESpace< SCALAR > > fe_space_
ElemMat Eval(const lf::mesh::Entity &cell) const
main routine for the computation of element matrices
MassElementMatrixProvider(MassElementMatrixProvider &&) noexcept=default
bool isActive(const lf::mesh::Entity &) const
All cells are considered active.
Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > ElemMat
Space of scalar valued finite element functions on a hybrid 2D mesh
Local edge contributions to element vector.
ElemVec Eval(const lf::mesh::Entity &edge) const
std::shared_ptr< const ScalarFESpace< SCALAR > > fe_space_
ScalarLoadEdgeVectorProvider(ScalarLoadEdgeVectorProvider &&) noexcept=default
Eigen::Matrix< Scalar, Eigen::Dynamic, 1 > ElemVec
decltype(SCALAR(0) *mesh::utils::MeshFunctionReturnType< FUNCTOR >(0)) Scalar
ScalarLoadEdgeVectorProvider(const ScalarLoadEdgeVectorProvider &)=delete
bool isActive(const lf::mesh::Entity &cell) const
all edges are active
Local computation of general element (load) vector for scalar finite elements; volume contributions o...
bool isActive(const lf::mesh::Entity &) const
all cells are active
ElemVec Eval(const lf::mesh::Entity &cell) const
decltype(SCALAR(0) *mesh::utils::MeshFunctionReturnType< MESH_FUNCTION >(0)) scalar_t
MESH_FUNCTION f_
An object providing the source function.
ScalarLoadElementVectorProvider(const ScalarLoadElementVectorProvider &)=delete
ScalarLoadElementVectorProvider(ScalarLoadElementVectorProvider &&) noexcept=default
std::shared_ptr< const ScalarFESpace< SCALAR > > fe_space_
Eigen::Matrix< scalar_t, Eigen::Dynamic, 1 > ElemVec
Interface class for shape information on a mesh cell in the spirit of parametric finite element metho...
virtual Eigen::MatrixXd Global(const Eigen::MatrixXd &local) const =0
Map a number of points in local coordinates into the global coordinate system.
virtual dim_t DimLocal() const =0
Dimension of the domain of this mapping.
virtual dim_t DimGlobal() const =0
Dimension of the image of this mapping.
virtual Eigen::MatrixXd JacobianInverseGramian(const Eigen::MatrixXd &local) const =0
Evaluate the Jacobian * Inverse Gramian ( ) simultaneously at numPoints.
virtual Eigen::VectorXd IntegrationElement(const Eigen::MatrixXd &local) const =0
The integration element (factor appearing in integral transformation formula, see below) at number of...
Interface class representing a topological entity in a cellular complex
Definition: entity.h:39
virtual const geometry::Geometry * Geometry() const =0
Describes the geometry of this entity.
virtual base::RefEl RefEl() const =0
Describes the reference element type of this entity.
A cache for make_QuadRule()
Represents a Quadrature Rule over one of the Reference Elements.
Definition: quad_rule.h:58
const Eigen::VectorXd & Weights() const
All quadrature weights as a vector.
Definition: quad_rule.h:152
const Eigen::MatrixXd & Points() const
All quadrature points as column vectors.
Definition: quad_rule.h:145
base::size_type NumPoints() const
Return the total number of quadrature points (num of columns of points/weights)
Definition: quad_rule.h:158
unsigned int size_type
general type for variables related to size of arrays
Definition: base.h:24
Collects data structures and algorithms designed for scalar finite element methods primarily meant fo...
Definition: fe.h:47
std::shared_ptr< spdlog::logger > mass_element_matrix_provider_logger
logger for MassElementMatrixProvider
ScalarLoadElementVectorProvider(PTR fe_space, MESH_FUNCTION mf) -> ScalarLoadElementVectorProvider< typename PTR::element_type::Scalar, MESH_FUNCTION >
ScalarLoadEdgeVectorProvider(PTR, FUNCTOR, EDGESELECTOR=base::PredicateTrue{}) -> ScalarLoadEdgeVectorProvider< typename PTR::element_type::Scalar, FUNCTOR, EDGESELECTOR >
lf::assemble::dim_t dim_t
Definition: fe.h:56
std::shared_ptr< spdlog::logger > diffusion_element_matrix_provider_logger
logger for DiffusionElementMatrixProvider
MassEdgeMatrixProvider(PTR, COEFF coeff, EDGESELECTOR edge_predicate=base::PredicateTrue{}) -> MassEdgeMatrixProvider< typename PTR::element_type::Scalar, COEFF, EDGESELECTOR >
MassElementMatrixProvider(PTR fe_space, REACTION_COEFF gamma) -> MassElementMatrixProvider< typename PTR::element_type::Scalar, REACTION_COEFF >
std::shared_ptr< spdlog::logger > mass_edge_matrix_provider_logger
logger for MassEdgeMatrixProvider
DiffusionElementMatrixProvider(PTR fe_space, DIFF_COEFF alpha) -> DiffusionElementMatrixProvider< typename PTR::element_type::Scalar, DIFF_COEFF >
std::shared_ptr< spdlog::logger > scalar_load_edge_vector_provider_logger
logger for ScalarLoadEdgeVectorProvider class template.
std::shared_ptr< spdlog::logger > scalar_load_element_vector_provider_logger
logger used by ScalarLoadElementVectorProvider
internal::VectorElement_t< internal::MeshFunctionReturnType_t< R > > MeshFunctionReturnType
Determine the type of objects returned by a MeshFunction.
Definition: assemble.h:30