I am trying to load an initial composition txt file in a 3D chunk geometry. The file is formated as suggested in Parameter Documentation/Initial composition model/ascii data.
However, every time I ran the test, there was no further progress except to print out the message ‘Loading Ascii data initial file /xx/xx/xx.txt’ on the screen, as if the program were stuck there.
I’ve also tested some more complex initial composition files obtained from open-source sources, and they were loaded smoothly. So far, I can only suspect that there is something wrong with my file, but I can not figure out what is wrong.
When creating the composition file, I only had crustal data consisting of (lon,lat,depth). Therefore, I respectively divided the geometry between the surface and the crust and between the crust and the lithosphere into multiple layers to make up the composition txt. For the .prm file, I just modified the ascii_data_initial_composition_3d_chunk.prm located in $ASPECT_DIR/tests.
I attach the necessary files and hope it helps.
@Xie I don’t have the time right now to actually look whether that seems correct, but running your input files, I get the following error:
--------------------------------------------------------
An error occurred in line <513> of file </home/bangerth/p/deal.II/1/projects/aspect/source/structured_data.cc> in function
void aspect::Utilities::StructuredDataLookup<dim>::load_ascii(const string&, MPI_Comm) [with int dim = 3; std::string = std::__cxx11::basic_string<char>; MPI_Comm = ompi_communicator_t*]
The violated condition was:
old_value == 0. || (std::abs(old_value-temp_data) < 1e-8*std::abs(old_value))
Additional information:
Invalid coordinate in column 1 in row 4 in file
./initial_compositions.txt
This class expects the coordinates to be structured, meaning the
coordinate values in each coordinate direction repeat exactly each
time. This also means each row in the data file has to have the same
number of columns as the first row containing data.
@bangerth Aftering reviewing other authors’ ascii files and the error information you posted above, I guess the problem lies in that the coordinate values in each coordinate direction should be the same for each set. More specifically, for my initial_compositions.txt, in the r direction, every four values consist of one repetable coordinate set, for example, the first set is [2270000, 2343641, 2416922, 2440000], and the second one is [2270000,2343037.5,2416075.0,2440000.0], and so on. They are apprently not the same, which may lead to the error or the loading problem. However, if I correct the coordinate sets, it is hard to say if the corresponding composition field is the one I want, as I expect a composition field with changable crust, and the only thing I can provide is the crustal thickness data.
Although I still did not bypass the above error, I found an alternative way is to use ''ascii data layered". It only requires the coordinates of the interface between different fields. As a test, I ran a simplified simulation in 2D, and it worked.