Permalink
Browse files

Merge branch 'intrule4LFI' into 'master'

Provide intrule option for SymbolicLFI

See merge request !241
  • Loading branch information...
JSchoeberl committed Sep 22, 2017
2 parents 0b2913d + 0f14a6c commit 42c3ac6902ec19320bdc59fb1be186c1d1abdc79
Showing with 25 additions and 2 deletions.
  1. +10 −1 comp/python_comp.cpp
  2. +6 −0 fem/symbolicintegrator.cpp
  3. +9 −1 fem/symbolicintegrator.hpp
@@ -3084,7 +3084,8 @@ flags : dict
m.def("SymbolicLFI",
[](spCF cf, VorB vb, bool element_boundary,
bool skeleton, py::object definedon, py::object definedonelem)
bool skeleton, py::object definedon,
IntegrationRule ir, py::object definedonelem)
{
py::extract<Region> defon_region(definedon);
if (defon_region.check())
@@ -3108,6 +3109,13 @@ flags : dict
if (defon_region.check())
lfi->SetDefinedOn(defon_region().Mask());
if (ir.Size())
{
cout << IM(5) << "ir = " << ir << endl;
dynamic_pointer_cast<SymbolicLinearFormIntegrator>
(lfi)->SetIntegrationRule(ir);
}
if (! py::extract<DummyArgument> (definedonelem).check())
lfi -> SetDefinedOnElements (py::extract<shared_ptr<BitArray>>(definedonelem)());
@@ -3118,6 +3126,7 @@ flags : dict
py::arg("element_boundary")=false,
py::arg("skeleton")=false,
py::arg("definedon")=DummyArgument(),
py::arg("intrule")=IntegrationRule(),
py::arg("definedonelements")=DummyArgument()
);
@@ -465,6 +465,12 @@ namespace ngfem
});
}
void SymbolicLinearFormIntegrator::SetIntegrationRule(const IntegrationRule &_ir)
{
ir = _ir.Copy();
simd_ir = SIMD_IntegrationRule(ir);
}
/*
template <typename SCAL>
void SymbolicLinearFormIntegrator ::
@@ -458,13 +458,18 @@ class CompoundDifferentialOperator : public DifferentialOperator
VorB vb;
bool element_boundary;
mutable bool simd_evaluate = true;
IntegrationRule ir; // if non-empty use this integration-rule
SIMD_IntegrationRule simd_ir; // if non-empty use this integration-rule
public:
NGS_DLL_HEADER SymbolicLinearFormIntegrator (shared_ptr<CoefficientFunction> acf, VorB avb,
bool aelement_boundary);
virtual VorB VB() const { return vb; }
virtual string Name () const { return string ("Symbolic LFI"); }
void SetIntegrationRule (const IntegrationRule & _ir);
virtual void
CalcElementVector (const FiniteElement & fel,
const ElementTransformation & trafo,
@@ -598,6 +603,9 @@ class CompoundDifferentialOperator : public DifferentialOperator
Array<int> test_cum; // cumulated dimension of proxies
VorB vb; // only BND supported by now
// bool element_boundary; /// not needed (by now ???)
IntegrationRule ir; // if non-empty use this integration-rule
SIMD_IntegrationRule simd_ir; // if non-empty use this integration-rule
public:
SymbolicFacetLinearFormIntegrator (shared_ptr<CoefficientFunction> acf, VorB avb);

0 comments on commit 42c3ac6

Please sign in to comment.