7#ifndef explicitResidual_hh
8#define explicitResidual_hh
35 iNAttrbs_.push_back(
nSet);
42 hNAttrbs_ = hNAttrbs_ ||
nSet;
45 hNAttrbs_.insert(
attrb);
70 virtual std::ostream&
info(std::ostream&
os)
const{
107 virtual ~ExplicitResidual1D();
110 virtual std::ostream& info(std::ostream& os)
const;
187 enum weight {DIAM, DIAM_HP, DIAM_P};
211 enum weight w = DIAM,
215 virtual ~ExplicitResidual2D(){};
239 Distance(Real alpha=0) : alpha_(alpha){};
254 concepts::Real dist = std::min(std::min(p[0],p[1]), std::min(1-p[0],1-p[1]));
255 return std::pow(dist, alpha_);
260 concepts::Real dist = std::min(std::min(p[0],p[1]), std::min(1-p[0],1-p[1]));
261 return std::pow(dist, alpha_);
269 virtual std::ostream&
info(std::ostream& os)
const{
300 return std::pow((1-p)*p, alpha_);
307 return std::pow((1-p[0])*p[0], alpha_);
313 return std::pow((1-p[0])*p[0], alpha_);
321 virtual std::ostream&
info(std::ostream& os)
const{
330 virtual const Real operator()()
const {
return 0.;}
332 virtual ExplicitResidual2D<F>* clone()
const{
return new ExplicitResidual2D<F>(*
this);}
335 virtual std::ostream& info(std::ostream& os)
const {
void addINData(const Set< uint > &nSet, concepts::ElementFormulaContainer< F > frm)
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
virtual ExplicitResidual< F > * clone() const =0
Virtual copy constructor.
ExplicitResidual(const SpaceOnCells< F > &spc, const Vector< F > &sol, const ElementFormulaContainer< F > res)
void addHNData(const Set< uint > &nSet)
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
virtual Distance * clone() const
Virtual copy constructor.
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
virtual EdgeWeight * clone() const
Virtual copy constructor.
std::string typeOf(const T &t)
Set< F > makeSet(uint n, const F &first,...)