Need help to exclude particles according to an addtional pattern
Hi,everyone.
I wanna implement particles refinement in dualsphysics. and it is already done (only refinement without derefinement). Details show in picture.
red particles means the daughter particles.And they should be excluded once they leave the refinement zone.But obviously, it didn't happen.
So the problem is the derefinement process do not work.
Here is the changes in code for definement process:
1.Type.h Declare a new particles code 0xc000 for merge.
2.JSphCpu.cpp-------UpdataPos. if the daughter particles leave the refinement zone set the code Outmerge.
3.JSph.app-------AddParticles. for countting particles which have the code Outmerge.
Maybe some thing i missed. I read the code JCellDivCpuSingle.cpp------PreSort. where set the cellpart[code_outxxx particles]=BoxFluidOut. So, i think it should be worked. But it didn't.
Thanks for any response.
sincerely.
I wanna implement particles refinement in dualsphysics. and it is already done (only refinement without derefinement). Details show in picture.
red particles means the daughter particles.And they should be excluded once they leave the refinement zone.But obviously, it didn't happen.
So the problem is the derefinement process do not work.
Here is the changes in code for definement process:
1.Type.h Declare a new particles code 0xc000 for merge.
2.JSphCpu.cpp-------UpdataPos. if the daughter particles leave the refinement zone set the code Outmerge.
3.JSph.app-------AddParticles. for countting particles which have the code Outmerge.
Maybe some thing i missed. I read the code JCellDivCpuSingle.cpp------PreSort. where set the cellpart[code_outxxx particles]=BoxFluidOut. So, i think it should be worked. But it didn't.
Thanks for any response.
sincerely.
Debug Trace
Notice |
Cannot assign an empty string to a string offset #0 /var/www/forums-dual-sphysics-org/library/core/class.format.php(1203): gdn_ErrorHandler(2, 'Cannot assign a...', '/var/www/forums...', 1203, Array) #1 /var/www/forums-dual-sphysics-org/library/core/class.format.php(958): Gdn_Format::formatMentionsCallback('') #2 /var/www/forums-dual-sphysics-org/library/core/class.format.php(1292): Gdn_Format::tagContent('@Asalih3d <br ...', 'Gdn_Format::for...') #3 /var/www/forums-dual-sphysics-org/library/Vanilla/Formatting/Html/HtmlEnhancer.php(59): Gdn_Format::mentions('@Asalih3d <br ...') #4 /var/www/forums-dual-sphysics-org/library/Vanilla/Formatting/Formats/HtmlFormat.php(74): Vanilla\Formatting\Html\HtmlEnhancer->enhance('@Asalih3d <br ...') #5 /var/www/forums-dual-sphysics-org/library/Vanilla/Formatting/FormatService.php(34): Vanilla\Formatting\Formats\HtmlFormat->renderHtml('@Asalih3d \r\nOf...') #6 /var/www/forums-dual-sphysics-org/library/core/class.format.php(769): Vanilla\Formatting\FormatService->renderHTML('@Asalih3d \r\nOf...', 'html') #7 /var/www/forums-dual-sphysics-org/library/core/class.format.php(1479): Gdn_Format::html('@Asalih3d \r\nOf...') #8 /var/www/forums-dual-sphysics-org/applications/vanilla/views/discussion/helper_functions.php(24): Gdn_Format::to('@Asalih3d \r\nOf...', 'Html') #9 /var/www/forums-dual-sphysics-org/applications/vanilla/views/discussion/helper_functions.php(170): formatBody(Object(stdClass)) #10 /var/www/forums-dual-sphysics-org/applications/vanilla/views/discussion/comments.php(19): writeComment(Object(stdClass), Object(DiscussionController), Object(Gdn_Session), 3) #11 /var/www/forums-dual-sphysics-org/applications/vanilla/views/discussion/index.php(53): include('/var/www/forums...') #12 /var/www/forums-dual-sphysics-org/library/core/class.controller.php(778): include('/var/www/forums...') #13 /var/www/forums-dual-sphysics-org/library/core/class.controller.php(1382): Gdn_Controller->fetchView('', false, false) #14 /var/www/forums-dual-sphysics-org/library/core/class.pluggable.php(217): Gdn_Controller->xRender() #15 /var/www/forums-dual-sphysics-org/applications/vanilla/controllers/class.discussioncontroller.php(310): Gdn_Pluggable->__call('render', Array) #16 /var/www/forums-dual-sphysics-org/library/core/class.dispatcher.php(862): DiscussionController->index('1569', 'need-help-to-ex...', '') #17 /var/www/forums-dual-sphysics-org/library/core/class.dispatcher.php(279): Gdn_Dispatcher->dispatchController(Object(Gdn_Request), Array) #18 /var/www/forums-dual-sphysics-org/index.php(29): Gdn_Dispatcher->dispatch() #19 {main} |
Notice |
Cannot assign an empty string to a string offset #0 /var/www/forums-dual-sphysics-org/library/core/class.format.php(1203): gdn_ErrorHandler(2, 'Cannot assign a...', '/var/www/forums...', 1203, Array) #1 /var/www/forums-dual-sphysics-org/library/core/class.format.php(958): Gdn_Format::formatMentionsCallback('') #2 /var/www/forums-dual-sphysics-org/library/core/class.format.php(1292): Gdn_Format::tagContent('@Asalih3d <br /...', 'Gdn_Format::for...') #3 /var/www/forums-dual-sphysics-org/library/Vanilla/Formatting/Html/HtmlEnhancer.php(59): Gdn_Format::mentions('@Asalih3d <br /...') #4 /var/www/forums-dual-sphysics-org/library/Vanilla/Formatting/Formats/HtmlFormat.php(74): Vanilla\Formatting\Html\HtmlEnhancer->enhance('@Asalih3d <br /...') #5 /var/www/forums-dual-sphysics-org/library/Vanilla/Formatting/FormatService.php(34): Vanilla\Formatting\Formats\HtmlFormat->renderHtml('@Asalih3d \r\nVer...') #6 /var/www/forums-dual-sphysics-org/library/core/class.format.php(769): Vanilla\Formatting\FormatService->renderHTML('@Asalih3d \r\nVer...', 'html') #7 /var/www/forums-dual-sphysics-org/library/core/class.format.php(1479): Gdn_Format::html('@Asalih3d \r\nVer...') #8 /var/www/forums-dual-sphysics-org/applications/vanilla/views/discussion/helper_functions.php(24): Gdn_Format::to('@Asalih3d \r\nVer...', 'Html') #9 /var/www/forums-dual-sphysics-org/applications/vanilla/views/discussion/helper_functions.php(170): formatBody(Object(stdClass)) #10 /var/www/forums-dual-sphysics-org/applications/vanilla/views/discussion/comments.php(19): writeComment(Object(stdClass), Object(DiscussionController), Object(Gdn_Session), 5) #11 /var/www/forums-dual-sphysics-org/applications/vanilla/views/discussion/index.php(53): include('/var/www/forums...') #12 /var/www/forums-dual-sphysics-org/library/core/class.controller.php(778): include('/var/www/forums...') #13 /var/www/forums-dual-sphysics-org/library/core/class.controller.php(1382): Gdn_Controller->fetchView('', false, false) #14 /var/www/forums-dual-sphysics-org/library/core/class.pluggable.php(217): Gdn_Controller->xRender() #15 /var/www/forums-dual-sphysics-org/applications/vanilla/controllers/class.discussioncontroller.php(310): Gdn_Pluggable->__call('render', Array) #16 /var/www/forums-dual-sphysics-org/library/core/class.dispatcher.php(862): DiscussionController->index('1569', 'need-help-to-ex...', '') #17 /var/www/forums-dual-sphysics-org/library/core/class.dispatcher.php(279): Gdn_Dispatcher->dispatchController(Object(Gdn_Request), Array) #18 /var/www/forums-dual-sphysics-org/index.php(29): Gdn_Dispatcher->dispatch() #19 {main} |
Comments
OK,all done
Of cause, thanks.
It is very tired working alone
One of the problems with this approach might be that idp cannot become an array of numbers anymore, since A and B has to represented in another way (as far as I understand) to make it properly human readable.
Then another approach would be:
Kind regards
Very useful. You are saying the crucial problem in my changes.
But some are different with your imagine.
1. Parent particles don' t have to destroy, deactivate them, treat them just like the normal particles, they can move. But they have no contribution to their adjust particles. When they leave the refinement area, activate them, changing to normal particles.
2. If the mass (a new array) of normal particles (also parent particles) is 1. Then the mass of daughter particles will be 0.25 (one parent particle split to four daughter particles). Then we can distingulish daugther particles and parent particles.
3. When we add new particles (daughter particles). We can assgin a value (a big value, at least an order of magnitude, and it links to their parent id) to their id. Then we can know how is their father. That why in the upper figure, the red point means daughter particles, a big id. But, i am not sure if wo really need to know which their father particle is.
4. And i add a new array idps, like a bool variable. 0 means this particles have no daughter, they can split once they satisfy the conditions. 1 means they have daughter, then they would not split even they satisfy the conditions.
And, as you say. We can add something for debugging, i am really weak about this.
Thanks for suggestions
Kind regards
Kind regards