22#define ElemFrmIntegrate_D 0
23#define PWintegrate_D 0
24#define SpaceIntegrate_D 0
25#define ElemFrmL2Product_D 0
26#define SpcFrmL2Product_D 0
27#define SeqElemFrmL2Product_D 0
32 template<
typename F,
typename G>
63 template<
typename F,
typename G>
68 DEBUGL(ElemFrmIntegrate_D,
"elm = " << elm);
76 DEBUGL(ElemFrmIntegrate_D,
"elm = " << elm);
79 DEBUGL(ElemFrmIntegrate_D,
"coord = " << p.coord <<
", frm(coord) = " <<
80 frm(elm, p.coord, t) <<
", interme = " << p.intermediate);
81 val += frm(elm, p.coord, t) * p.intermediate;
95 template<
class F,
typename G>
108 DEBUGL(1, ++i <<
".Element: " << elm);
111 DEBUGL(1,
" Integral: " << tmp);
130 template<
class F,
typename G>
153 template<
class F,
class G>
168 val +=
frm1(elm1, p.coord, t) *
frm2(elm2, p.coord,t) * p.intermediate;
181 template<
class F,
class G>
213 template<
typename F,
typename G>
221 DEBUGL(ElemFrmL2Product_D,
"Element = " << elm);
222 DEBUGL(ElemFrmL2Product_D,
"u = " << u);
228#if ElemFrmL2Product_D
230 DEBUGL(1,
"coord = " << p.coord <<
", u(coord) = " <<
231 u(elm, p.coord, t) <<
", interme = " << p.intermediate);
233 DEBUGL(1,
"coord = " << p.coord <<
", u(coord) = " <<
234 u(elm, p.coord, t) <<
", interme = " << p.intermediate <<
235 ", formula = " << (*c)(elm, p.coord, t) <<
", contribution = " <<
236 u(elm, p.coord, t)*u(elm, p.coord, t)*
237 p.intermediate*(*c)(elm, p.coord, t));
240 F f = u(elm, p.coord, t);
241 Real add = std::norm(f) * p.intermediate;
242 if (c) add *= (*c)(elm, p.coord, t);
249 DEBUGL(ElemFrmL2Product_D,
"val = " << val);
266 template<
class F,
typename G>
271 DEBUGL(SpcFrmL2Product_D,
"spc = " << spc);
272 DEBUGL(SpcFrmL2Product_D,
"u = " << u);
274 std::unique_ptr<Scan<ElementWithCell<F> > >
sc(spc.
scan());
278 DEBUGL(SpcFrmL2Product_D, ++j <<
"th element = " << elm.
cell());
280 DEBUGL(SpcFrmL2Product_D,
"val = " << val);
282 DEBUGL(SpcFrmL2Product_D,
"done.");
295 template<
class F,
typename G>
301 DEBUGL(SeqElemFrmL2Product_D,
"Looking over iterators");
304 DEBUGL(SeqElemFrmL2Product_D, **it);
324 const std::set<uint>* attributes = 0);
326 virtual std::ostream&
info(std::ostream&
os)
const;
348 const std::set<uint>* attributes = 0);
353 virtual std::ostream&
info(std::ostream&
os)
const;
356 F compute_(
const G& elm);
372 const std::set<uint>* attributes = 0);
376 virtual std::ostream&
info(std::ostream&
os)
const;
379 F compute_(
const G& elm);
#define conceptsException(exc)
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
virtual void operator()(const Element< Real > &elm)
CellEdgeIntegral(F &val, const concepts::Formula< F > &formula, const std::set< uint > *attributes=0)
virtual void operator()(const Element< Real > &elm)
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
CellFaceIntegral(F &val, const concepts::Formula< F > &formula, const std::set< uint > *attributes=0)
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
const std::set< uint > * attributes_
Attributes, which contribute.
F & val_
Integration value.
const concepts::Formula< F > & formula_
Formula to integrate.
CellIntegral(F &val, const Formula< F > &formula, const std::set< uint > *attributes=0)
virtual Connector & connector() const =0
Returns the connector.
virtual const Cell & cell() const =0
Returns the cell on which the element is built.
virtual bool quadraturePoint(uint i, intPoint &p, intFormType form=ZERO, bool localCoord=false) const =0
virtual Scanner * scan() const =0
Returns a scanner to iterate over the elements of the space.
#define DEBUGL(doit, msg)
Real integrate(const Element< G > &elm)
Set< F > makeSet(uint n, const F &first,...)
Real L2product(const ElementWithCell< G > &elm, const ElementFormula< F, G > &u, const ElementFormula< Real > *c=0, const Real t=0.0, IntegrationCell::intFormType form=IntegrationCell::ZERO)