8#include <kernel/assembly/domain_assembler.hpp> 
    9#include <kernel/assembly/function_integral_info.hpp> 
   10#include <kernel/analytic/function.hpp> 
   11#include <kernel/lafem/dense_vector.hpp> 
   12#include <kernel/lafem/dense_vector_blocked.hpp> 
   43    template<
typename Derived_, 
typename Vector_, 
typename Space_,
 
  176        const int num_loc_dofs = 
space_eval.get_num_local_dofs();
 
  188          static_cast<Derived_&
>(*this).set_point(
trafo_data);
 
  191          for(
int i(0); i < num_loc_dofs; ++i)
 
  258    template<
typename Derived_, 
typename Matrix_, 
typename Space_,
 
  365        const typename AsmTraits::TrialBasisData& phi, 
const typename AsmTraits::TestBasisData& psi);
 
  395        const int num_loc_dofs = 
space_eval.get_num_local_dofs();
 
  407          static_cast<Derived_&
>(*this).set_point(
trafo_data);
 
  410          for(
int i(0); i < num_loc_dofs; ++i)
 
  413            for(
int j(0); j < num_loc_dofs; ++j)
 
  493      typename TrialSpace_,
 
  533      typename AsmTraits::TrialEvaluator trial_eval;
 
  536      typename AsmTraits::TrialDofMapping trial_dof_mapping;
 
  543      typename AsmTraits::TrialEvalData trial_data;
 
  571        const TestSpace_& test_space_, 
const TrialSpace_& trial_space_,
 
  629        trial_dof_mapping.prepare(cell);
 
  648        const int num_loc_test_dofs = 
test_eval.get_num_local_dofs();
 
  649        const int num_loc_trial_dofs = trial_eval.get_num_local_dofs();
 
  662          static_cast<Derived_&
>(*this).set_point(
trafo_data);
 
  665          for(
int i(0); i < num_loc_test_dofs; ++i)
 
  668            for(
int j(0); j < num_loc_trial_dofs; ++j)
 
  702        trial_dof_mapping.finish();
 
  732    template<
typename LinearFunctional_, 
typename Vector_, 
typename Space_>
 
  736      typedef typename Vector_::DataType DataType;
 
  737      typedef typename Vector_::ValueType ValueType;
 
  739      static constexpr TrafoTags trafo_config = LinearFunctional_::trafo_config;
 
  740      static constexpr SpaceTags test_config = LinearFunctional_::test_config;
 
  753        typename LinearFunctional_::template Evaluator<AsmTraits> 
func_eval;
 
  762        void prepare(
Index cell)
 
  773        void eval(
ValueType& val, 
const DataType& weight, 
typename AsmTraits::TestBasisData& psi)
 
  817        Vector_& vector_, 
const Space_& space_, 
const String& cubature_, DataType alpha_ = DataType(1)) :
 
  848    template<
typename Trafo_, 
typename Vector_, 
typename LinFunc_, 
typename Space_>
 
  850      Vector_& vector, 
const LinFunc_& linear_functional, 
const Space_& space,
 
  851      const String& cubature, 
const typename Vector_::DataType alpha = 
typename Vector_::DataType(1))
 
  853      XASSERTM(dom_asm.
get_trafo() == space.get_trafo(), 
"domain assembler and space have different trafos");
 
  854      XASSERTM(vector.size() == space.get_num_dofs(), 
"invalid vector length");
 
  857        linear_functional, vector, space, cubature, alpha);
 
  881    template<
typename Function_, 
typename Vector_, 
typename Space_>
 
  885      typedef typename Vector_::DataType DataType;
 
  886      typedef typename Vector_::ValueType ValueType;
 
  904        typename Function_::template Evaluator<AnalyticEvalTraits> 
func_eval;
 
  920        void eval(
ValueType& val, 
const DataType& weight, 
typename AsmTraits::TestBasisData& psi)
 
  958        Vector_& vector_, 
const Space_& space_, 
const String& cubature_, DataType alpha_ = DataType(1)) :
 
  989    template<
typename Trafo_, 
typename Vector_, 
typename Function_, 
typename Space_>
 
  991      Vector_& vector, 
const Function_& function, 
const Space_& space,
 
  992      const String& cubature, 
const typename Vector_::DataType alpha = 
typename Vector_::DataType(1))
 
  994      XASSERTM(dom_asm.
get_trafo() == space.get_trafo(), 
"domain assembler and space have different trafos");
 
  995      XASSERTM(vector.size() == space.get_num_dofs(), 
"invalid vector length");
 
  998        function, vector, space, cubature, alpha);
 
 1019    template<
