Skip to content

Commit

Permalink
Merge pull request #53 from openworm/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
skhayrulin committed Aug 14, 2014
2 parents 004df02 + 5ebe832 commit 9cadc39
Show file tree
Hide file tree
Showing 24 changed files with 102 additions and 1,849 deletions.
22 changes: 13 additions & 9 deletions .cproject
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?fileVersion 4.0.0?>

<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
<storageModule moduleId="org.eclipse.cdt.core.settings">
<cconfiguration id="cdt.managedbuild.config.gnu.exe.release.2025909945">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.exe.release.2025909945" moduleId="org.eclipse.cdt.core.settings" name="Build">
<externalSettings>
<externalSetting/>
</externalSettings>
<extensions>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
Expand All @@ -29,6 +27,7 @@
<option id="gnu.cpp.compiler.exe.release.option.debugging.level.1679425131" name="Debug Level" superClass="gnu.cpp.compiler.exe.release.option.debugging.level" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/>
<option id="gnu.cpp.compiler.option.include.paths.997000422" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="/usr/include/python2.7"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/inc}&quot;"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1448416343" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
</tool>
Expand All @@ -54,6 +53,9 @@
</inputType>
</tool>
<tool id="cdt.managedbuild.tool.gnu.assembler.exe.release.1756360065" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.exe.release">
<option id="gnu.both.asm.option.include.paths.1804308571" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/Smoothed-Particle-Hydrodynamics/inc}&quot;"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.612136578" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
</tool>
</toolChain>
Expand All @@ -66,12 +68,12 @@
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.exe.debug.333205532" moduleId="org.eclipse.cdt.core.settings" name="debug">
<externalSettings/>
<extensions>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
Expand All @@ -81,11 +83,12 @@
<targetPlatform id="cdt.managedbuild.target.gnu.platform.exe.debug.884686243" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.exe.debug"/>
<builder autoBuildTarget="all" buildPath="${workspace_loc:/Smoothed-Particle-Hydrodynamics/debug}" cleanBuildTarget="clean" enableAutoBuild="false" enableCleanBuild="true" enabledIncrementalBuild="true" id="cdt.managedbuild.target.gnu.builder.exe.debug.1189096949" incrementalBuildTarget="all" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.exe.debug"/>
<tool id="cdt.managedbuild.tool.gnu.archiver.base.1441642354" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.1106861907" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug">
<tool command="g++" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.1106861907" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug">
<option id="gnu.cpp.compiler.exe.debug.option.optimization.level.921234671" name="Optimization Level" superClass="gnu.cpp.compiler.exe.debug.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
<option id="gnu.cpp.compiler.exe.debug.option.debugging.level.1358949615" name="Debug Level" superClass="gnu.cpp.compiler.exe.debug.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
<option id="gnu.cpp.compiler.option.include.paths.521963291" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="/usr/include/python2.7"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/inc}&quot;"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.2098511886" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
</tool>
Expand All @@ -110,6 +113,7 @@
</inputType>
</tool>
<tool id="cdt.managedbuild.tool.gnu.assembler.exe.debug.250299533" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.exe.debug">
<option id="gnu.both.asm.option.include.paths.1091188493" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths" valueType="includePath"/>
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.95686167" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
</tool>
</toolChain>
Expand Down Expand Up @@ -143,12 +147,12 @@
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.release.2025909945;cdt.managedbuild.config.gnu.exe.release.2025909945.;cdt.managedbuild.tool.gnu.cpp.compiler.exe.release.37396283;cdt.managedbuild.tool.gnu.cpp.compiler.input.1448416343">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.release.2025909945;cdt.managedbuild.config.gnu.exe.release.2025909945.;cdt.managedbuild.tool.gnu.c.compiler.exe.release.1665591112;cdt.managedbuild.tool.gnu.c.compiler.input.1611269568">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.cross.exe.release.1456821005;cdt.managedbuild.config.gnu.cross.exe.release.1456821005.;cdt.managedbuild.tool.gnu.cross.cpp.compiler.1917076731;cdt.managedbuild.tool.gnu.cpp.compiler.input.1889670210">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.release.2025909945;cdt.managedbuild.config.gnu.exe.release.2025909945.;cdt.managedbuild.tool.gnu.c.compiler.exe.release.1665591112;cdt.managedbuild.tool.gnu.c.compiler.input.1611269568">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.333205532;cdt.managedbuild.config.gnu.exe.debug.333205532.;cdt.managedbuild.tool.gnu.c.compiler.exe.debug.745142970;cdt.managedbuild.tool.gnu.c.compiler.input.1706681846">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
</scannerConfigBuildInfo>
Expand Down
2 changes: 1 addition & 1 deletion SimulationEnginePrototype.sln → Sibernetic.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SimulationEnginePrototype", "SimulationEnginePrototype.vcproj", "{01EA498F-06C1-4F67-8B98-E1105F9311A2}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Sibernetic", "Sibernetic.vcproj", "{01EA498F-06C1-4F67-8B98-E1105F9311A2}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
24 changes: 8 additions & 16 deletions SimulationEnginePrototype.vcproj → Sibernetic.vcproj
Original file line number Diff line number Diff line change
Expand Up @@ -267,10 +267,6 @@
RelativePath=".\src\owWorldSimulation.cpp"
>
</File>
<File
RelativePath=".\src\PyramidalSimulation.cpp"
>
</File>
<File
RelativePath=".\src\test\owPhysicTest.cpp"
>
Expand Down Expand Up @@ -300,39 +296,35 @@
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath=".\src\owHelper.h"
>
</File>
<File
RelativePath=".\src\owOpenCLConstant.h"
RelativePath=".\inc\owHelper.h"
>
</File>
<File
RelativePath=".\src\owOpenCLSolver.h"
RelativePath=".\inc\owOpenCLConstant.h"
>
</File>
<File
RelativePath=".\src\owPhysicsConstant.h"
RelativePath=".\inc\owOpenCLSolver.h"
>
</File>
<File
RelativePath=".\src\owPhysicsFluidSimulator.h"
RelativePath=".\inc\owPhysicsConstant.h"
>
</File>
<File
RelativePath=".\src\owWorldSimulation.h"
RelativePath=".\inc\owPhysicsFluidSimulator.h"
>
</File>
<File
RelativePath=".\src\PyramidalSimulation.h"
RelativePath=".\inc\owWorldSimulation.h"
>
</File>
<File
RelativePath=".\src\VectorMath.h"
RelativePath=".\inc\VectorMath.h"
>
</File>
<File
RelativePath=".\src\test\owPhysicTest.h"
RelativePath=".\inc\owPhysicTest.h"
>
</File>
</Filter>
Expand Down
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion src/owHelper.h → inc/owHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ class owHelper
public:
owHelper(void);
~owHelper(void);
static void generateConfiguration( int stage, float *position, float *velocity, float *& elasticConnectionsData_cpp, int *membraneData_cpp, int & numOfLiquidP, int & numOfElasticP, int & numOfBoundaryP, int & numOfElasticConnections, int & numOfMembranes, int * particleMembranesList_cpp, owConfigProrerty * config);
static void preLoadConfiguration( int & numOfMembranes, owConfigProrerty * config, int & numOfLiquidP, int & numOfElasticP, int & numOfBoundaryP );
static void loadConfiguration( float *position_cpp, float *velocity_cpp, float *& elasticConnections,int & numOfLiquidP, int & numOfElasticP, int & numOfBoundaryP, int & numOfElasticConnections, int & numOfMembranes,int * membraneData_cpp, int *& particleMembranesList_cpp, owConfigProrerty * config );
static void loadConfigurationFromOneFile(float * position, float * velocity, float *& elasticConnectionsData_cpp, int & numOfLiquidP, int & numOfElasticP, int & numOfBoundaryP, int & numOfElasticConnections);
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/owOpenCLSolver.h → inc/owOpenCLSolver.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class owOpenCLSolver
void read_velocity_buffer( float * velocity_cpp, owConfigProrerty * config) { copy_buffer_from_device( velocity_cpp, velocity, config->getParticleCount() * sizeof( float ) * 4 ); };
void read_density_buffer( float * density_cpp, owConfigProrerty * config ) { copy_buffer_from_device( density_cpp, rho, config->getParticleCount() * sizeof( float ) * 1 ); }; // This need only for visualization current density of particle (graphic effect)
void read_particleIndex_buffer( unsigned int * particleIndexBuffer, owConfigProrerty * config ) { copy_buffer_from_device( particleIndexBuffer, particleIndex, config->getParticleCount() * sizeof( unsigned int ) * 2 ); }; // This need only for visualization current density of particle (graphic effect)
void refresh(const float * position_cpp, const float * velocity_cpp, owConfigProrerty * config, const float * elasticConnectionsData_cpp = NULL, const int * membraneData_cpp = NULL, const int * particleMembranesList_cpp = NULL);
void reset(const float * position_cpp, const float * velocity_cpp, owConfigProrerty * config, const float * elasticConnectionsData_cpp = NULL, const int * membraneData_cpp = NULL, const int * particleMembranesList_cpp = NULL);
private:
void create_ocl_kernel( const char *name, cl::Kernel &k );
void create_ocl_buffer(const char *name, cl::Buffer &b, const cl_mem_flags flags,const int size);
Expand Down
2 changes: 2 additions & 0 deletions src/test/owPhysicTest.h → inc/owPhysicTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
#ifndef OWPHYSICTEST_H_
#define OWPHYSICTEST_H_

