42 comm.
sum(error_per_cell);
49 const std::map<const System *, SystemNorm> & error_norms,
51 bool estimate_parent_error)
56 for (
unsigned int s = 0; s != equation_systems.
n_systems(); ++s)
60 if (error_norms.find(&sys) == error_norms.end())
63 this->
error_norm = error_norms.find(&sys)->second;
66 if (solution_vectors &&
67 solution_vectors->find(&sys) != solution_vectors->end())
68 solution_vector = solution_vectors->find(&sys)->second;
71 solution_vector, estimate_parent_error);
75 libmesh_assert_equal_to (error_per_cell.size(), system_error_per_cell.size());
77 error_per_cell[i] += system_error_per_cell[i];
80 error_per_cell = system_error_per_cell;
96 bool estimate_parent_error)
101 for (
unsigned int s = 0; s != equation_systems.
n_systems(); ++s)
107 for (
unsigned int v = 0; v !=
n_vars; ++v)
110 if (errors_per_cell.find(std::make_pair(&sys, v)) ==
111 errors_per_cell.end())
115 std::vector<Real> weights(
n_vars, 0.0);
122 if (solution_vectors &&
123 solution_vectors->find(&sys) != solution_vectors->end())
124 solution_vector = solution_vectors->find(&sys)->second;
127 (sys, *errors_per_cell[std::make_pair(&sys, v)],
128 solution_vector, estimate_parent_error);
virtual void estimate_errors(const EquationSystems &equation_systems, ErrorVector &error_per_cell, const std::map< const System *, SystemNorm > &error_norms, const std::map< const System *, const NumericVector< Number > *> *solution_vectors=nullptr, bool estimate_parent_error=false)
Manages multiples systems of equations.
unsigned int n_systems() const
const T_sys & get_system(const std::string &name) const
IntRange< std::size_t > index_range(const std::vector< T > &vec)
virtual void estimate_error(const System &system, ErrorVector &error_per_cell, const NumericVector< Number > *solution_vector=nullptr, bool estimate_parent_error=false)=0
const unsigned int n_vars
Manages consistently variables, degrees of freedom, and coefficient vectors.
FEMNormType type(unsigned int var) const
std::map< std::pair< const System *, unsigned int >, ErrorVector * > ErrorMap
void reduce_error(std::vector< ErrorVectorReal > &error_per_cell, const Parallel::Communicator &comm) const
unsigned int n_vars() const