21 #ifndef bempp_potential_operator_aca_assembly_helper_hpp
22 #define bempp_potential_operator_aca_assembly_helper_hpp
24 #include "../common/common.hpp"
26 #include "ahmed_aux_fwd.hpp"
27 #include "../common/armadillo_fwd.hpp"
28 #include "../common/shared_ptr.hpp"
29 #include "../common/types.hpp"
30 #include "../fiber/scalar_traits.hpp"
32 #include <tbb/atomic.h>
43 template <
typename ResultType>
class LocalAssemblerForPotentialOperators;
52 class EvaluationOptions;
53 class ComponentListsCache;
54 template <
typename ResultType>
class DiscreteBoundaryOperator;
55 template <
typename BasisFunctionType>
class LocalDofListsCache;
56 template <
typename BasisFunctionType>
class Space;
62 template <
typename BasisFunctionType,
typename ResultType>
69 typedef CoordinateType MagnitudeType;
70 typedef typename AhmedTypeTraits<ResultType>::Type AhmedResultType;
73 const arma::Mat<CoordinateType>& points,
75 const std::vector<unsigned int>& p2oPoints,
76 const std::vector<unsigned int>& p2oTrialDofs,
77 const std::vector<LocalAssembler*>& assemblers,
78 const std::vector<ResultType>& termMultipliers,
85 void cmpbl(
unsigned b1,
unsigned n1,
unsigned b2,
unsigned n2,
86 AhmedResultType* data,
87 const cluster* c1 = 0,
const cluster* c2 = 0,
88 bool countAccessedEntries =
true)
const;
94 void cmpblsym(
unsigned b1,
unsigned n1, AhmedResultType* data,
95 const cluster* c1 = 0,
96 bool countAccessedEntries =
true)
const;
99 MagnitudeType
scale(
unsigned b1,
unsigned n1,
unsigned b2,
unsigned n2,
100 const cluster* c1 = 0,
const cluster* c2 = 0)
const;
104 MagnitudeType
relativeScale(
unsigned b1,
unsigned n1,
unsigned b2,
unsigned n2,
105 const cluster* c1 = 0,
const cluster* c2 = 0)
const;
116 MagnitudeType estimateMinimumDistance(
117 const cluster* c1,
const cluster* c2)
const;
121 const arma::Mat<CoordinateType>& m_points;
123 const std::vector<unsigned int>& m_p2oPoints;
124 const std::vector<unsigned int>& m_p2oTrialDofs;
125 const std::vector<LocalAssembler*>& m_assemblers;
126 const std::vector<ResultType>& m_termMultipliers;
128 bool m_indexWithGlobalDofs;
130 unsigned int m_componentCount;
132 shared_ptr<ComponentListsCache> m_componentListsCache;
133 shared_ptr<LocalDofListsCache<BasisFunctionType> >
134 m_trialDofListsCache;
136 mutable tbb::atomic<size_t> m_accessedEntryCount;
Traits of scalar types.
Definition: scalar_traits.hpp:40
size_t accessedEntryCount() const
Return the number of entries in the matrix that have been accessed so far.
Definition: potential_operator_aca_assembly_helper.cpp:375
Options controlling evaluation of potentials.
Definition: evaluation_options.hpp:44
MagnitudeType scale(unsigned b1, unsigned n1, unsigned b2, unsigned n2, const cluster *c1=0, const cluster *c2=0) const
Expected size of the entries in this block.
Definition: potential_operator_aca_assembly_helper.cpp:327
Function space.
Definition: assembled_potential_operator.hpp:35
void resetAccessedEntryCount()
Reset the number of entries in the matrix that have been accessed so far.
Definition: potential_operator_aca_assembly_helper.cpp:383
Abstract interface of a local assembler for potential operators.
Definition: local_assembler_for_potential_operators.hpp:54
MagnitudeType relativeScale(unsigned b1, unsigned n1, unsigned b2, unsigned n2, const cluster *c1=0, const cluster *c2=0) const
Expected magnitude of the largest entry in this block relative to that of the largest entry in the wh...
Definition: potential_operator_aca_assembly_helper.cpp:358
Class whose methods are called by Ahmed during assembly in the ACA mode.
Definition: potential_operator_aca_assembly_helper.hpp:63
Discrete boundary operator.
Definition: assembled_potential_operator.hpp:33
void cmpblsym(unsigned b1, unsigned n1, AhmedResultType *data, const cluster *c1=0, bool countAccessedEntries=true) const
Evaluate entries of a symmetric block.
Definition: potential_operator_aca_assembly_helper.cpp:307
void cmpbl(unsigned b1, unsigned n1, unsigned b2, unsigned n2, AhmedResultType *data, const cluster *c1=0, const cluster *c2=0, bool countAccessedEntries=true) const
Evaluate entries of a general block.
Definition: potential_operator_aca_assembly_helper.cpp:127