typename BilinearOperator_, 
typename Matrix_, 
typename Space_>
 
 1023      typedef typename Matrix_::DataType DataType;
 
 1024      typedef typename Matrix_::ValueType ValueType;
 
 1026      static constexpr TrafoTags trafo_config = BilinearOperator_::trafo_config;
 
 1027      static constexpr SpaceTags space_config = BilinearOperator_::test_config | BilinearOperator_::trial_config;
 
 1040        typename BilinearOperator_::template Evaluator<AsmTraits> 
oper_eval;
 
 1049        void prepare(
Index cell)
 
 1061          typename AsmTraits::TrialBasisData& phi, 
typename AsmTraits::TestBasisData& psi)
 
 1063          val += weight * 
oper_eval.eval(phi, psi);
 
 1105        Matrix_& matrix_, 
const Space_& space_, 
const String& cubature_, DataType alpha_ = DataType(1)) :
 
 1136    template<
typename Trafo_, 
typename Matrix_, 
typename BilOp_, 
typename Space_>
 
 1138      const BilOp_& bilinear_operator, 
const Space_& space, 
const String& cubature,
 
 1139      const typename Matrix_::DataType alpha = 
typename Matrix_::DataType(1))
 
 1141      XASSERTM(dom_asm.
get_trafo() == space.get_trafo(), 
"domain assembler and space have different trafos");
 
 1142      XASSERTM(matrix.columns() == space.get_num_dofs(), 
"invalid matrix column count");
 
 1143      XASSERTM(matrix.rows() == space.get_num_dofs(), 
"invalid matrix row count");
 
 1146        bilinear_operator, matrix, space, cubature, alpha);
 
 1170    template<
typename BilinearOperator_, 
typename Matrix_, 
typename TestSpace_, 
typename TrialSpace_>
 
 1174      typedef typename Matrix_::DataType DataType;
 
 1175      typedef typename Matrix_::ValueType ValueType;
 
 1177      static constexpr TrafoTags trafo_config = BilinearOperator_::trafo_config;
 
 1178      static constexpr SpaceTags test_config  = BilinearOperator_::test_config;
 
 1179      static constexpr SpaceTags trial_config = BilinearOperator_::trial_config;
 
 1192        typename BilinearOperator_::template Evaluator<AsmTraits> 
oper_eval;
 
 1201        void prepare(
Index cell)
 
 1262        Matrix_& matrix_, 
const TestSpace_& test_space_, 
const TrialSpace_& trial_space_,
 
 1263        const String& cubature_, DataType alpha_ = DataType(1)) :
 
 1298    template<
typename Trafo_, 
typename Matrix_, 
typename BilOp_, 
typename TestSpace_, 
typename TrialSpace_>
 
 1300      Matrix_& matrix, 
const BilOp_& bilinear_operator, 
const TestSpace_& test_space,
 
 1301      const TrialSpace_& trial_space, 
const String& cubature,
 
 1302      const typename Matrix_::DataType alpha = 
typename Matrix_::DataType(1))
 
 1304      XASSERTM(dom_asm.
get_trafo() == test_space.get_trafo(), 
"domain assembler and test space have different trafos");
 
 1305      XASSERTM(dom_asm.
get_trafo() == trial_space.get_trafo(), 
"domain assembler and trial space have different trafos");
 
 1306      XASSERTM(matrix.columns() == trial_space.get_num_dofs(), 
"invalid matrix column count");
 
 1307      XASSERTM(matrix.rows() == test_space.get_num_dofs(), 
"invalid matrix row count");
 
 1310        bilinear_operator, matrix, test_space, trial_space, cubature, alpha);
 
 1338    template<
typename BilinearOperator_, 
typename Vector_, 
typename VectorSol_, 
typename Space_>
 
 1342      typedef typename Vector_::DataType DataType;
 
 1343      typedef typename Vector_::ValueType ValueType;
 
 1345      static constexpr TrafoTags trafo_config = BilinearOperator_::trafo_config;
 
 1346      static constexpr SpaceTags space_config = BilinearOperator_::test_config | BilinearOperator_::trial_config;
 
 1357        typedef typename BilinearOperator_::template Evaluator<AsmTraits>::ValueType MatValType;
 
 1360        typename BilinearOperator_::template Evaluator<AsmTraits> 
oper_eval;
 
 1370        typename AsmTraits::template TLocalVector<ValueType> local_vec_sol;
 
 1382        void prepare(
Index cell)
 
 1386          local_vec_sol.format();
 
 1395        void eval(MatValType& val, 
const DataType& weight,
 
 1396          typename AsmTraits::TrialBasisData& phi, 
typename AsmTraits::TestBasisData& psi)
 
 1398          val += weight * 
oper_eval.eval(phi, psi);
 
 1411          const int num_loc_dofs = this->
space_eval.get_num_local_dofs();
 
 1414          for(
int k(0); k < this->
cubature_rule.get_num_points(); ++k)
 
 1426            for(
int i(0); i < num_loc_dofs; ++i)
 
 1429              for(
int j(0); j < num_loc_dofs; ++j)
 
 1433                  this->
