Re: [deal.II] SOURCE_DIR for input data reading in user project unit testing

2018-02-05 Thread Weixiong Zheng
A might-be-sloppy resolution I came out is to use boost to transform SOURCE_DIR macro to string, which is #include ... void test () { ... std::string string_from_macro = BOOST_PP_STRINGIZE(SOURCE_DIR); ... } It worked, but as what I said, in a sloppy way. I'd be happy to see what you

Re: [deal.II] SOURCE_DIR for input data reading in user project unit testing

2018-02-05 Thread Weixiong Zheng
Thanks Matthias, What I've tried is to ADD_DEFINITION(-DSOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR}) in the CMakeLists.txt in the test directory. I tried tesing SOURCE_DIR in *.cc file like: std::cout << SOURCE_DIR << std::endl; When I did "make", screen printout shows: ":2:20: note: expanded

Re: [deal.II] SOURCE_DIR for input data reading in user project unit testing

2018-02-05 Thread Weixiong Zheng
在 2018年2月5日星期一 UTC-8下午8:55:19,Wolfgang Bangerth写道: > > On 02/05/2018 09:15 PM, Weixiong Zheng wrote: > > > > I am trying to get unit test work for my project. It works until > reaching the > > point of reading input data. I tried to specify the directory using > getcwd() > > though it

Re: [deal.II] SOURCE_DIR for input data reading in user project unit testing

2018-02-05 Thread Matthias Maier
On Mon, Feb 5, 2018, at 22:15 CST, Weixiong Zheng wrote: > Hello All, > > I am trying to get unit test work for my project. It works until reaching > the point of reading input data. I tried to specify the directory using > getcwd() though it didn't work with ctest. I

Re: [deal.II] SOURCE_DIR for input data reading in user project unit testing

2018-02-05 Thread Wolfgang Bangerth
On 02/05/2018 09:15 PM, Weixiong Zheng wrote: I am trying to get unit test work for my project. It works until reaching the point of reading input data. I tried to specify the directory using getcwd() though it didn't work with ctest. I noticed there was another user having the same issue

[deal.II] SOURCE_DIR for input data reading in user project unit testing

2018-02-05 Thread Weixiong Zheng
Hello All, I am trying to get unit test work for my project. It works until reaching the point of reading input data. I tried to specify the directory using getcwd() though it didn't work with ctest. I noticed there was another user having the same issue and the resolution was to use

Re: [deal.II] Relacement of laplace and Mass matrix usage with cell wise assembly for v-equation in step-23

2018-02-05 Thread Wolfgang Bangerth
On 01/30/2018 07:53 AM, Dulcimer0909 wrote:     for(unsigned int i = 0; i < dofs_per_cell; i++)     {     for (unsigned int j = 0; j < dofs_per_cell; j++)     {     matrix_v.add (local_dof_indices[i],  

Re: [deal.II] Re: Usage of the laplace-matrix in example 23

2018-02-05 Thread Wolfgang Bangerth
Dulcimer, it is difficult for any of us to just look at a piece of code and tell where exactly things are going wrong. You'll have to learn to debug what is happening in your case, and for this it is easiest if you make the problem as simple as possible -- for example, use zero boundary

Re: [deal.II] modifying of only one component of solution

2018-02-05 Thread Marek Čapek
Hi, I have Cahn-Hilliard system - scalar equation for phase field and chemical potential. I tried to modify only the phase field part of solution in distributed code like step-40: template > void Main::postprocess_solution(){ > > nsSystem.computing_timer.enter_subsection("Solution

Re: AW: [deal.II] step-42 clarification

2018-02-05 Thread Timo Heister
> In such a case, one wants to restart the computations We have support for snapshot in parallel with adaptive meshes by using the SolutionTransfer class. See "Use for serialization" in