DOpE
statpdeproblem.h
Go to the documentation of this file.
1 
24 #ifndef STAT_PDE_PROBLEM_H_
25 #define STAT_PDE_PROBLEM_H_
26 
27 #include "pdeprobleminterface.h"
28 #include "integrator.h"
29 #include "parameterreader.h"
30 #include "statevector.h"
31 #include "stateproblem.h"
32 
33 #include <deal.II/lac/vector.h>
34 #include <deal.II/lac/block_sparsity_pattern.h>
35 #include <deal.II/lac/block_sparse_matrix.h>
36 
37 #include "pdeproblemcontainer.h"
38 #include "pdeinterface.h"
39 #include "functionalinterface.h"
40 #include "dirichletdatainterface.h"
41 #include "dopeexception.h"
42 #include "newtonsolver.h"
43 #include "cglinearsolver.h"
44 #include "gmreslinearsolver.h"
45 #include "directlinearsolver.h"
46 #include "solutionextractor.h"
47 
48 #include <deal.II/base/data_out_base.h>
49 #include <deal.II/base/utilities.h>
50 #include <deal.II/numerics/data_out.h>
51 #include <deal.II/numerics/matrix_tools.h>
52 #include <deal.II/numerics/vector_tools.h>
53 #include <deal.II/base/function.h>
54 #include <deal.II/lac/sparse_matrix.h>
55 #include <deal.II/lac/compressed_simple_sparsity_pattern.h>
56 #include <deal.II/lac/block_sparsity_pattern.h>
57 #include <deal.II/lac/sparse_direct.h>
58 
59 #include <fstream>
60 namespace DOpE
61 {
76  template<typename NONLINEARSOLVER, typename INTEGRATOR, typename PROBLEM,
77  typename VECTOR, int dealdim>
78  class StatPDEProblem : public PDEProblemInterface<PROBLEM, VECTOR, dealdim>
79  {
80  public:
93  template<typename INTEGRATORDATACONT>
94  StatPDEProblem(PROBLEM *OP, DOpEtypes::VectorStorageType state_behavior,
95  ParameterReader &param_reader, INTEGRATORDATACONT& idc,
96  int base_priority = 0);
97 
110  template<typename INTEGRATORDATACONT>
111  StatPDEProblem(PROBLEM *OP, DOpEtypes::VectorStorageType state_behavior,
112  ParameterReader &param_reader, INTEGRATORDATACONT& idc1,
113  INTEGRATORDATACONT& idc2, int base_priority = 0);
114 
115  virtual
116  ~StatPDEProblem();
117 
118  /******************************************************/
119 
125  static void
126  declare_params(ParameterReader &param_reader);
127 
128  /******************************************************/
129 
135  void
136  ReInit();
137 
138  /******************************************************/
139 
145  void
147 
148  /******************************************************/
149 
155  void
157 
158  /******************************************************/
159 
177  template<class DWRC, class PDE>
178  void
179  ComputeRefinementIndicators(DWRC& dwrc, PDE& pde);
180 
181  /******************************************************/
182 
188  void
189  StateSizeInfo(std::stringstream& out)
190  {
191  GetU().PrintInfos(out);
192  }
193 
194  /******************************************************/
195 
206  void
207  WriteToFile(const VECTOR &v, std::string name, std::string outfile,
208  std::string dof_type, std::string filetype);
209 
210  /******************************************************/
211 
225  void
226  WriteToFileElementwise(const Vector<double> &v, std::string name,
227  std::string outfile, std::string dof_type, std::string filetype);
228 
229  /******************************************************/
230 
239  void
240  WriteToFile(const ControlVector<VECTOR> &v, std::string name, std::string dof_type);
241 
249  void
250  WriteToFile(const std::vector<double> &/*v*/,
251  std::string /*outfile*/)
252  {
253  abort();
254  }
255 
256  protected:
260  void
262 
263  /******************************************************/
264 
274  void
276 
277  /******************************************************/
281  const StateVector<VECTOR> &
282  GetU() const
283  {
284  return u_;
285  }
288  {
289  return u_;
290  }
294  const StateVector<VECTOR> &
295  GetZForEE() const
296  {
297  return z_for_ee_;
298  }
301  {
302  return z_for_ee_;
303  }
304 
305  NONLINEARSOLVER&
306  GetNonlinearSolver(std::string type);
307  INTEGRATOR&
309  {
310  return integrator_;
311  }
312 
313  const bool&
315  {
316  return build_state_matrix_;
317  }
318 
319  const bool&
321  {
322  return build_adjoint_matrix_;
323  }
324 
325  const bool&
327  {
328  return state_reinit_;
329  }
330 
331  const bool&
333  {
334  return adjoint_reinit_;
335  }
336 
337 
338  bool&
340  {
341  return build_state_matrix_;
342  }
343 
344  bool&
346  {
347  return build_adjoint_matrix_;
348  }
349 
350  bool&
352  {
353  return state_reinit_;
354  }
355 
356  bool&
358  {
359  return adjoint_reinit_;
360  }
361 
362 
363  private:
368  void
369  AddUDD()
370  {
371  for (auto it = this->GetUserDomainData().begin();
372  it != this->GetUserDomainData().end(); it++)
373  {
374  this->GetIntegrator().AddDomainData(it->first, it->second);
375  }
376  }
377 
382  void
383  DeleteUDD()
384  {
385  for (auto it = this->GetUserDomainData().begin();
386  it != this->GetUserDomainData().end(); it++)
387  {
388  this->GetIntegrator().DeleteDomainData(it->first);
389  }
390  }
391 
392  StateVector<VECTOR> u_;
393  StateVector<VECTOR> z_for_ee_;
394 
395  INTEGRATOR integrator_;
396  NONLINEARSOLVER nonlinear_state_solver_;
397  NONLINEARSOLVER nonlinear_adjoint_solver_;
398 
399  bool build_state_matrix_;
400  bool build_adjoint_matrix_;
401  bool state_reinit_;
402  bool adjoint_reinit_;
403 
404  int n_patches_;
405 
406  friend class SolutionExtractor<
407  StatPDEProblem<NONLINEARSOLVER, INTEGRATOR, PROBLEM, VECTOR, dealdim>,
408  VECTOR> ;
409  };
410 
411  /*************************************************************************/
412  /*****************************IMPLEMENTATION******************************/
413  /*************************************************************************/
414  using namespace dealii;
415 
416  /******************************************************/
417  template<typename NONLINEARSOLVER, typename INTEGRATOR, typename PROBLEM,
418  typename VECTOR, int dealdim>
419  void
421  ParameterReader &param_reader)
422  {
423  NONLINEARSOLVER::declare_params(param_reader);
424  param_reader.SetSubsection("output parameters");
425  param_reader.declare_entry("number of patches", "0",
426  Patterns::Integer(0));
427 
428  }
429  /******************************************************/
430 
431  template<typename NONLINEARSOLVER, typename INTEGRATOR, typename PROBLEM,
432  typename VECTOR, int dealdim>
433  template<typename INTEGRATORDATACONT>
435  PROBLEM *OP, DOpEtypes::VectorStorageType state_behavior,
436  ParameterReader &param_reader, INTEGRATORDATACONT& idc,
437  int base_priority)
438  : PDEProblemInterface<PROBLEM, VECTOR, dealdim>(OP, base_priority), u_(
439  OP->GetSpaceTimeHandler(), state_behavior, param_reader), z_for_ee_(
440  OP->GetSpaceTimeHandler(), state_behavior, param_reader), integrator_(
441  idc), nonlinear_state_solver_(integrator_, param_reader), nonlinear_adjoint_solver_(
442  integrator_, param_reader)
443  {
444  param_reader.SetSubsection("output parameters");
445  n_patches_ = param_reader.get_integer("number of patches");
446  //PDEProblems should be ReInited
447  {
448  state_reinit_ = true;
449  adjoint_reinit_ = true;
450  }
451  }
452 
453  template<typename NONLINEARSOLVER, typename INTEGRATOR, typename PROBLEM,
454  typename VECTOR, int dealdim>
455  template<typename INTEGRATORDATACONT>
457  PROBLEM *OP, DOpEtypes::VectorStorageType state_behavior,
458  ParameterReader &param_reader, INTEGRATORDATACONT& idc,
459  INTEGRATORDATACONT& idc2, int base_priority)
460  : PDEProblemInterface<PROBLEM, VECTOR, dealdim>(OP, base_priority), u_(
461  OP->GetSpaceTimeHandler(), state_behavior, param_reader), z_for_ee_(
462  OP->GetSpaceTimeHandler(), state_behavior, param_reader), integrator_(
463  idc, idc2), nonlinear_state_solver_(integrator_, param_reader), nonlinear_adjoint_solver_(
464  integrator_, param_reader)
465  {
466  //PDEProblems should be ReInited
467  {
468  state_reinit_ = true;
469  adjoint_reinit_ = true;
470  }
471  }
472 
473  /******************************************************/
474 
475  template<typename NONLINEARSOLVER, typename INTEGRATOR, typename PROBLEM,
476  typename VECTOR, int dealdim>
478  {
479  }
480 
481  /******************************************************/
482 
483  template<typename NONLINEARSOLVER, typename INTEGRATOR, typename PROBLEM,
484  typename VECTOR, int dealdim>
485  NONLINEARSOLVER&
487  std::string type)
488  {
489  if (type == "state")
490  {
491  return nonlinear_state_solver_;
492  }
493  else if (type == "adjoint_for_ee")
494  {
495  return nonlinear_adjoint_solver_;
496  }
497  else
498  {
499  throw DOpEException("No Solver for Problem type:`" + type + "' found",
500  "StatReducedProblem::GetNonlinearSolver");
501 
502  }
503  }
504 
505  /******************************************************/
506 
507  template<typename NONLINEARSOLVER, typename INTEGRATOR, typename PROBLEM,
508  typename VECTOR, int dealdim>
509  void
511  {
513 
514  //Some Solvers must be reinited when called
515  // Better we have subproblems, so that solver can be reinited here
516  {
517  state_reinit_ = true;
518  adjoint_reinit_ = true;
519  }
520 
521  build_state_matrix_ = true;
522  build_adjoint_matrix_ = true;
523 
524  GetU().ReInit();
525  GetZForEE().ReInit();
526  }
527 
528  /******************************************************/
529 
530  template<typename NONLINEARSOLVER, typename INTEGRATOR, typename PROBLEM,
531  typename VECTOR, int dealdim>
532  void
534  {
535  this->InitializeFunctionalValues(this->GetProblem()->GetNFunctionals());
536  this->GetOutputHandler()->Write("Computing State Solution:",
537  4 + this->GetBasePriority());
538 
539  this->SetProblemType("state");
540  auto& problem = this->GetProblem()->GetStateProblem();
541  if (state_reinit_ == true)
542  {
543  GetNonlinearSolver("state").ReInit(problem);
544  state_reinit_ = false;
545  }
546 
547  this->GetProblem()->AddAuxiliaryToIntegrator(this->GetIntegrator());
548  AddUDD();
549  build_state_matrix_ = this->GetNonlinearSolver("state").NonlinearSolve(
550  problem, (GetU().GetSpacialVector()), true, build_state_matrix_);
551  DeleteUDD();
552 
553  this->GetProblem()->DeleteAuxiliaryFromIntegrator(this->GetIntegrator());
554 
555  this->GetOutputHandler()->Write((GetU().GetSpacialVector()),
556  "State" + this->GetPostIndex(), problem.GetDoFType());
557 
558  }
559 
560  /******************************************************/
561 
562  template<typename NONLINEARSOLVER, typename INTEGRATOR, typename PROBLEM,
563  typename VECTOR, int dealdim>
564  void
566  DOpEtypes::WeightComputation weight_comp)
567  {
568  this->GetOutputHandler()->Write("Computing Dual for Error Estimation:",
569  4 + this->GetBasePriority());
570  if (weight_comp == DOpEtypes::higher_order_interpolation)
571  {
572  this->SetProblemType("adjoint_for_ee");
573  }
574  else
575  {
576  throw DOpEException("Unknown WeightComputation",
577  "StatPDEProblem::ComputeDualForErrorEstimation");
578  }
579 
580  // auto& problem = this->GetProblem()->GetStateProblem();//Hier ist adjoint problem einzufuegen
581  auto& problem = *(this->GetProblem());
582  if (adjoint_reinit_ == true)
583  {
584  GetNonlinearSolver("adjoint_for_ee").ReInit(problem);
585  adjoint_reinit_ = false;
586  }
587 
588  this->GetProblem()->AddAuxiliaryToIntegrator(this->GetIntegrator());
589 
590  this->GetIntegrator().AddDomainData("state",
591  &(GetU().GetSpacialVector()));
592  AddUDD();
593 
594  build_adjoint_matrix_ =
595  this->GetNonlinearSolver("adjoint_for_ee").NonlinearSolve(problem,
596  (GetZForEE().GetSpacialVector()), true, build_adjoint_matrix_);
597 
598  this->GetIntegrator().DeleteDomainData("state");
599  DeleteUDD();
600 
601  this->GetProblem()->DeleteAuxiliaryFromIntegrator(this->GetIntegrator());
602 
603  this->GetOutputHandler()->Write((GetZForEE().GetSpacialVector()),
604  "Adjoint_for_ee" + this->GetPostIndex(), problem.GetDoFType());
605 
606  }
607 
608  /******************************************************/
609 
610  template<typename NONLINEARSOLVER, typename INTEGRATOR, typename PROBLEM,
611  typename VECTOR, int dealdim>
612  void
614  {
615  this->ComputeReducedState();
616 
617  this->GetOutputHandler()->Write("Computing Functionals:",
618  4 + this->GetBasePriority());
619 
620  this->GetProblem()->AddAuxiliaryToIntegrator(this->GetIntegrator());
621 
622  this->GetIntegrator().AddDomainData("state",
623  &(GetU().GetSpacialVector()));
624  AddUDD();
625 
626  for (unsigned int i = 0; i < this->GetProblem()->GetNFunctionals(); i++)
627  {
628  double ret = 0;
629  bool found = false;
630 
631  this->SetProblemType("aux_functional", i);
632  if (this->GetProblem()->GetFunctionalType().find("domain")
633  != std::string::npos)
634  {
635  found = true;
636  ret += this->GetIntegrator().ComputeDomainScalar(
637  *(this->GetProblem()));
638  }
639  if (this->GetProblem()->GetFunctionalType().find("point")
640  != std::string::npos)
641  {
642  found = true;
643  ret += this->GetIntegrator().ComputePointScalar(
644  *(this->GetProblem()));
645  }
646  if (this->GetProblem()->GetFunctionalType().find("boundary")
647  != std::string::npos)
648  {
649  found = true;
650  ret += this->GetIntegrator().ComputeBoundaryScalar(
651  *(this->GetProblem()));
652  }
653  if (this->GetProblem()->GetFunctionalType().find("face")
654  != std::string::npos)
655  {
656  found = true;
657  ret += this->GetIntegrator().ComputeFaceScalar(*(this->GetProblem()));
658  }
659 
660  if (!found)
661  {
662  throw DOpEException(
663  "Unknown Functional Type: "
664  + this->GetProblem()->GetFunctionalType(),
665  "StatPDEProblem::ComputeReducedFunctionals");
666  }
667  this->GetFunctionalValues()[i].push_back(ret);
668  std::stringstream out;
669  this->GetOutputHandler()->InitOut(out);
670  out << this->GetProblem()->GetFunctionalName() << ": " << ret;
671  this->GetOutputHandler()->Write(out, 2 + this->GetBasePriority());
672  }
673 
674  this->GetIntegrator().DeleteDomainData("state");
675  DeleteUDD();
676 
677  this->GetProblem()->DeleteAuxiliaryFromIntegrator(this->GetIntegrator());
678  }
679 
680  /******************************************************/
681 
682  template<typename NONLINEARSOLVER, typename INTEGRATOR, typename PROBLEM,
683  typename VECTOR, int dealdim>
684  void
686  const StateVector<VECTOR>& st_u)
687  {
688  this->InitializeFunctionalValues(this->GetProblem()->GetNFunctionals());
689  GetU() = st_u;
690 
691  this->GetOutputHandler()->Write("Computing Functionals:",
692  4 + this->GetBasePriority());
693 
694  this->GetProblem()->AddAuxiliaryToIntegrator(this->GetIntegrator());
695 
696  this->GetIntegrator().AddDomainData("state",
697  &(GetU().GetSpacialVector()));
698  AddUDD();
699 
700  for (unsigned int i = 0; i < this->GetProblem()->GetNFunctionals(); i++)
701  {
702  double ret = 0;
703  bool found = false;
704 
705  this->SetProblemType("aux_functional", i);
706  if (this->GetProblem()->GetFunctionalType().find("domain")
707  != std::string::npos)
708  {
709  found = true;
710  ret += this->GetIntegrator().ComputeDomainScalar(
711  *(this->GetProblem()));
712  }
713  if (this->GetProblem()->GetFunctionalType().find("point")
714  != std::string::npos)
715  {
716  found = true;
717  ret += this->GetIntegrator().ComputePointScalar(
718  *(this->GetProblem()));
719  }
720  if (this->GetProblem()->GetFunctionalType().find("boundary")
721  != std::string::npos)
722  {
723  found = true;
724  ret += this->GetIntegrator().ComputeBoundaryScalar(
725  *(this->GetProblem()));
726  }
727  if (this->GetProblem()->GetFunctionalType().find("face")
728  != std::string::npos)
729  {
730  found = true;
731  ret += this->GetIntegrator().ComputeFaceScalar(*(this->GetProblem()));
732  }
733 
734  if (!found)
735  {
736  throw DOpEException(
737  "Unknown Functional Type: "
738  + this->GetProblem()->GetFunctionalType(),
739  "StatPDEProblem::ComputeReducedFunctionals");
740  }
741  this->GetFunctionalValues()[i].push_back(ret);
742  std::stringstream out;
743  this->GetOutputHandler()->InitOut(out);
744  out << this->GetProblem()->GetFunctionalName() << ": " << ret;
745  this->GetOutputHandler()->Write(out, 2 + this->GetBasePriority());
746  }
747 
748  this->GetIntegrator().DeleteDomainData("state");
749  DeleteUDD();
750 
751  this->GetProblem()->DeleteAuxiliaryFromIntegrator(this->GetIntegrator());
752  }
753 
754  /******************************************************/
755 
756  template<typename NONLINEARSOLVER, typename INTEGRATOR, typename PROBLEM,
757  typename VECTOR, int dealdim>
758  template<class DWRC, class PDE>
759  void
761  DWRC& dwrc, PDE& pde)
762  {
763  //Attach the ResidualModifier to the PDE.
764  pde.ResidualModifier = boost::bind<void>(
765  boost::mem_fn(&DWRC::ResidualModifier), boost::ref(dwrc), _1);
766  pde.VectorResidualModifier = boost::bind<void>(
767  boost::mem_fn(&DWRC::VectorResidualModifier), boost::ref(dwrc), _1);
768  //first we reinit the dwrdatacontainer (this
769  //sets the weight-vectors to their correct length)
770  const unsigned int n_elements =
771  this->GetProblem()->GetSpaceTimeHandler()->GetStateDoFHandler().get_tria().n_active_cells();
772  dwrc.ReInit(n_elements);
773  //If we need the dual solution, compute it
774  if (dwrc.NeedDual())
775  this->ComputeDualForErrorEstimation(dwrc.GetWeightComputation());
776 
777  //some output
778  this->GetOutputHandler()->Write("Computing Error Indicators:",
779  4 + this->GetBasePriority());
780 
781  this->GetProblem()->AddAuxiliaryToIntegrator(this->GetIntegrator());
782 
783  //add the primal and (if needed) dual solution to the integrator
784  this->GetIntegrator().AddDomainData("state",
785  &(GetU().GetSpacialVector()));
786  if (dwrc.NeedDual())
787  this->GetIntegrator().AddDomainData("adjoint_for_ee",
788  &(GetZForEE().GetSpacialVector()));
789  AddUDD();
790 
791  this->SetProblemType("error_evaluation");
792 
793  //prepare the weights...
794  dwrc.PrepareWeights(GetU(), GetZForEE());
795 
796  //now we finally compute the refinement indicators
797  this->GetIntegrator().ComputeRefinementIndicators(*this->GetProblem(),
798  dwrc);
799 
800  // release the lock on the refinement indicators (see dwrcontainer.h)
801  dwrc.ReleaseLock();
802 
803  const float error = dwrc.GetError();
804 
805  // clear the data
806  dwrc.ClearWeightData();
807  this->GetIntegrator().DeleteDomainData("state");
808  if (dwrc.NeedDual())
809  this->GetIntegrator().DeleteDomainData("adjoint_for_ee");
810  DeleteUDD();
811  this->GetProblem()->DeleteAuxiliaryFromIntegrator(
812  this->GetIntegrator());
813 
814  std::stringstream out;
815  this->GetOutputHandler()->InitOut(out);
816  out << "Error estimate using " << dwrc.GetName();
817  if (dwrc.NeedDual())
818  out << " for the " << this->GetProblem()->GetFunctionalName();
819  out << ": " << error;
820  this->GetOutputHandler()->Write(out, 2 + this->GetBasePriority());
821  this->GetOutputHandler()->WriteElementwise(dwrc.GetErrorIndicators(),
822  "Error_Indicators" + this->GetPostIndex(),
823  this->GetProblem()->GetDoFType());
824 
825  }
826 
827  /******************************************************/
828 
829  template<typename NONLINEARSOLVER, typename INTEGRATOR, typename PROBLEM,
830  typename VECTOR, int dealdim>
831  void
833  const Vector<double> &v, std::string name, std::string outfile,
834  std::string dof_type, std::string filetype)
835  {
836  if (dof_type == "state")
837  {
838  auto& data_out =
839  this->GetProblem()->GetSpaceTimeHandler()->GetDataOut();
840  data_out.attach_dof_handler(
841  this->GetProblem()->GetSpaceTimeHandler()->GetStateDoFHandler());
842 
843  data_out.add_data_vector(v, name);
844  data_out.build_patches(n_patches_);
845 
846  std::ofstream output(outfile.c_str());
847 
848  if (filetype == ".vtk")
849  {
850  data_out.write_vtk(output);
851  }
852  else
853  {
854  throw DOpEException(
855  "Don't know how to write filetype `" + filetype + "'!",
856  "StatPDEProblem::WriteToFileElementwise");
857  }
858  data_out.clear();
859  }
860  else
861  {
862  throw DOpEException("No such DoFHandler `" + dof_type + "'!",
863  "StatPDEProblem::WriteToFileElementwise");
864  }
865  }
866 
867  /******************************************************/
868 
869  template<typename NONLINEARSOLVER, typename INTEGRATOR, typename PROBLEM,
870  typename VECTOR, int dealdim>
871  void
873  const VECTOR &v, std::string name, std::string outfile,
874  std::string dof_type, std::string filetype)
875  {
876  if (dof_type == "state")
877  {
878  auto& data_out =
879  this->GetProblem()->GetSpaceTimeHandler()->GetDataOut();
880  data_out.attach_dof_handler(
881  this->GetProblem()->GetSpaceTimeHandler()->GetStateDoFHandler());
882 
883  data_out.add_data_vector(v, name);
884  //TODO: mapping[0] is a workaround, as deal does not support interpolate
885  // boundary_values with a mapping collection at this point.
886  data_out.build_patches(
887  this->GetProblem()->GetSpaceTimeHandler()->GetMapping()[0]);
888 
889  std::ofstream output(outfile.c_str());
890 
891  if (filetype == ".vtk")
892  {
893  data_out.write_vtk(output);
894  }
895  else if (filetype == ".gpl")
896  {
897  data_out.write_gnuplot(output);
898  }
899  else
900  {
901  throw DOpEException(
902  "Don't know how to write filetype `" + filetype + "'!",
903  "StatPDEProblem::WriteToFile");
904  }
905  data_out.clear();
906  }
907  else
908  {
909  throw DOpEException("No such DoFHandler `" + dof_type + "'!",
910  "StatPDEProblem::WriteToFile");
911  }
912  }
913 
914  /******************************************************/
915 
916  template<typename NONLINEARSOLVER, typename INTEGRATOR, typename PROBLEM,
917  typename VECTOR, int dealdim>
918  void
920  const ControlVector<VECTOR> &/*v*/, std::string /*name*/, std::string /*dof_type*/)
921  {
922  throw DOpEException("This Problem does not support ControlVectors","StatPDEProblem::WriteToFile");
923  }
924 }
925 #endif
StateVector< VECTOR > & GetU()
Definition: statpdeproblem.h:287
void StateSizeInfo(std::stringstream &out)
Definition: statpdeproblem.h:189
void WriteToFileElementwise(const Vector< double > &v, std::string name, std::string outfile, std::string dof_type, std::string filetype)
Definition: statpdeproblem.h:832
Definition: statpdeproblem.h:78
void ComputeReducedFunctionals()
Definition: statpdeproblem.h:613
void WriteToFile(const std::vector< double > &, std::string)
Definition: statpdeproblem.h:250
Definition: parameterreader.h:36
const bool & GetBuildAdjointMatrix() const
Definition: statpdeproblem.h:320
INTEGRATOR & GetIntegrator()
Definition: statpdeproblem.h:308
const StateVector< VECTOR > & GetZForEE() const
Definition: statpdeproblem.h:295
const bool & GetStateReinit() const
Definition: statpdeproblem.h:326
void declare_entry(const std::string &entry, const std::string &default_value, const Patterns::PatternBase &pattern=Patterns::Anything(), const std::string &documentation=std::string())
Definition: parameterreader.h:98
const bool & GetBuildStateMatrix() const
Definition: statpdeproblem.h:314
NONLINEARSOLVER & GetNonlinearSolver(std::string type)
Definition: statpdeproblem.h:486
Definition: controlvector.h:49
Definition: pdeprobleminterface.h:53
StateVector< VECTOR > & GetZForEE()
Definition: statpdeproblem.h:300
bool & GetBuildAdjointMatrix()
Definition: statpdeproblem.h:345
static void declare_params(ParameterReader &param_reader)
Definition: statpdeproblem.h:420
Definition: statevector.h:50
bool & GetStateReinit()
Definition: statpdeproblem.h:351
const StateVector< VECTOR > & GetU() const
Definition: statpdeproblem.h:282
bool & GetAdjointReinit()
Definition: statpdeproblem.h:357
void WriteToFile(const VECTOR &v, std::string name, std::string outfile, std::string dof_type, std::string filetype)
Definition: statpdeproblem.h:872
virtual ~StatPDEProblem()
Definition: statpdeproblem.h:477
void ComputeRefinementIndicators(DWRC &dwrc, PDE &pde)
Definition: statpdeproblem.h:760
int get_integer(const std::string &entry_name)
Definition: parameterreader.h:126
VectorStorageType
Definition: dopetypes.h:120
void ComputeDualForErrorEstimation(DOpEtypes::WeightComputation)
Definition: statpdeproblem.h:565
void SetSubsection(const std::string subsection)
Definition: parameterreader.h:93
void ReInit()
Definition: statpdeproblem.h:510
WeightComputation
Definition: dopetypes.h:80
const std::map< std::string, const VECTOR * > & GetUserDomainData() const
Definition: reducedprobleminterface.h:300
bool & GetBuildStateMatrix()
Definition: statpdeproblem.h:339
StatPDEProblem(PROBLEM *OP, DOpEtypes::VectorStorageType state_behavior, ParameterReader &param_reader, INTEGRATORDATACONT &idc, int base_priority=0)
Definition: statpdeproblem.h:434
const bool & GetAdjointReinit() const
Definition: statpdeproblem.h:332
void ComputeReducedState()
Definition: statpdeproblem.h:533
Definition: dopeexception.h:35