trafo_data.jac_det * this->cubature_rule.get_weight(k),
 
 1434                  this->space_data.phi[j], this->space_data.phi[i]);
 
 1442          for(
int i(0); i < num_loc_dofs; ++i)
 
 1443            for(
int j(0); j < num_loc_dofs; ++j)
 
 1488        Vector_& vector_, 
const VectorSol_& vec_sol_, 
const Space_& space_, 
const String& cubature_, DataType alpha_ = DataType(1)) :
 
 1523    template<
typename Trafo_, 
typename Vector_, 
typename VectorSol_, 
typename BilOp_, 
typename Space_>
 
 1525      const VectorSol_& vec_sol, 
const BilOp_& bilinear_operator, 
const Space_& space, 
const String& cubature,
 
 1526      const typename Vector_::DataType alpha = 
typename Vector_::DataType(1))
 
 1528      XASSERTM(dom_asm.
get_trafo() == space.get_trafo(), 
"domain assembler and space have different trafos");
 
 1529      XASSERTM(vector.size() == space.get_num_dofs(), 
"invalid vector size");
 
 1532        bilinear_operator, vector, vec_sol, space, cubature, alpha);
 
 1553    template<
typename DataType_, 
typename Function_, 
typename Trafo_, 
int max_der_>
 
 1557      static_assert(Function_::can_value, 
"function cannot compute values");
 
 1558      static_assert(Function_::can_grad || (max_der_ < 1), 
"function gradients are required but not available");
 
 1559      static_assert(Function_::can_hess || (max_der_ < 2), 
"function hessians are required but not available");
 
 1585        typedef typename Trafo_::template Evaluator<typename Trafo_::ShapeType, DataType>::Type 
TrafoEvaluator;
 
 1589        typename TrafoEvaluator::template ConfigTraits<trafo_config>::EvalDataType 
trafo_data;
 
 1591        typename Assembly::Intern::CubatureTraits<TrafoEvaluator>::RuleType 
cubature_rule;
 
 1593        typename Function_::template Evaluator<AnalyticEvalTraits> 
