24 #ifndef PROBLEMCONTAINER_INTERNAL_H_
25 #define PROBLEMCONTAINER_INTERNAL_H_
65 template<
class EDC,
class DWRC>
68 std::vector<double>& element_contrib,
double scale);
81 template<
class FDC,
class DWRC>
84 std::vector<double>& error_contrib,
double scale = 1.);
96 template<
class FDC,
class DWRC>
99 std::vector<double>&,
double scale = 1.);
111 return problem_type_;
117 return problem_type_num_;
135 problem_type_num_ = i;
139 std::string problem_type_, algo_type_;
141 unsigned int problem_type_num_;
148 template<
typename PDE>
149 template<
class EDC,
class DWRC>
152 const DWRC& dwrc, std::vector<double>& error,
double scale)
154 Assert(GetType() ==
"error_evaluation", ExcInternalError());
159 if (dwrc.GetWeightComputation()
162 EDC* edc_w = ExtractEDC<EDC>(dwrc);
163 switch (dwrc.GetEETerms())
166 GetPDE().StrongElementResidual(edc, *edc_w, error[0], scale);
169 GetPDE().StrongElementResidual_U(edc, *edc_w, error[1], scale);
172 GetPDE().StrongElementResidual(edc, *edc_w, error[0], scale);
173 GetPDE().StrongElementResidual_U(edc, *edc_w, error[1], scale);
176 GetPDE().StrongElementResidual(edc, *edc_w, error[0], scale);
177 GetPDE().StrongElementResidual_U(edc, *edc_w, error[1], scale);
178 GetPDE().StrongElementResidual_Control(edc, *edc_w, error[2], scale);
182 "ProblemContainerInternal::ElementErrorContribution");
189 switch (dwrc.GetEETerms())
192 GetPDE().StrongElementResidual(edc, edc, error[0], scale);
195 GetPDE().StrongElementResidual_U(edc, edc, error[1], scale);
198 GetPDE().StrongElementResidual(edc, edc, error[0], scale);
199 GetPDE().StrongElementResidual_U(edc, edc, error[1], scale);
202 GetPDE().StrongElementResidual (edc, edc, error[0], scale);
203 GetPDE().StrongElementResidual_U (edc, edc, error[1], scale);
204 GetPDE().StrongElementResidual_Control(edc, edc, error[2], scale);
208 "ProblemContainerInternal::ElementErrorContribution");
214 throw DOpEException(
"Not implemented for this WeightComputation.",
215 "ProblemContainerInternal::ElementErrorContribution");
220 throw DOpEException(
"Not implemented for this ResidualEvaluation.",
221 "ProblemContainerInternal::ElementErrorContribution");
227 template<
typename PDE>
228 template<
class FDC,
class DWRC>
231 const DWRC& dwrc, std::vector<double>& error,
double scale)
233 Assert(GetType() ==
"error_evaluation", ExcInternalError());
238 if (dwrc.GetWeightComputation()
241 FDC* fdc_w = ExtractFDC<FDC>(dwrc);
242 switch (dwrc.GetEETerms())
245 GetPDE().StrongFaceResidual(fdc, *fdc_w, error[0], scale);
248 GetPDE().StrongFaceResidual_U(fdc, *fdc_w, error[1], scale);
251 GetPDE().StrongFaceResidual(fdc, *fdc_w, error[0], scale);
252 GetPDE().StrongFaceResidual_U(fdc, *fdc_w, error[1], scale);
255 GetPDE().StrongFaceResidual (fdc, *fdc_w, error[0], scale);
256 GetPDE().StrongFaceResidual_U (fdc, *fdc_w, error[1], scale);
257 GetPDE().StrongFaceResidual_Control(fdc, *fdc_w, error[2], scale);
261 "ProblemContainerInternal::FaceErrorContribution");
267 switch (dwrc.GetEETerms())
270 GetPDE().StrongFaceResidual(fdc, fdc, error[0], scale);
273 GetPDE().StrongFaceResidual_U(fdc, fdc, error[1], scale);
276 GetPDE().StrongFaceResidual(fdc, fdc, error[0], scale);
277 GetPDE().StrongFaceResidual_U(fdc, fdc, error[1], scale);
280 GetPDE().StrongFaceResidual (fdc, fdc, error[0], scale);
281 GetPDE().StrongFaceResidual_U (fdc, fdc, error[1], scale);
282 GetPDE().StrongFaceResidual_Control(fdc, fdc, error[2], scale);
286 "ProblemContainerInternal::FaceErrorContribution");
293 throw DOpEException(
"Not implemented for this WeightComputation.",
294 "ProblemContainerInternal::FaceErrorContribution");
299 throw DOpEException(
"Not implemented for this ResidualEvaluation.",
300 "ProblemContainerInternal::FaceErrorContribution");
306 template<
typename PDE>
307 template<
class FDC,
class DWRC>
310 const DWRC& dwrc, std::vector<double>& error,
double scale)
312 Assert(GetType() ==
"error_evaluation", ExcInternalError());
316 if (dwrc.GetWeightComputation()
319 FDC* fdc_w = ExtractFDC<FDC>(dwrc);
320 switch (dwrc.GetEETerms())
323 GetPDE().StrongBoundaryResidual(fdc, *fdc_w, error[0], scale);
326 GetPDE().StrongBoundaryResidual_U(fdc, *fdc_w, error[1], scale);
329 GetPDE().StrongBoundaryResidual(fdc, *fdc_w, error[0], scale);
330 GetPDE().StrongBoundaryResidual_U(fdc, *fdc_w, error[1], scale);
333 GetPDE().StrongBoundaryResidual (fdc, *fdc_w, error[0], scale);
334 GetPDE().StrongBoundaryResidual_U (fdc, *fdc_w, error[1], scale);
335 GetPDE().StrongBoundaryResidual_Control(fdc, *fdc_w, error[2], scale);
339 "ProblemContainerInternal::BoundaryErrorContribution");
345 switch (dwrc.GetEETerms())
348 GetPDE().StrongBoundaryResidual(fdc, fdc, error[0], scale);
351 GetPDE().StrongBoundaryResidual_U(fdc, fdc, error[1], scale);
354 GetPDE().StrongBoundaryResidual(fdc, fdc, error[0], scale);
355 GetPDE().StrongBoundaryResidual_U(fdc, fdc, error[1], scale);
358 GetPDE().StrongBoundaryResidual (fdc, fdc, error[0], scale);
359 GetPDE().StrongBoundaryResidual_U (fdc, fdc, error[1], scale);
360 GetPDE().StrongBoundaryResidual_Control(fdc, fdc, error[2], scale);
364 "ProblemContainerInternal::BoundaryErrorContribution");
370 throw DOpEException(
"Not implemented for this WeightComputation.",
371 "ProblemContainerInternal::BoundaryErrorContribution");
377 throw DOpEException(
"Not implemented for this ResidualEvaluation.",
378 "ProblemContainerInternal::BoundaryErrorContribution");
Definition: dopetypes.h:68
void FaceErrorContribution(const FDC &fdc, const DWRC &dwrc, std::vector< double > &error_contrib, double scale=1.)
Definition: problemcontainer_internal.h:230
std::string GetType() const
Definition: problemcontainer_internal.h:109
Definition: problemcontainer_internal.h:38
Definition: dopetypes.h:68
Definition: dopetypes.h:82
Definition: dopetypes.h:82
const PDE & GetPDE() const
Definition: problemcontainer_internal.h:103
ProblemContainerInternal(PDE &pde)
Definition: problemcontainer_internal.h:41
void SetTypeInternal(std::string a)
Definition: problemcontainer_internal.h:127
void SetTypeNumInternal(unsigned int i)
Definition: problemcontainer_internal.h:133
Definition: dopetypes.h:68
Definition: dopetypes.h:93
void ElementErrorContribution(const EDC &edc, const DWRC &dwrc, std::vector< double > &element_contrib, double scale)
Definition: problemcontainer_internal.h:151
Definition: dopetypes.h:68
unsigned int GetTypeNum() const
Definition: problemcontainer_internal.h:115
void BoundaryErrorContribution(const FDC &dc, const DWRC &dwrc, std::vector< double > &, double scale=1.)
Definition: problemcontainer_internal.h:309
Definition: dopeexception.h:35
PDE & GetPDE()
Definition: problemcontainer_internal.h:122