Particles with free surface

Hi all,

I am trying to run a lithospheric extension model with free surface and passive particles to track the pT path of the upper crust but the simulation fails either during the initial mesh refinement at timestep 0 or at the start of timestep 1 when I remove the mesh refinement (first lines from the error file are below).

I am using version 2.3.0-pre

Thank you

Moh

An error occurred in line <3272> of file </nobackup/earmgo/aspect_workshop/candi/tmp/unpack/deal.II-v9.2.0/include/deal.II/dofs/dof_accessor.templates.h> in function
    void dealii::DoFCellAccessor<DoFHandlerType, level_dof_access>::get_dof_values(const InputVector &, ForwardIterator, ForwardIterator) const [with InputVector = dealii::TrilinosWrappers::MPI::Vector, ForwardIterator = double *, DoFHandlerType = dealii::DoFHandler<3, 3>, bool level_dof_access = false]
The violated condition was:
    this->is_artificial() == false
Additional information:
    Can't ask for DoF indices on artificial cells.

Moh,
would you be willing to try this again with the current ASPECT development sources? Rene has done a lot of work in this area, and the problem may since have been fixed.
Best
Wolfgang

Hi Moh,

I’m also unsure exactly what the issue is here. The ability to use the particles with the free surface was reintroduced at some point in 2.3.0-pre, but that does not seem to be the issue.

I agree with Wolfgang’s suggestion to update to the most recent master branch and see if that resolves the issue.

In the next week or two I should have some tests done with extension models using active particles, and am happy to share those results when they have run successfully.

Cheers,
John

Hi Wolfgang, John,

Thanks for the reply.

I tried to install the current ASPECT and ran into an issues:

[ 31%] Building CXX object CMakeFiles/aspect.dir/source/material_model/rheology/visco_plastic.cc.o
/home/home02/earmgo/safe/aspect_dir/aspect-2.4.0-pre/source/material_model/diffusion_dislocation.cc(452): error: namespace "std" has no member "make_unique"
            diffusion_creep.parse_parameters(prm, std::make_unique<std::vector<unsigned int>>(n_fields));
                                                       ^

/home/home02/earmgo/safe/aspect_dir/aspect-2.4.0-pre/source/material_model/diffusion_dislocation.cc(452): error: type name is not allowed
            diffusion_creep.parse_parameters(prm, std::make_unique<std::vector<unsigned int>>(n_fields));
                                                                   ^

/home/home02/earmgo/safe/aspect_dir/aspect-2.4.0-pre/source/material_model/diffusion_dislocation.cc(456): error: namespace "std" has no member "make_unique"
            dislocation_creep.parse_parameters(prm, std::make_unique<std::vector<unsigned int>>(n_fields));
                                                         ^

/home/home02/earmgo/safe/aspect_dir/aspect-2.4.0-pre/source/material_model/diffusion_dislocation.cc(456): error: type name is not allowed
            dislocation_creep.parse_parameters(prm, std::make_unique<std::vector<unsigned int>>(n_fields));
                                                                     ^

compilation aborted for /home/home02/earmgo/safe/aspect_dir/aspect-2.4.0-pre/source/material_model/diffusion_dislocation.cc (code 2)
make[2]: *** [CMakeFiles/aspect.dir/source/material_model/diffusion_dislocation.cc.o] Error 2
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/aspect.dir/all] Error 2
make: *** [all] Error 2

It seems to be related to the compiler being c++11 instead of c++14, according to some posts that I found online, but I can’t figure out how to solve it! Any help would be appreciated :slight_smile:.

Hi Moh,

Hmm, you should still be able to build ASPECT using a compiler that does not support C++14 yet. Are you using deal.II version 9.3.0?

John

Hi John,

No I am using deal II 8.2.0, which is the version installed through candi.

Moh

Hi Moh,

we will be moving to requiring a c++ 14 compiler in about a week or so, so I don’t think we are going to go back to fix the issues you just reported. If you don’t want to upgrade, you can replace
std::make_unique by std_cxx14::make_unique
There are maybe 6-7 places in source/ that needs fixing. I think that is all that is required to compile with c++11.

Best,
Timo

Hi Timo,

Thanks for the fix. It helped getting the compilation to 94% but now I am getting this error:

[ 94%] Building CXX object CMakeFiles/aspect.dir/contrib/world_builder/source/features/subducting_plate_models/temperature/linear.cc.o
/home/home02/earmgo/safe/aspect_dir/aspect-2.4.0-pre/unit_tests/parse_map_to_double_array.cc(87): error: name followed by "::" must be a class or namespace name
      auto n_values_per_key = std_cxx14::make_unique<std::vector<unsigned int>>();
                              ^

/home/home02/earmgo/safe/aspect_dir/aspect-2.4.0-pre/unit_tests/parse_map_to_double_array.cc(87): error: expected an identifier
      auto n_values_per_key = std_cxx14::make_unique<std::vector<unsigned int>>();
                                                                 ^

/home/home02/earmgo/safe/aspect_dir/aspect-2.4.0-pre/unit_tests/parse_map_to_double_array.cc(87): error: expected a ";"
      auto n_values_per_key = std_cxx14::make_unique<std::vector<unsigned int>>();
                                                                 ^

In any case, John shared with me one of his test setups using active particles that runs on the 2.3-branch.

I tried to install the current ASPECT and ran into an issues:

[ 31%] Building CXX object
CMakeFiles/aspect.dir/source/material_model/rheology/visco_plastic.cc.o
/home/home02/earmgo/safe/aspect_dir/aspect-2.4.0-pre/source/material_model/diffusion_dislocation.cc(452):
error: namespace “std” has no member “make_unique”
diffusion_creep.parse_parameters(prm, std::make_unique<std::vector<unsigned

(n_fields)); ^

Apparently all developers use compilers that already understand C++14. You can
either wait until this patch is merged
Don't use std::make_unique just yet. by bangerth · Pull Request #4261 · geodynamics/aspect · GitHub
or just replace all of these places by std_cxx14::make_unique.

Best
W.

You might have to add
#include <aspect/compat.h>
to this file.

Hi Wolfgang,

I added the #include <aspect/compat.h> to the unit_tests/parse_map_to_double_array.cc but I still have the same issue (i.e., name followed by “::” must be a class or namespace name).

Concerning my initial issue with the particles, adding diffusivity to the mesh solved the issue. The model has reached 15 Myr so far on the 2.3-branch.

So, I am happy to wait for the cxx14 patch to be merged before compiling the master-branch.

Cheers,
Moh

Mohamed,
the patch I mentioned earlier has been merged. As for this particular file,
just remove everything from the file and leave it empty – you don’t need the
contents of the file.

Best
W.

That worked Thanks Wolfgang.

Moh