Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quasi_static_Finite_strain_Quasi_incompressible_ViscoElasticity still uses old way to filter for cells with DataOut #131

Open
bangerth opened this issue Apr 11, 2023 · 0 comments

Comments

@bangerth
Copy link
Member

This program still uses the old way to select which cells to produce output on:

  template<int dim>
  class FilteredDataOut : public DataOut<dim>
  {
  public:
    FilteredDataOut (const unsigned int subdomain_id)
      :
      subdomain_id (subdomain_id)
    {}

    virtual ~FilteredDataOut() {}

    virtual typename DataOut<dim>::cell_iterator
    first_cell ()
    {
      auto cell = this->dofs->begin_active();
      while ((cell != this->dofs->end()) &&
             (cell->subdomain_id() != subdomain_id))
        ++cell;
      return cell;
    }

    virtual typename DataOut<dim>::cell_iterator
    next_cell (const typename DataOut<dim>::cell_iterator &old_cell)
    {
      if (old_cell != this->dofs->end())
        {
          const IteratorFilters::SubdomainEqualTo predicate(subdomain_id);
          return
            ++(FilteredIterator
               <typename DataOut<dim>::cell_iterator>
               (predicate,old_cell));
        }
      else
        return old_cell;
    }

  private:
    const unsigned int subdomain_id;
  };

This needs to be updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant