8#ifndef model_LinearWeakList_H_
9#define model_LinearWeakList_H_
23 template <
typename TestType,
typename _IntegrationListType>
31 constexpr static int dim=TrialFunctionType::dim;
37 typedef Eigen::Matrix<double,dofPerElement,1> ElementVectorType;
41 const std::shared_ptr<TestExpression<TestType>>
testExp;
42 const _IntegrationListType
list;
47 throw std::invalid_argument(
"Null FEM form.");
53 Eigen::Matrix<double,Eigen::Dynamic,1> _globalVector(Eigen::Matrix<double,Eigen::Dynamic,1>::Zero(
field().gSize()));
55 for (
size_t k=0;
k<
list.size();++
k)
57 const ElementType& ele(
list[
k].ele);
58 const int f(
list[
k].boundaryFace);
59 const Eigen::Matrix<double,dim+1,1>& bary(
list[
k].domainBary);
61 const ElementVectorType ve(
testExp->sfm(ele,bary).transpose()
67 for (
int i=0;
i<dofPerElement;++
i)
69 const size_t nodeID_I(
i/dofPerNode);
70 const size_t nodeDof_I(
i%dofPerNode);
71 const size_t gI= ele.node(nodeID_I).gID*dofPerNode+nodeDof_I;
72 _globalVector(gI) += ve(
i);
86 template<
class T,
int D,
class P>
89 return std::make_shared<LinearWeakList<T,IntegrationList<D,P>>>(
t,list);
const std::shared_ptr< TestExpression< TestType > > testExp
Eigen::Matrix< double, Eigen::Dynamic, 1 > globalVector() const
LinearWeakList(std::shared_ptr< TestExpression< TestType > > f, const _IntegrationListType &dom)
const auto & field() const
const _IntegrationListType list
TestType::TrialFunctionType TrialFunctionType
final point of the source segment t
function int_R syms a b c u real f
auto operator,(const std::shared_ptr< TestExpression< T1 > > &t, const std::shared_ptr< T2 > &e)
static Eigen::Matrix< double, dim, 1 > jGN(const Eigen::Matrix< double, dim, 1 > &jgn)