#include "owPhysicsFluidSimulator.h"

void test_energy_conservation();


Expand Down
2 changes: 0 additions & 2 deletions src/owPhysicsConstant.h → inc/owPhysicsConstant.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@

#include "owOpenCLConstant.h"

#define generateWormBodyConfiguration 0 //or load from file otherwise [0/1]

#ifndef M_PI
#define M_PI 3.1415927f
#endif
Expand Down
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
TARGET = Sibernetic
RM := rm -rf

SOURCES = src/PyramidalSimulation.cpp \
src/main.cpp \
SOURCES = src/main.cpp \
src/owHelper.cpp \
src/owOpenCLSolver.cpp \
src/owPhysicsFluidSimulator.cpp \
Expand All @@ -12,6 +11,7 @@ TEST_SOURCES = src/test/owPhysicTest.cpp

SRCEXT := cpp
SRCDIR := src
INCDIR := inc
BUILDDIR = ./Release
BINARYDIR = $(BUILDDIR)/obj
BINARYTESTDIR = $(BINARYDIR)/test
Expand All @@ -32,12 +32,12 @@ $(TARGET):$(OBJECTS)
@echo 'Finished building target: $@'
@echo ' '

$(BINARYDIR)/%.o: $(SRCDIR)/%.cpp
$(BINARYDIR)/%.o: $(SRCDIR)/%.cpp
@mkdir -p $(BINARYDIR)
@mkdir -p $(BINARYTESTDIR)
@echo 'Building file: $<'
@echo 'Invoking: GCC C++ Compiler'
g++ -I/usr/include/python2.7 -O3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
g++ -I/usr/include/python2.7 -I$(INCDIR) -O3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
@echo 'Finished building: $<'
@echo ' '

