Impossible to use ASCII for setting initial composition in a 2D Spherical Shell

Dear developers
I wanted to replicate a simulation about core accretion in a primordial earth, something like this
paper

To do so i’m using the steinberger model in a 2d spherical shell with 2 compositional fields (my FeO little spheres and my density field, to replicate this:

I can proceed with 2 methods:

  1. create a mega function to add all the spheres
  2. Using the Ascii method like the Jellyfish cookboock

The point is that both don’t work. I tried to use the first solution using the function that python gave to me and ASPECT says that “the function is too long”, something like 400 lines, and i can understand that, but i don’t understand why i cannot use the second solution.

I created 2 python scripts: one that wrote an ASCII file in the exact same format of the Jellyfish example (cartesian coordinates) and one that uses polar coordinates (like the temperature ascii tests that are present in the test folder of ASPECT)

Both of them doesn’t works, ASPECT says:

francyrad@MacBook-Pro-di-Francesco-3 core % mpirun -np 1 aspect quarter_core_ascii.prm
-----------------------------------------------------------------------------
--                             This is ASPECT                              --
-- The Advanced Solver for Planetary Evolution, Convection, and Tectonics. --
-----------------------------------------------------------------------------
--     . version 2.6.0-pre
--     . using deal.II 9.5.1
--     .       with 32 bit indices and vectorization level 0 (64 bits)
--     . using Trilinos 13.2.0
--     . using p4est 2.3.2
--     . running in DEBUG mode
--     . running with 1 MPI process
-----------------------------------------------------------------------------


   Loading Ascii data initial file /Users/francyrad/Documents/aspect_updated/data/initial-composition/ascii-data/test/cartesian_function.txt.

---------------------------------------------------------
TimerOutput objects finalize timed values printed to the
screen by communicating over MPI in their destructors.
Since an exception is currently uncaught, this
synchronization (and subsequent output) will be skipped
to avoid a possible deadlock.
---------------------------------------------------------


----------------------------------------------------
Exception 'ExcMessage("ERROR: The number of columns in the data file " + filename + " is incorrect. It needs to have " + Utilities::int_to_string(column_names.size()+dim) + " columns, but the first row has " + Utilities::int_to_string(number_of_entries) + " columns.")' on rank 0 on processing: 

--------------------------------------------------------
An error occurred in line <492> of file </Users/francyrad/Documents/aspect_updated/source/structured_data.cc> in function
    void aspect::Utilities::StructuredDataLookup<2>::load_ascii(const std::string &, const MPI_Comm) [dim = 2]
The violated condition was: 
    (number_of_entries) == column_names.size()+dim
Additional information: 
    ERROR: The number of columns in the data file
    /Users/francyrad/Documents/aspect_updated/data/initial-composition/ascii-data/test/cartesian_function.txt
    is incorrect. It needs to have 4 columns, but the first row has 3
    columns.

Stacktrace:
-----------
#0  2   aspect                              0x00000001048838b0 _ZN6aspect9Utilities20StructuredDataLookupILi2EE10load_asciiERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEP19ompi_communicator_t + 4724: 2   aspect                              0x00000001048838b0 _ZN6aspect9Utilities20StructuredDataLookupILi2EE10load_asciiERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEP19ompi_communicator_t 
#1  3   aspect                              0x0000000104892b90 _ZN6aspect9Utilities16AsciiDataInitialILi2EE10initializeEj + 648: 3   aspect                              0x0000000104892b90 _ZN6aspect9Utilities16AsciiDataInitialILi2EE10initializeEj 
#2  4   aspect                              0x0000000105114774 _ZN6aspect18InitialComposition7ManagerILi2EE16parse_parametersERN6dealii16ParameterHandlerE + 1076: 4   aspect                              0x0000000105114774 _ZN6aspect18InitialComposition7ManagerILi2EE16parse_parametersERN6dealii16ParameterHandlerE 
#3  5   aspect                              0x0000000104786b40 _ZN6aspect9SimulatorILi2EEC2EP19ompi_communicator_tRN6dealii16ParameterHandlerE + 5276: 5   aspect                              0x0000000104786b40 _ZN6aspect9SimulatorILi2EEC2EP19ompi_communicator_tRN6dealii16ParameterHandlerE 
#4  6   aspect                              0x00000001050e7a44 _Z13run_simulatorILi2EEvRKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEES8_bbb + 364: 6   aspect                              0x00000001050e7a44 _Z13run_simulatorILi2EEvRKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEES8_bbb 
#5  7   aspect                              0x00000001050e73ac main + 2296: 7   aspect                              0x00000001050e73ac main 
#6  8   dyld                                0x00000001801e10e0 start + 2360: 8   dyld                                0x00000001801e10e0 start 
--------------------------------------------------------

Aborting!
----------------------------------------------------
--------------------------------------------------------------------------
MPI_ABORT was invoked on rank 0 in communicator MPI_COMM_WORLD
with errorcode 1.

NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.
You may or may not see output from other processes, depending on
exactly when Open MPI kills them.
--------------------------------------------------------------------------
francyrad@MacBook-Pro-di-Francesco-3 core % 

It’s like for 2D spherical shell i’m missing one more column, but which one? I ask help because in the test folder there are not other examples. It fails also if I try to run the jelly.txt. I’d be happy to do a cookbook about that if i can solve.

Thank you for the availability, I hope you passed a nice Christmas

Francesco

Have a look at the “points” and “columns” lines and make sure that they give the correct points in each dimension and names of each column.

Best wishes,
Bob