8#ifndef hpSpacePreBuilder_hh
9#define hpSpacePreBuilder_hh
15#include "geometry/cellConditions.hh"
20#define SubSpaceHelper_D 0
25 template<
class F,
class G>
26 class BuildTColumnsBase;
78 virtual std::ostream&
info(std::ostream&
os)
const;
89 template<
class F,
class G>
118 virtual const uint&
idx()
const = 0;
130 passive_.insert(&
cntr);
136 virtual std::ostream&
info(std::ostream&
os)
const;
141 std::unique_ptr<const BoundaryConditions> bc_;
143 std::unique_ptr<const CellConditions> cc_;
148 template<
class F,
class G>
152 os << *bc_;
if (cc_.get())
os <<
", ";
154 if (cc_.get())
os << *cc_;
161 template<
class F,
class G>
178 DEBUGL(SubSpaceHelper_D, *
this);
181 if (ownIndex_)
delete idx_;
182 DEBUGL(SubSpaceHelper_D,
"done");
191 DEBUGL(SubSpaceHelper_D,
"idx = " << *idx_);
193 virtual const uint&
idx()
const {
194 DEBUGL(SubSpaceHelper_D,
"idx = " << *idx_);
197 bool ownIndex()
const {
return ownIndex_; }
202 virtual std::ostream&
info(std::ostream&
os)
const;
214 template<
class F,
class G>
217 if (this->bc())
os << *this->bc() <<
", ";
218 if (this->cc())
os << *this->cc() <<
", ";
219 if (offset_ == 0)
os <<
"(own)";
else os <<
"(given)";
220 os <<
" offset = " << offset() <<
", ";
221 if (ownIndex_)
os <<
"(own)";
else os <<
"(given)";
222 return os <<
" idx = " << idx() <<
")";
243 template<
class F,
class G>
273 virtual std::ostream&
info(std::ostream&
os)
const;
276 template<
class F,
class G>
282 template<
class F,
class G>
285 return spc_->prebuild();
288 template<
class F,
class G>
bool exist(F val) const
Returns true, if a value is in the set.
virtual BuildTColumnsBase< F, G > * clone(SpaceHelper< F, G > *spc=0) const =0
SpaceHelper< F, G > & spc() const
Returns pointer to space helper class.
SpaceHelper< F, G > * spc_
Space to build the degrees of freedom from.
BuildTColumnsBase()
Default constructor.
BuildTColumnsBase(SpaceHelper< F, G > &spc)
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
G & prebuild() const
Returns the space pre builder.
virtual void reset()=0
Reset the index counter.
SpaceHelper(G &prebuild, const BoundaryConditions *bc=0, const CellConditions *cc=0)
void setPassive(const concepts::Connector &cntr)
Mark a connector as passive.
G & prebuild()
Returns space pre builder.
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
const BoundaryConditions * bc() const
Returns boundary conditions.
virtual uint spcNo() const
bool passive(const concepts::Connector &cntr) const
Returns if an entitiy of dimension dim is marked as passive.
const CellConditions * cc() const
Returns cell conditions.
virtual uint & idx()=0
Returns the current index.
void set_bc(const BoundaryConditions *bc)
Reset boundary conditions to bc.
virtual concepts::Set< concepts::IndexRange > indices(uint dim, const concepts::Connector &cntr, uint spcNo=0) const =0
virtual ~SpacePreBuilder()
Destructor.
virtual concepts::Mesh & mesh() const =0
Returns mesh.
virtual concepts::IndexRange & setIndex(uint &firstIdx, uint noIdx, uint dim, const concepts::Connector &cntr, uint i=0, uint spcNo=0)=0
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
SpacePreBuilder()
Constructor.
virtual void rebuildMesh()=0
virtual void rebuildDof()=0
virtual void reset()
Reset the index counter.
virtual uint spcNo() const
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
SubspaceHelper(G &prebuild, uint spcNo, const BoundaryConditions *bc=0, const CellConditions *cc=0, uint *const offset=0, uint *const idx=0)
uint offset() const
Returns the offset.
#define conceptsAssert(cond, exc)
#define DEBUGL(doit, msg)
std::string typeOf(const T &t)
Set< F > makeSet(uint n, const F &first,...)