Hello Daniel,

I tried as suggested by you. But the tests fail with below exception

 ----------------------------------------------------
1: Exception on processing: 
1: 
1: --------------------------------------------------------
1: An error occurred in line <3059> of file 
</home/vinayak/spack/var/spack/stage/dealii-develop-7cbhdrgdyye44wfu4cmyexwzxauxx6n4/dealii/source/base/parameter_handler.cc>
 
in function
1:     void dealii::ParameterHandler::scan_line(std::__cxx11::string, const 
string&, unsigned int)
1: The violated condition was: 
1:     false
1: Additional information: 
1:     Line <1> of file <input file>: The line
1: 
1:         <LAMMPS Description>
1: 
1: could not be parsed: please check to make sure that the file is not 
missing a 'set', 'include', 'subsection', or 'end' statement.
1: --------------------------------------------------------
1: 
1: Aborting!
1: ----------------------------------------------------
1: terminate called after throwing an instance of 
'dealii::ParameterHandler::ExcCannotParseLine'
1:   what():  
1: --------------------------------------------------------
1: An error occurred in line <3059> of file 
</home/vinayak/spack/var/spack/stage/dealii-develop-7cbhdrgdyye44wfu4cmyexwzxauxx6n4/dealii/source/base/parameter_handler.cc>
 
in function
1:     void dealii::ParameterHandler::scan_line(std::__cxx11::string, const 
string&, unsigned int)
1: The violated condition was: 
1:     false
1: Additional information: 
1:     Line <1> of file <input file>: The line
1: 
1:         <LAMMPS Description>
1: 
1: could not be parsed: please check to make sure that the file is not 
missing a 'set', 'include', 'subsection', or 'end' statement.
1: --------------------------------------------------------

My *.data file has following which needs to be considered during unit test:

LAMMPS Description

     2  atoms
     0  bonds
     0  angles
     0  dihedrals
     0  impropers

     2  atom types

  0.0 1.0 xlo xhi
  0.0 1.0 ylo yhi
  0.0 1.0 zlo zhi

Masses

      1        22.989
      2     35.453

Atoms # full
....

Regards,
Vinayak Gholap

On Thursday, October 5, 2017 at 3:16:01 PM UTC+2, Daniel Arndt wrote:
>
> Vinayak,
>
> as I understand this function is to include the .prm file input data. What 
>> I have is inside my .prm file:
>>
>> subsection  somedata
>>     set input file = *xyz.data*
>> end
>>
>> I read this input string from .prm and via my own implemented function 
>> read this *xyz.data* file. The problem occurs when doing unit test for 
>> different .prm input files it cannot read this *xyz.data* file. The 
>> different .prm files are considered by the unit test but the *xyz.data* 
>> within each .prm file is not read.
>>
> I would still expect this to work using SOURCE_DIR. Namely, you should be 
> able to read you parameter file similar to
>
> std::ifstream in(SOURCE_DIR "parameters.prm"); 
> prm.read_input (in);
>
> and then extract the relevant data file similar to
>
> const std::string data_file = std::string(SOURCE_DIR) + prm.get("input 
> file");
>
> Best,
> Daniel
>
>

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to