Expand Down
7 changes: 4 additions & 3 deletions makefile.OSX
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
RM := rm -rf

# All of the sources participating in the build are defined here
SOURCES = src/PyramidalSimulation.cpp \
src/main.cpp \
SOURCES = src/main.cpp \
src/owHelper.cpp \
src/owOpenCLSolver.cpp \
src/owPhysicsFluidSimulator.cpp \
Expand All @@ -13,7 +12,9 @@ TEST_SOURCES = src/test/owPhysicTest.cpp

SRCEXT := cpp
SRCDIR := src
INCDIR := inc
BUILDDIR := build
BINARYTESTDIR = $(BUILDDIR)/test
OBJECTS := $(patsubst $(SRCDIR)/%,$(BUILDDIR)/%,$(SOURCES:.$(SRCEXT)=.o))
OBJECTS += $(BINARYTESTDIR)/owPhysicTest.o

Expand Down Expand Up @@ -45,7 +46,7 @@ $(BUILDDIR)/%.o: $(SRCDIR)/%.cpp
@echo 'Invoking: clang C++ Compiler'
#### use this to compile against homebrew installed python
#### change version number as necessary (2.7.n)
g++ -O1 -Wall -c -I$(PYTHONHEADERDIR) -framework OpenCL -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
g++ -O1 -Wall -c -I$(PYTHONHEADERDIR) -I$(INCDIR) -framework OpenCL -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
@echo 'Finished building: $<'
@echo ' '

Expand Down
135 changes: 0 additions & 135 deletions src/PyramidalSimulation.cpp

This file was deleted.

Loading

0 comments on commit 9cadc39

Please sign in to comment.