openworm / sibernetic

This is a C++/OpenCL implementation of the PCISPH algorithm supplemented with a set of biomechanics related features applied to C. elegans locomotion
Other
361 stars 105 forks source link

Create a configuration file for the worm without external liquid #79

Closed pgleeson closed 9 years ago

pgleeson commented 9 years ago

@skhayrulin would it just be a case of copying https://github.com/openworm/sibernetic/blob/development/configuration/worm and removing the positions of external water particles? How can these be identified in the current file?

Motivation for this is testing the worm sim with different inputs in the absence of liquid, which may speed up the simulation and demonstrate overall worm body behaviour (does it wiggle...) with fewer particles...

skhayrulin commented 9 years ago

@pgleeson I've just added configuration file without water in configuration folder name is worm_no_water

pgleeson commented 9 years ago

Great, thanks! It's definitely speeded things up. However, the activation doesn't seem to be going into the muscles in this version. Maybe by default if there's any mention of 'worm' in the configuration file name then try to add the contractions?

skhayrulin commented 9 years ago

@pgleeson you're right sorry forgot about this and now have no ability to fix it. You should change this lines 70 and 122 add addition condition in if statement

if(configFileName == "worm" && configFileName == "worm_no_water")

in both lines

any problem let me know

a-palyanov commented 9 years ago

@skhayrulin, are you sure about '&&'? maybe '||'?

Line 77 also should be modified: 'bool isWormConfig(){ return (configFileName == "worm" )? true:false;' should become 'bool isWormConfig(){ return (configFileName == "worm" || configFileName == "worm_no_water")? true:false;'

After this it works correctly.

skhayrulin commented 9 years ago

@a-palyanov yes you right || not &&

skhayrulin commented 9 years ago

Guys I've updated the code it in repository now

pgleeson commented 9 years ago

Works great for me now, thanks!