Skip to content

Commit c618ffc

Browse files
authored
Merge pull request #6769 from tjhei/layered-structured-data-remove-datadir
AsciiDataLayered: remove redundant data_dir
2 parents 5c249f4 + 17146f0 commit c618ffc

File tree

2 files changed

+1
-25
lines changed

2 files changed

+1
-25
lines changed

include/aspect/structured_data.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -685,12 +685,6 @@ namespace aspect
685685
std::vector<std::unique_ptr<aspect::Utilities::StructuredDataLookup<dim-1>>> lookups;
686686

687687
private:
688-
689-
/**
690-
* Directory in which the data files are present.
691-
*/
692-
std::string data_directory;
693-
694688
/**
695689
* Filenames of data files.
696690
*/

source/structured_data.cc

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1589,7 +1589,7 @@ namespace aspect
15891589
number_of_layer_boundaries = data_file_names.size();
15901590
for (unsigned int i=0; i<number_of_layer_boundaries; ++i)
15911591
{
1592-
const std::string filename = data_directory + data_file_names[i];
1592+
const std::string filename = this->data_directory + data_file_names[i];
15931593
AssertThrow(Utilities::fexists(filename, this->get_mpi_communicator()) || filename_is_url(filename),
15941594
ExcMessage (std::string("Ascii data file <")
15951595
+
@@ -1677,20 +1677,6 @@ namespace aspect
16771677

16781678
prm.enter_subsection (subsection_name);
16791679
{
1680-
prm.declare_entry ("Data directory",
1681-
default_directory,
1682-
Patterns::DirectoryName (),
1683-
"The name of a directory that contains the model data. This path "
1684-
"may either be absolute (if starting with a `/') or relative to "
1685-
"the current directory. The path may also include the special "
1686-
"text `$ASPECT_SOURCE_DIR' which will be interpreted as the path "
1687-
"in which the ASPECT source files were located when ASPECT was "
1688-
"compiled. This interpretation allows, for example, to reference "
1689-
"files located in the `data/' subdirectory of ASPECT. A trailing "
1690-
"slash at the end of the directory path is optional; the plugin "
1691-
"will automatically append a '/' when the parameters are parsed if "
1692-
"it is missing. ");
1693-
16941680
prm.declare_entry ("Data file names",
16951681
default_filename,
16961682
Patterns::List (Patterns::Anything()),
@@ -1719,10 +1705,6 @@ namespace aspect
17191705

17201706
prm.enter_subsection(subsection_name);
17211707
{
1722-
data_directory = Utilities::expand_ASPECT_SOURCE_DIR(prm.get ("Data directory"));
1723-
// ensure directory ends with a slash so callers can safely do data_directory + filename
1724-
if (!data_directory.empty() && data_directory.back() != '/')
1725-
data_directory.push_back('/');
17261708
data_file_names = Utilities::split_string_list(prm.get ("Data file names"), ',');
17271709
interpolation_scheme = prm.get("Interpolation scheme");
17281710
}

0 commit comments

Comments
 (0)