func_eval;
 
 1610        void prepare(
Index cell)
 
 1624            Intern::AnaFunIntJobHelper<max_der_>::work(
loc_integral,
 
 1705    template<
int max_der_, 
typename DataType_, 
typename Trafo_, 
typename Function_>
 
 1730    template<
typename Vector_, 
typename Space_, 
int max_der_>
 
 1802        void prepare(
Index cell)
 
 1823          const int num_loc_dofs = 
space_eval.get_num_local_dofs();
 
 1835            Intern::DiscFunIntJobHelper<max_der_>::work(
loc_integral,
 
 1889      FunctionIntegralType& result()
 
 1914    template<
int max_der_, 
typename Vector_, 
typename Trafo_, 
typename Space_>
 
 1918      XASSERTM(dom_asm.
get_trafo() == space.get_trafo(), 
"domain assembler and space have different trafos");
 
 1919      XASSERTM(vector.size() == space.get_num_dofs(), 
"invalid coefficient vector length");
 
 1922      return job.result();
 
 1947    template<
typename Function_, 
typename Vector_, 
typename Space_, 
int max_der_>
 
 1957      static_assert(Intern::ErrCompatHelper<Function_, Vector_>::valid, 
"function and vector are incompatible");
 
 2005        typename Function_::template Evaluator<AnalyticEvalTraits> 
func_eval;
 
 2030        void prepare(
Index cell)
 
 2051          const int num_loc_dofs = 
space_eval.get_num_local_dofs();
 
 2063            Intern::ErrFunIntJobHelper<max_der_>::work(
loc_integral,
 
 2152    template<
int max_der_, 
typename Function_, 
typename Vector_, 
typename Trafo_, 
typename Space_>
 
 2155       const Vector_& vector, 
const Space_& space, 
const String& cubature)
 
 2157      XASSERTM(dom_asm.
get_trafo() == space.get_trafo(), 
"domain assembler and space have different trafos");
 
 2158      XASSERTM(vector.size() == space.get_num_dofs(), 
"invalid coefficient vector length");
 
 2161      return job.result();
 
 2166      template<
typename DT_, 
typename IT_, 
int max_der_>
 
 2172      template<
typename DT_, 
typename IT_>
 
 2202    template<
typename Function_, 
typename Vector_, 
typename Space_, 
int max_der_>
 
 2212      static_assert(Intern::ErrCompatHelper<Function_, Vector_>::valid, 
"function and vector are incompatible");
 
 2268        typename Function_::template Evaluator<AnalyticEvalTraits> 
func_eval;
 
 2297        void prepare(
Index cell)
 
 2318          const int num_loc_dofs = 
space_eval.get_num_local_dofs();
 
 2345          if constexpr(max_der_ == 0)
 
 2352            Tiny::Vector<DataType, max_der_+1> loc_vec;
 
 2355            if constexpr(max_der_ > 1)
 
#define XASSERTM(expr, msg)
Assertion macro definition with custom message.
Common single-space assembly traits class template.
TrafoType::template Evaluator< ShapeType, DataType >::Type TrafoEvaluator
trafo evaluator type
SpaceEvalData::BasisDataType SpaceBasisData
basis function data types
SpaceEvaluator::template ConfigTraits< space_config >::EvalDataType SpaceEvalData
space evaluation data types
Intern::CubatureTraits< TrafoEvaluator >::RuleType CubatureRuleType
cubature rule type
SpaceType::TrafoType TrafoType
trafo type
SpaceType::DofMappingType DofMapping
dof-mapping types
TrafoEvaluator::template ConfigTraits< trafo_config >::EvalDataType TrafoEvalData
trafo evaluation data type
SpaceType::template Evaluator< TrafoEvaluator >::Type SpaceEvaluator
space evaluator types
Common test-/trial-space assembly traits class template.
TestSpaceType::DofMappingType TestDofMapping
dof-mapping types
Intern::CubatureTraits< TrafoEvaluator >::RuleType CubatureRuleType
cubature rule type
TrafoType::template Evaluator< ShapeType, DataType >::Type TrafoEvaluator
trafo evaluator type
TestEvalData::BasisDataType TestBasisData
basis function data types
TestSpaceType::template Evaluator< TrafoEvaluator >::Type TestEvaluator
space evaluator types
TestSpaceType::TrafoType TrafoType
trafo type
TestEvaluator::template ConfigTraits< test_config >::EvalDataType TestEvalData
space evaluation data types
TrafoEvaluator::template ConfigTraits< trafo_config >::EvalDataType TrafoEvalData
trafo evaluation data type
FunctionIntegralType cell_integral
the local integral
AsmTraits::CubatureRuleType cubature_rule
the cubature rule used for integration
AsmTraits::template TLocalVector< ValueType > local_vector
the local vector to be assembled
Function_::template Evaluator< AnalyticEvalTraits > func_eval
the function evaluator
AsmTraits::DofMapping dof_mapping
the space dof-mapping
AsmTraits::SpaceEvalData space_data
the space evaluation data
AsmTraits::TrafoEvalData trafo_data
the trafo evaluation data
Vector_::GatherAxpy gather_axpy
the vector gather object
AsmTraits::TrafoEvaluator trafo_eval
the trafo evaluator
static constexpr bool need_scatter
this task doesn't need to scatter
OutVectorType & out_vector
the output vector
const AsmTraits::TrafoType & trafo
the cubature factory used for integration
const Vector_ & vector
the vector that is to be integrated
AsmTraits::SpaceEvaluator space_eval
the space evaluator
const Space_ & space
the finite element space to be used
Assembly::AsmTraits1< DataType, Space_, trafo_config, space_tags > AsmTraits
our assembly traits
FunctionIntegralType loc_integral
the local integral
FunctionIntegralType & job_integral
the function value
static constexpr bool need_combine
this task needs to combine
Assembly job for the elementwise integration of a analytic vs discrete error function.
OutVectorType _out_vec
the vector of the cell data
CellErrorFunctionIntegralJob(const Function_ &function, const Vector_ &vector, const Space_ &space, const String &cubature)
Constructor.
const Vector_ & _vector
the vector that is to be integrated
FunctionCellIntegralType result()
Cubature::DynamicFactory _cubature_factory
the cubature factory
Intern::OutVectorHelper< DataType, Index, max_der_ >::VectorType OutVectorType
our output vectortype
Analytic::EvalTraits< DataType, Function_ > AnalyticEvalTraits
declare our analytic eval traits
DiscreteFunctionIntegral< Vector_, Space_ >::Type FunctionIntegralType
make sure that function and vector are compatible
FunctionCellIntegralInfo< FunctionIntegralType, OutVectorType > FunctionCellIntegralType
our cell fucntion integral type
Vector_::DataType DataType
the data-type of the vector
const Function_ & _function
the function to be integrated
FunctionIntegralType _integral
the function integral
const Space_ & _space
the finite element space to be used
Vector_::ValueType ValueType
the value-type of the vector
Domain Integral Assembler class template.
const Trafo_ & get_trafo() const
Returns a reference to the domain assembler's trafo.
void assemble(Job_ &job)
Executes a domain assembly job (in parallel) by (multiple) worker threads.
Analytic Function Integral Task implementation.
Assembly::Intern::CubatureTraits< TrafoEvaluator >::RuleType cubature_rule
the cubature rule
TrafoEvaluator trafo_eval
trafo evaluator
FunctionIntegralType loc_integral
the local integrals
static constexpr bool need_combine
this task needs to combine
static constexpr bool need_scatter
this task doesn't need to scatter
FunctionIntegralType & job_integral
the accumulated job integral
TrafoEvaluator::template ConfigTraits< trafo_config >::EvalDataType trafo_data
trafo eval data type
Trafo_::template Evaluator< typenameTrafo_::ShapeType, DataType >::Type TrafoEvaluator
trafo evaluator
Function_::template Evaluator< AnalyticEvalTraits > func_eval
the function evaluator
Assembly job for the integration of an analytic function.
FunctionIntegralType & result()
Returns the assembled function integral info.
DataType_ DataType
the datatype to be used by the assembly
const Trafo_ & _trafo
the trafo to use
DomainAssemblyAnalyticFunctionIntegralJob(const Function_ &function, const Trafo_ &trafo, const String &cubature)
Constructor.
Analytic::EvalTraits< DataType, Function_ > AnalyticEvalTraits
declare our analytic eval traits
Cubature::DynamicFactory _cubature_factory
the cubature factory
const Function_ & _function
the function to be integrated
FunctionIntegralType _integral
the function integral
AnalyticFunctionIntegral< DataType, Function_ >::Type FunctionIntegralType
our function integral type
Basic Matrix assembly task CRTP base-class for identical test-/trial-space.
Matrix_::ScatterAxpy scatter_axpy
the matrix scatter object
void combine()
Finalizes the assembly.
static constexpr bool need_scatter
this task needs to scatter
const AsmTraits::TrafoType & trafo
the cubature factory used for integration
const Space_ & space
the test-/trial-space to be used
AsmTraits::TrafoEvaluator trafo_eval
the trafo evaluator
AsmTraits::SpaceEvalData space_data
the space evaluation data
void prepare(Index cell)
Prepares the task for the assembly on a given mesh cell.
Matrix_ & matrix
the matrix that is to be assembled
void finish()
Finishes the assembly on the current cell.
Matrix_::ValueType ValueType
the value-type of the matrix
void assemble()
Performs the local assembly.
DataType scatter_alpha
the scatter scaling factor
DomainAssemblyBasicMatrixTaskCRTP1(Matrix_ &matrix_, const Space_ &space_, const Cubature::DynamicFactory &cubature_factory, DataType alpha_)
Constructor.
AsmTraits::CubatureRuleType cubature_rule
the cubature rule used for integration
void scatter()
Scatters the local assembly.
AsmTraits::template TLocalMatrix< ValueType > local_matrix
the local matrix to be assembled
AsmTraits::TrafoEvalData trafo_data
the trafo evaluation data
AsmTraits::SpaceEvaluator space_eval
the space evaluator
void set_point(typename AsmTraits::TrafoEvalData &tau)
Sets the current cubature point.
void eval(ValueType &val, const DataType &weight, const typename AsmTraits::TrialBasisData &phi, const typename AsmTraits::TestBasisData &psi)
Evaluates the bilinearform for a test-/trial-basis function pair.
AsmTraits::DofMapping dof_mapping
the space dof-mapping
Assembly::AsmTraits1< DataType, Space_, trafo_config_|TrafoTags::jac_det, space_config_ > AsmTraits
our assembly traits
static constexpr bool need_combine
this task has no combine
Matrix_::DataType DataType
the data-type of the matrix
Basic Matrix assembly task CRTP base-class for (possibly different) test-/trial-spaces.
const TestSpace_ & test_space
the test-space to be used
AsmTraits::TestDofMapping test_dof_mapping
the space dof-mappings
void eval(ValueType &val, const DataType &weight, const typename AsmTraits::TrialBasisData &phi, const typename AsmTraits::TestBasisData &psi)
Evaluates the bilinearform for a test-/trial-basis function pair.
Matrix_::ValueType ValueType
the value-type of the matrix
AsmTraits::template TLocalMatrix< ValueType > local_matrix
the local matrix to be assembled
void set_point(typename AsmTraits::TrafoEvalData &tau)
Sets the current cubature point.
static constexpr bool need_combine
this task has no combine
AsmTraits::TestEvalData test_data
the space evaluation data
DataType scatter_alpha
the scatter scaling factor
void combine()
Finalizes the assembly.
AsmTraits::CubatureRuleType cubature_rule
the cubature rule used for integration
const TrialSpace_ & trial_space
the trial-space to be used
Assembly::AsmTraits2< DataType, TestSpace_, TrialSpace_, trafo_config_|TrafoTags::jac_det, test_config_, trial_config_ > AsmTraits
our assembly traits
void finish()
Finishes the assembly on the current cell.
AsmTraits::TestEvaluator test_eval
the space evaluators
static constexpr bool need_scatter
this task needs to scatter
DomainAssemblyBasicMatrixTaskCRTP2(Matrix_ &matrix_, const TestSpace_ &test_space_, const TrialSpace_ &trial_space_, const Cubature::DynamicFactory &cubature_factory, DataType alpha_)
Constructor.
void prepare(Index cell)
Prepares the task for the assembly on a given mesh cell.
Matrix_::ScatterAxpy scatter_axpy
the matrix scatter object
Matrix_ & matrix
the matrix that is to be assembled
AsmTraits::TrafoEvalData trafo_data
the trafo evaluation data
void scatter()
Scatters the local assembly.
AsmTraits::TrafoEvaluator trafo_eval
the trafo evaluator
void assemble()
Performs the local assembly.
const AsmTraits::TrafoType & trafo
the cubature factory used for integration
Matrix_::DataType DataType
the data-type of the matrix
Basic Vector assembly task CRTP base-class.
DomainAssemblyBasicVectorTaskCRTP(Vector_ &vector_, const Space_ &space_, const Cubature::DynamicFactory &cubature_factory, DataType alpha_)
Constructor.
void finish()
Finishes the assembly on the current cell.
const AsmTraits::TrafoType & trafo
the cubature factory used for integration
const Space_ & space
the test-/trial-space to be used
AsmTraits::SpaceEvaluator space_eval
the space evaluator
AsmTraits::TrafoEvaluator trafo_eval
the trafo evaluator
AsmTraits::CubatureRuleType cubature_rule
the cubature rule used for integration
Vector_::ScatterAxpy scatter_axpy
the vector scatter object
static constexpr bool need_scatter
this task needs to scatter
Vector_::ValueType ValueType
the value-type of the vector
AsmTraits::TrafoEvalData trafo_data
the trafo evaluation data
AsmTraits::template TLocalVector< ValueType > local_vector
the local vector to be assembled
static constexpr bool need_combine
this task has no combine
Assembly::AsmTraits1< DataType, Space_, trafo_config_|TrafoTags::jac_det, space_config_ > AsmTraits
our assembly traits
Vector_::DataType DataType
the data-type of the vector
AsmTraits::DofMapping dof_mapping
the space dof-mapping
void eval(ValueType &val, const DataType &weight, const typename AsmTraits::SpaceBasisData &psi)
Evaluates the linearform for a test-basis function.
AsmTraits::SpaceEvalData space_data
the space evaluation data
void assemble()
Performs the local assembly.
Vector_ & vector
the vector that is to be assembled
DataType scatter_alpha
the scatter scaling factor
void combine()
Finalizes the assembly.
void set_point(typename AsmTraits::TrafoEvalData &tau)
Sets the current cubature point.
void scatter()
Scatters the local assembly.
void prepare(Index cell)
Prepares the task for the assembly on a given mesh cell.
BaseClass::AsmTraits AsmTraits
our assembly traits
VectorSol_::GatherAxpy sol_gather
the gather axpy for the local solution vector
void assemble()
Performs the local assembly.
BilinearOperator_::template Evaluator< AsmTraits > oper_eval
the bilinear operator evaluator
DomainAssemblyBasicVectorTaskCRTP< Task, Vector_, Space_, trafo_config, space_config > BaseClass
our base-class typedef
AsmTraits::template TLocalMatrix< MatValType > local_matrix
the local matrix that is used to assemble the local vector
const VectorSol_ & vec_sol
the local solution vector that the bilinear operator is applied to
Vector assembly job for BilinearOperator and identical test-/trial-spaces.
DomainAssemblyBilinearOperatorApplyVectorJob1(const BilinearOperator_ &bilinear_operator_, Vector_ &vector_, const VectorSol_ &vec_sol_, const Space_ &space_, const String &cubature_, DataType alpha_=DataType(1))
Constructor.
const BilinearOperator_ & bilinear_operator
a reference to the bilinear operator that is to be assembled
const Space_ & space
a reference to the finite element space to be used as test-/trial-space
Vector_ & vector
a reference to the vector that is to be assembled
const VectorSol_ & vec_sol
a reference to the vector the biliniear operator is applied on
Cubature::DynamicFactory cubature_factory
the cubature factory to be used for integration
DataType alpha
the scaling factor for the assembly.
DomainAssemblyBasicMatrixTaskCRTP1< Task, Matrix_, Space_, trafo_config, space_config > BaseClass
our base-class typedef
BaseClass::AsmTraits AsmTraits
our assembly traits
BilinearOperator_::template Evaluator< AsmTraits > oper_eval
the bilinear operator evaluator
Matrix assembly job for BilinearOperator and identical test-/trial-spaces.
Matrix_ & matrix
a reference to the matrix that is to be assembled
DomainAssemblyBilinearOperatorMatrixJob1(const BilinearOperator_ &bilinear_operator_, Matrix_ &matrix_, const Space_ &space_, const String &cubature_, DataType alpha_=DataType(1))
Constructor.
const BilinearOperator_ & bilinear_operator
a reference to the bilinear operator that is to be assembled
DataType alpha
the scaling factor for the assembly.
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
DomainAssemblyBasicMatrixTaskCRTP2< Task, Matrix_, TestSpace_, TrialSpace_, trafo_config, test_config, trial_config > BaseClass
our base-class typedef
BaseClass::AsmTraits AsmTraits
our assembly traits
BilinearOperator_::template Evaluator< AsmTraits > oper_eval
the bilinear operator evaluator
Matrix assembly job for BilinearOperator and (possibly different) test-/trial-spaces.
DomainAssemblyBilinearOperatorMatrixJob2(const BilinearOperator_ &bilinear_operator_, Matrix_ &matrix_, const TestSpace_ &test_space_, const TrialSpace_ &trial_space_, const String &cubature_, DataType alpha_=DataType(1))
Constructor.
const TestSpace_ & test_space
a reference to the finite element space to be used as test-space
DataType alpha
the scaling factor for the assembly.
const BilinearOperator_ & bilinear_operator
a reference to the bilinear operator that is to be assembled
const TrialSpace_ & trial_space
a reference to the finite element space to be used as trial-space
Cubature::DynamicFactory cubature_factory
the cubature factory to be used for integration
Matrix_ & matrix
a reference to the matrix that is to be assembled
AsmTraits::template TLocalVector< ValueType > local_vector
the local vector to be assembled
AsmTraits::DofMapping dof_mapping
the space dof-mapping
const Vector_ & vector
the vector that is to be integrated
AsmTraits::CubatureRuleType cubature_rule
the cubature rule used for integration
const Space_ & space
the finite element space to be used
AsmTraits::SpaceEvalData space_data
the space evaluation data
const AsmTraits::TrafoType & trafo
the cubature factory used for integration
static constexpr bool need_combine
this task needs to combine
AsmTraits::TrafoEvalData trafo_data
the trafo evaluation data
Assembly::AsmTraits1< DataType, Space_, TrafoTags::jac_det, space_tags > AsmTraits
our assembly traits
Vector_::GatherAxpy gather_axpy
the vector gather object
FunctionIntegralType loc_integral
the local integral
AsmTraits::TrafoEvaluator trafo_eval
the trafo evaluator
FunctionIntegralType & job_integral
the function value
AsmTraits::SpaceEvaluator space_eval
the space evaluator
static constexpr bool need_scatter
this task doesn't need to scatter
Assembly job for the integration of a discrete finite element function.
DomainAssemblyDiscreteFunctionIntegralJob(const Vector_ &vector, const Space_ &space, const String &cubature)
Constructor.
const Vector_ & _vector
the vector that is to be integrated
Vector_::ValueType ValueType
the value-type of the vector
Vector_::DataType DataType
the data-type of the vector
const Space_ & _space
the finite element space to be used
FunctionIntegralType _integral
the function integral
Cubature::DynamicFactory _cubature_factory
the cubature factory
Assembly::AsmTraits1< DataType, Space_, trafo_config, space_tags > AsmTraits
our assembly traits
FunctionIntegralType & job_integral
the function value
AsmTraits::template TLocalVector< ValueType > local_vector
the local vector to be assembled
static constexpr bool need_scatter
this task doesn't need to scatter
AsmTraits::TrafoEvalData trafo_data
the trafo evaluation data
const Space_ & space
the finite element space to be used
AsmTraits::DofMapping dof_mapping
the space dof-mapping
AsmTraits::CubatureRuleType cubature_rule
the cubature rule used for integration
AsmTraits::TrafoEvaluator trafo_eval
the trafo evaluator
AsmTraits::SpaceEvalData space_data
the space evaluation data
AsmTraits::SpaceEvaluator space_eval
the space evaluator
const Vector_ & vector
the vector that is to be integrated
static constexpr bool need_combine
this task needs to combine
Vector_::GatherAxpy gather_axpy
the vector gather object
Function_::template Evaluator< AnalyticEvalTraits > func_eval
the function evaluator
FunctionIntegralType loc_integral
the local integral
const AsmTraits::TrafoType & trafo
the cubature factory used for integration
Assembly job for the integration of a analytic vs discrete error function.
const Vector_ & _vector
the vector that is to be integrated
const Function_ & _function
the function to be integrated
DomainAssemblyErrorFunctionIntegralJob(const Function_ &function, const Vector_ &vector, const Space_ &space, const String &cubature)
Constructor.
const Space_ & _space
the finite element space to be used
Analytic::EvalTraits< DataType, Function_ > AnalyticEvalTraits
declare our analytic eval traits
DiscreteFunctionIntegral< Vector_, Space_ >::Type FunctionIntegralType
make sure that function and vector are compatible
Vector_::ValueType ValueType
the value-type of the vector
Vector_::DataType DataType
the data-type of the vector
FunctionIntegralType _integral
the function integral
Cubature::DynamicFactory _cubature_factory
the cubature factory
AnalyticEvalTraits::ValueType func_value
the function value in the current point
Function_::template Evaluator< AnalyticEvalTraits > func_eval
the function evaluator
DomainAssemblyBasicVectorTaskCRTP< Task, Vector_, Space_, trafo_config, test_config > BaseClass
our base-class typedef
BaseClass::AsmTraits AsmTraits
our assembly traits
Analytic::EvalTraits< DataType, Function_ > AnalyticEvalTraits
declare our analytic eval traits
Vector assembly job for a force functional represented by an analytic function.
const Function_ & function
a reference to the linear functional that is to be assembled
Vector_ & vector
a reference to the vector that is to be assembled
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
DataType alpha
the scaling factor for the assembly.
DomainAssemblyForceFunctionalVectorJob(const Function_ &function_, Vector_ &vector_, const Space_ &space_, const String &cubature_, DataType alpha_=DataType(1))
Constructor.
BaseClass::AsmTraits AsmTraits
our assembly traits
LinearFunctional_::template Evaluator< AsmTraits > func_eval
the bilinear operator evaluator
DomainAssemblyBasicVectorTaskCRTP< Task, Vector_, Space_, trafo_config, test_config > BaseClass
our base-class typedef
Vector assembly job for LinearFunctional implementations.
Cubature::DynamicFactory cubature_factory
the cubature factory to be used for integration
Vector_ & vector
a reference to the vector that is to be assembled
DomainAssemblyLinearFunctionalVectorJob(const LinearFunctional_ &linear_functional_, Vector_ &vector_, const Space_ &space_, const String &cubature_, DataType alpha_=DataType(1))
Constructor.
DataType alpha
the scaling factor for the assembly.
const LinearFunctional_ & linear_functional
a reference to the linear functional that is to be assembled
const Space_ & space
a reference to the finite element space to be used as test-/trial-space
Function cell integral info class.
Function integral info class.
void format(DT_ value=DT_(0))
Reset all elements of the container to a given value or zero if missing.
Blocked Dense data vector class template.
Dense data vector class template.
String class implementation.
void assemble_force_function_vector(DomainAssembler< Trafo_ > &dom_asm, Vector_ &vector, const Function_ &function, const Space_ &space, const String &cubature, const typename Vector_::DataType alpha=typename Vector_::DataType(1))
Assembles a force function into a vector.
void assemble_linear_functional_vector(DomainAssembler< Trafo_ > &dom_asm, Vector_ &vector, const LinFunc_ &linear_functional, const Space_ &space, const String &cubature, const typename Vector_::DataType alpha=typename Vector_::DataType(1))
Assembles a linear functional into a vector.
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.
AnalyticFunctionIntegral< DataType_, Function_ >::Type integrate_analytic_function(DomainAssembler< Trafo_ > &dom_asm, const Function_ &function, const String &cubature)
Assembles the integral of an analytic function.
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.
DiscreteFunctionIntegral< Vector_, Space_ >::Type integrate_error_function(DomainAssembler< Trafo_ > &dom_asm, const Function_ &function, const Vector_ &vector, const Space_ &space, const String &cubature)
Assembles the integral of an (analytic - discrete) error function.
void assemble_bilinear_operator_apply_vector_1(DomainAssembler< Trafo_ > &dom_asm, Vector_ &vector, const VectorSol_ &vec_sol, const BilOp_ &bilinear_operator, const Space_ &space, const String &cubature, const typename Vector_::DataType alpha=typename Vector_::DataType(1))
Assembles the application of a bilinear operator into a vector with identical test- and trial-spaces.
DiscreteFunctionIntegral< Vector_, Space_ >::Type integrate_discrete_function(DomainAssembler< Trafo_ > &dom_asm, const Vector_ &vector, const Space_ &space, const String &cubature)
Assembles the integral of a discrete finite element function.
CUDA_HOST_DEVICE void axpy(T_ &y, const T_ &x, const T_ &alpha)
Performs an AXPY of two scalars.
SpaceTags
Space configuration tags enum.
@ value
specifies whether the space should supply basis function values
@ hess
specifies whether the space should supply basis function hessians
@ grad
specifies whether the space should supply basis function gradients
std::uint64_t Index
Index data type.
TrafoTags
Trafo configuration tags enum.
@ img_point
specifies whether the trafo should supply image point coordinates
@ jac_det
specifies whether the trafo should supply jacobian determinants
Helper class to determine the FunctionIntegralInfo type for discrete functions.