34 virtual std::ostream&
info(std::ostream&
os)
const throw () {
39 std::string errorMessage_;
80 concepts::LocalEstimator<F>(spc, sol), rule_(loc_rule), f_(f){
91 virtual ~ImplicitEquilibratedA0(){};
106 scalars_.push_back(scalar);
110 L_.push_back(&bform);
111 scalars_L.push_back(scalar);
121 nfrms_.push_back(frm);
122 nAttrbs_.push_back(attrb);
124 help_[*iter] = nfrms_.size()-1;
133 dAttrbs_ = dAttrbs_||attrb;
142 iAttrbs_= iAttrbs_||attrb;
146 void isunique(
bool unique=
true){
169 for(uint i = 0; i < B_.size(); ++i ){
172 lfc->setBasis(concepts::BND);
173 innerRes.add(*(B_[i]), (-1)*scalars_[i]);
181 lfc->setBasis(concepts::BND);
182 innerRes.add(f_, -1);
191 for(uint i = 0 ; i < nfrms_.size(); ++i)
192 apprxMoments.addNeumann(nfrms_[i],nAttrbs_[i] );
195 apprxMoments.addDirichlet(dAttrbs_);
197 apprxMoments.addComplete();
204 hp2D::Fluxes flux(fluxSpc, moments);
208 for(uint i = 0; i < B_.size(); ++i ){
211 lfc->setBasis(concepts::Default);
214 lfc->setBasis(concepts::Default);
218 error_2.rehash(hpSpc->
nelm());
224 std::unique_ptr<hp2D::hpAdaptiveSpaceH1::Scan> sc(hpSpc->
scan());
233 quadMesh.
addCell(quad2d,
false);
234 uint p =
std::max(quad->
p()[0], quad->
p()[1]);
247 buildlocalRhs_(quad2d->
connector(), spc_K, flux, bc, b_K);
250 buildlocalA_(spc_K, A_K);
256 solver_K(b_K, sol_K);
260 error_2[quad2d->
connector().
key()] = computeLocalError_2(spc_K,sol_K);
272 std::unique_ptr<hp2D::hpAdaptiveSpaceH1::Scan> sc(hpSpc->
scan());
283 quadMesh.
addCell(quad2d,
false);
284 uint p =
std::max(quad->
p()[0], quad->
p()[1]);
294 bool unique = buildlocalRhs_(quad2d->
connector(), spc_K, flux, bc,b_K);
301 buildlocalA_(spc_K, A_K);
307 solver_K(b_K, sol_K);
376 virtual ImplicitEquilibratedA0* clone()
const{
return new ImplicitEquilibratedA0(*
this);}
380 virtual std::ostream& info(std::ostream& os)
const{
423 const hp2D::Fluxes& flux,
433 for (uint i = 0; i < 4; ++i) {
435 == concepts::Boundary::NEUMANN)
441 uint noN = tspcFluxElements.nelm() + nattrb_K.size();
449 if (unique_ || noN < 4){
451 hp2D::LocalFluxes locFlux(tspcFluxElements, quad.
key(), flux);
464 for (uint i = 0; i < B_.size(); ++i) {
466 rhs += rhs_B * scalars_[i];
470 if (nattrb_K.size() > 0) {
472 nattrb_K.begin(); iter != nattrb_K.end(); ++iter) {
510 const hp2D::Fluxes& flux,
520 for(uint i=0; i< 4 ; ++i){
521 if(bc(quad.
edge(i)->
attrib()).type()== concepts::Boundary::NEUMANN)
527 hp2D::LocalFluxes locFlux(tspcFluxElements, quad.
key(), flux);
540 for(uint i = 0 ; i < B_.size(); ++i){
542 rhs+= rhs_B*scalars_[i];
547 if(nattrb_K.size()>0){
574 for(; iter!=L_.end(); ++iter, ++iter_s){
577 A.addInto(A_K,*iter_s);
589 return grad_l2 + id_l2;
F max(const concepts::Array< F > &a)
Returns the maximal value in array a.
#define conceptsException(exc)
uint attrib() const
Returns the attribute.
const Key & key() const
Returns the key of the connector.
const Attribute & attrib() const
Returns the attribute of the connector.
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
ImplicitEquilibratedA0Error(const std::string &errorMessage)
virtual void addCell(Cell *cell, bool holding=true)
Quad & connector() const
Returns the quadrilateral connector (topology)
Edge * edge(uint i) const
virtual const concepts::QuadNd & cell() const
Returns the cell on which the element is built.
virtual Scan * scan() const
Returns a scanner to iterate over the elements of the space.
virtual uint nelm() const
Returns the number of elements in the space.
#define conceptsAssert(cond, exc)
std::string typeOf(const T &t)
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)
unsigned short ushort
Abbreviation for unsigned short.