15#include "geometry/cellConditions.hh"
24 class EdgeNormalVectorRule;
56 enum traceTypes { FIRST, MEAN, JUMP };
65 enum traceTypes
type = FIRST,
79 enum traceTypes
type = FIRST,
84 enum traceTypes
type = FIRST,
90 virtual uint
dim()
const {
return dim_; }
93 virtual uint
nelm()
const {
return nelm_; }
106 const_iterator i = uelm_.find(edge.
key());
107 if (i == uelm_.end())
126 virtual std::ostream&
info(std::ostream& os)
const;
143 std::unique_ptr<QuadEdgeBase> quadEdge_;
145 bool warn_edgeBuildMissElem_;
147 void constructType_(
enum traceTypes
type,
154 bool build_(
const Quad<Real>* elm, F condition);
182 const Real t = 0.0)
const;
184 const Real t = 0.0)
const;
186 const Real t = 0.0)
const;
192 virtual std::ostream&
info(std::ostream&
os)
const;
197 F compute_(
const Element<G>& elm,
const P& p,
const Real t)
const {
203 if (b.type() != Boundary::DIRICHLET)
207 if (!compute_(
dynamic_cast<const Edge2d*
>(&cell), b, p, t, val))
209 (
"element not supported"));
215 const Real p,
const Real t, F& val)
const {
217 val = b(cell->
chi(p), t);
224 bool compute_(
const Edge2d* cell,
const Boundary b,
225 const P& p,
const Real t, F& val)
const {
264 enum traceTypes { FIRST, MEAN, JUMP };
273 enum traceTypes type = FIRST,
287 enum traceTypes type = FIRST,
292 enum traceTypes type = FIRST,
296 virtual ~TraceSpace();
298 virtual uint dim()
const {
return dim_; }
301 virtual uint nelm()
const {
return nelm_; }
304 virtual Scan* scan()
const
314 const_iterator i = uelm_.find(edge.
key());
315 if (i == uelm_.end())
332 virtual void recomputeShapefunctions();
334 virtual std::ostream& info(std::ostream& os)
const;
351 std::unique_ptr<QuadEdgeBase> quadEdge_;
353 bool warn_edgeBuildMissElem_;
355 void constructType_(
enum traceTypes type,
362 bool build_(
const Quad<Real>* elm, F condition);
#define conceptsException(exc)
virtual Connector & connector() const =0
Returns the connector.
const Key & key() const
Returns the key of the connector.
const Attribute & attrib() const
Returns the attribute of the connector.
Real2d chi(Real xi) const
virtual const Cell & cell() const =0
Returns the cell on which the element is built.
const concepts::Sequence< UnderlyingElement > uelm(const concepts::Edge edge) const
Returns the underlying 2D elements.
virtual Scan * scan() const
Returns a scanner to iterate over the elements of the space.
TraceSpace(concepts::SpaceOnCells< Real > &spc, const concepts::CellConditions *cc=0, enum traceTypes type=FIRST, const concepts::EdgeNormalVectorRule normalVectorRule=concepts::EdgeNormalVectorRule())
const concepts::HashMap< concepts::Sequence< UnderlyingElement > > uelm() const
virtual uint dim() const
Returns the dimension of the space.
virtual uint nelm() const
Returns the number of elements in the space.
TraceSpace(const concepts::SpaceOnCells< Real > &spc, const concepts::Set< uint > edgeAttr, enum traceTypes type=FIRST, const concepts::EdgeNormalVectorRule &normalVectorRule=concepts::EdgeNormalVectorRule())
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
virtual void recomputeShapefunctions()
#define conceptsAssert(cond, exc)
Set< F > makeSet(uint n, const F &first,...)