[Bf-blender-cvs] [a8a41cfdf29] fluid-mantaflow: Mantaflow: Cleanup with clang-format
Sebastián Barschkis
noreply at git.blender.org
Wed Nov 20 18:49:34 CET 2019
Commit: a8a41cfdf29cd5aaf067aea4ddbc67d1d2486d97
Author: Sebastián Barschkis
Date: Wed Nov 20 18:47:02 2019 +0100
Branches: fluid-mantaflow
https://developer.blender.org/rBa8a41cfdf29cd5aaf067aea4ddbc67d1d2486d97
Mantaflow: Cleanup with clang-format
===================================================================
M intern/mantaflow/extern/manta_fluid_API.h
M intern/mantaflow/extern/manta_python_API.h
M intern/mantaflow/intern/MANTA_main.cpp
M intern/mantaflow/intern/manta_develop/dependencies/cnpy/cnpy.h
M intern/mantaflow/intern/manta_develop/helper/pwrapper/pvec3.cpp
M intern/mantaflow/intern/manta_develop/preprocessed/omp/fluidsolver.h
M intern/mantaflow/intern/manta_develop/preprocessed/omp/grid.h
M intern/mantaflow/intern/manta_develop/preprocessed/omp/grid4d.h
M intern/mantaflow/intern/manta_develop/preprocessed/omp/levelset.h
M intern/mantaflow/intern/manta_develop/preprocessed/omp/mesh.h
M intern/mantaflow/intern/manta_develop/preprocessed/omp/movingobs.h
M intern/mantaflow/intern/manta_develop/preprocessed/omp/noisefield.h
M intern/mantaflow/intern/manta_develop/preprocessed/omp/particle.h
M intern/mantaflow/intern/manta_develop/preprocessed/omp/plugin/flip.cpp
M intern/mantaflow/intern/manta_develop/preprocessed/omp/plugin/secondaryparticles.cpp
M intern/mantaflow/intern/manta_develop/preprocessed/omp/shapes.h
M intern/mantaflow/intern/manta_develop/preprocessed/omp/turbulencepart.h
M intern/mantaflow/intern/manta_develop/preprocessed/omp/vortexpart.h
M intern/mantaflow/intern/manta_develop/preprocessed/omp/vortexsheet.h
M intern/mantaflow/intern/manta_develop/preprocessed/tbb/fluidsolver.h
M intern/mantaflow/intern/manta_develop/preprocessed/tbb/grid.h
M intern/mantaflow/intern/manta_develop/preprocessed/tbb/grid4d.h
M intern/mantaflow/intern/manta_develop/preprocessed/tbb/levelset.h
M intern/mantaflow/intern/manta_develop/preprocessed/tbb/mesh.h
M intern/mantaflow/intern/manta_develop/preprocessed/tbb/movingobs.h
M intern/mantaflow/intern/manta_develop/preprocessed/tbb/noisefield.h
M intern/mantaflow/intern/manta_develop/preprocessed/tbb/particle.h
M intern/mantaflow/intern/manta_develop/preprocessed/tbb/plugin/flip.cpp
M intern/mantaflow/intern/manta_develop/preprocessed/tbb/plugin/secondaryparticles.cpp
M intern/mantaflow/intern/manta_develop/preprocessed/tbb/shapes.h
M intern/mantaflow/intern/manta_develop/preprocessed/tbb/turbulencepart.h
M intern/mantaflow/intern/manta_develop/preprocessed/tbb/vortexpart.h
M intern/mantaflow/intern/manta_develop/preprocessed/tbb/vortexsheet.h
M intern/mantaflow/intern/manta_fluid_API.cpp
M intern/mantaflow/intern/manta_python_API.cpp
M source/blender/blenkernel/intern/manta.c
M source/blender/blenkernel/intern/particle_system.c
M source/blender/blenkernel/intern/pointcache.c
M source/blender/blenloader/intern/readfile.c
M source/blender/draw/engines/eevee/eevee_volumes.c
M source/blender/editors/interface/interface_templates.c
M source/blender/editors/physics/physics_manta.c
M source/blender/makesdna/DNA_manta_types.h
M source/blender/makesrna/intern/rna_manta.c
M source/blender/python/intern/bpy_interface.c
===================================================================
diff --git a/intern/mantaflow/extern/manta_fluid_API.h b/intern/mantaflow/extern/manta_fluid_API.h
index 76e6c9ca2fd..f46d11de1d1 100644
--- a/intern/mantaflow/extern/manta_fluid_API.h
+++ b/intern/mantaflow/extern/manta_fluid_API.h
@@ -4,7 +4,7 @@
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -103,42 +103,45 @@ float *manta_get_phiout_in(struct MANTA *fluid);
/* Smoke functions */
void manta_smoke_export_script(struct MANTA *smoke, struct MantaModifierData *mmd);
void manta_smoke_export(struct MANTA *smoke,
- float *dt,
- float *dx,
- float **dens,
- float **react,
- float **flame,
- float **fuel,
- float **heat,
- float **vx,
- float **vy,
- float **vz,
- float **r,
- float **g,
- float **b,
- int **obstacles,
- float **shadow);
+ float *dt,
+ float *dx,
+ float **dens,
+ float **react,
+ float **flame,
+ float **fuel,
+ float **heat,
+ float **vx,
+ float **vy,
+ float **vz,
+ float **r,
+ float **g,
+ float **b,
+ int **obstacles,
+ float **shadow);
void manta_smoke_turbulence_export(struct MANTA *smoke,
- float **dens,
- float **react,
- float **flame,
- float **fuel,
- float **r,
- float **g,
- float **b,
- float **tcu,
- float **tcv,
- float **tcw,
- float **tcu2,
- float **tcv2,
- float **tcw2);
+ float **dens,
+ float **react,
+ float **flame,
+ float **fuel,
+ float **r,
+ float **g,
+ float **b,
+ float **tcu,
+ float **tcv,
+ float **tcw,
+ float **tcu2,
+ float **tcv2,
+ float **tcw2);
void manta_smoke_get_rgba(struct MANTA *smoke, float *data, int sequential);
void manta_smoke_turbulence_get_rgba(struct MANTA *smoke, float *data, int sequential);
-void manta_smoke_get_rgba_from_density(struct MANTA *smoke, float color[3], float *data, int sequential);
+void manta_smoke_get_rgba_from_density(struct MANTA *smoke,
+ float color[3],
+ float *data,
+ int sequential);
void manta_smoke_turbulence_get_rgba_from_density(struct MANTA *smoke,
- float color[3],
- float *data,
- int sequential);
+ float color[3],
+ float *data,
+ int sequential);
void manta_smoke_ensure_heat(struct MANTA *smoke, struct MantaModifierData *mmd);
void manta_smoke_ensure_fire(struct MANTA *smoke, struct MantaModifierData *mmd);
void manta_smoke_ensure_colors(struct MANTA *smoke, struct MantaModifierData *mmd);
diff --git a/intern/mantaflow/extern/manta_python_API.h b/intern/mantaflow/extern/manta_python_API.h
index b0f0bc74367..2b250f2658a 100644
--- a/intern/mantaflow/extern/manta_python_API.h
+++ b/intern/mantaflow/extern/manta_python_API.h
@@ -4,7 +4,7 @@
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/intern/mantaflow/intern/MANTA_main.cpp b/intern/mantaflow/intern/MANTA_main.cpp
index 48bf8210c25..5789bb3a413 100644
--- a/intern/mantaflow/intern/MANTA_main.cpp
+++ b/intern/mantaflow/intern/MANTA_main.cpp
@@ -287,8 +287,7 @@ void MANTA::initDomain(MantaModifierData *mmd)
void MANTA::initNoise(MantaModifierData *mmd)
{
std::vector<std::string> pythonCommands;
- std::string tmpString = fluid_variables_noise + fluid_solver_noise +
- fluid_time_stepping_noise;
+ std::string tmpString = fluid_variables_noise + fluid_solver_noise + fluid_time_stepping_noise;
std::string finalString = parseScript(tmpString, mmd);
pythonCommands.push_back(finalString);
@@ -401,8 +400,8 @@ void MANTA::initLiquid(MantaModifierData *mmd)
void MANTA::initMesh(MantaModifierData *mmd)
{
std::vector<std::string> pythonCommands;
- std::string tmpString = fluid_variables_mesh + fluid_solver_mesh +
- liquid_load_mesh + liquid_load_meshvel;
+ std::string tmpString = fluid_variables_mesh + fluid_solver_mesh + liquid_load_mesh +
+ liquid_load_meshvel;
std::string finalString = parseScript(tmpString, mmd);
pythonCommands.push_back(finalString);
@@ -823,9 +822,11 @@ std::string MANTA::getRealValue(const std::string &varName, MantaModifierData *m
else if (varName == "SIMULATION_METHOD") {
if (mmd->domain->simulation_method & FLUID_DOMAIN_METHOD_FLIP) {
ss << "'FLIP'";
- } else if (mmd->domain->simulation_method & FLUID_DOMAIN_METHOD_APIC) {
+ }
+ else if (mmd->domain->simulation_method & FLUID_DOMAIN_METHOD_APIC) {
ss << "'APIC'";
- } else {
+ }
+ else {
ss << "'NONE'";
}
}
@@ -896,9 +897,11 @@ std::string MANTA::getRealValue(const std::string &varName, MantaModifierData *m
else if (varName == "FLUID_VISCOSITY")
ss << mmd->domain->viscosity_base * pow(10.0f, -mmd->domain->viscosity_exponent);
else if (varName == "FLUID_DOMAIN_SIZE") {
- tmpFloat = MAX3(mmd->domain->global_size[0], mmd->domain->global_size[1], mmd->domain->global_size[2]);
+ tmpFloat = MAX3(
+ mmd->domain->global_size[0], mmd->domain->global_size[1], mmd->domain->global_size[2]);
ss << tmpFloat;
- } else if (varName == "SNDPARTICLE_TYPES") {
+ }
+ else if (varName == "SNDPARTICLE_TYPES") {
if (mmd->domain->particle_type & FLUID_DOMAIN_PARTICLE_SPRAY) {
ss << "PtypeSpray";
}
@@ -1180,17 +1183,15 @@ int MANTA::writeConfiguration(MantaModifierData *mmd, int framenr)
MantaDomainSettings *mds = mmd->domain;
std::ostringstream ss;
- char cacheDir[FILE_MAX], targetFile[FILE_MAX];;
+ char cacheDir[FILE_MAX], targetFile[FILE_MAX];
+ ;
cacheDir[0] = '\0';
targetFile[0] = '\0';
std::string dformat = getCacheFileEnding(mmd->domain->cache_data_format);
- BLI_path_join(cacheDir,
- sizeof(cacheDir),
- mmd->domain->cache_directory,
- FLUID_DOMAIN_DIR_CONFIG,
- NULL);
+ BLI_path_join(
+ cacheDir, sizeof(cacheDir), mmd->domain->cache_directory, FLUID_DOMAIN_DIR_CONFIG, NULL);
BLI_path_make_safe(cacheDir);
BLI_dir_create_recursive(cacheDir); /* Create 'config' subdir if it does not exist already */
@@ -1199,24 +1200,24 @@ int MANTA::writeConfiguration(MantaModifierData *mmd, int framenr)
BLI_join_dirfile(targetFile, sizeof(targetFile), cacheDir, ss.str().c_str());
BLI_path_frame(targetFile, framenr, 0);
- gzFile gzf = gzopen(targetFile, "wb1"); // do some compression
+ gzFile gzf = gzopen(targetFile, "wb1"); // do some compression
if (!gzf)
std::cerr << "writeConfiguration: can't open file: " << targetFile << std::endl;
gzwrite(gzf, &mds->active_fields, sizeof(int));
- gzwrite(gzf, &mds->res, 3*sizeof(int));
+ gzwrite(gzf, &mds->res, 3 * sizeof(int));
gzwrite(gzf, &mds->dx, sizeof(float));
gzwrite(gzf, &mds->dt, sizeof(float));
- gzwrite(gzf, &mds->p0, 3*sizeof(float));
- gzwrite(gzf, &mds->p1, 3*sizeof(float));
- gzwrite(gzf, &mds->dp0, 3*sizeof(float));
- gzwrite(gzf, &mds->shift, 3*sizeof(int));
- gzwrite(gzf, &mds->obj_shift_f, 3*sizeof(float));
- gzwrite(gzf, &mds->obmat, 16*sizeof(float));
- gzwrite(gzf, &mds->base_res, 3*sizeof(int));
- gzwrite(gzf, &mds->res_min, 3*sizeof(int));
- gzwrite(gzf, &mds->res_max, 3*sizeof(int));
- gzwrite(gzf, &mds->active_color, 3*sizeof(float));
+ gzwrite(gzf, &mds->p0, 3 * sizeof(float));
+ gzwrite(gzf, &mds->p1, 3 * sizeof(float));
+ gzwrite(gzf, &mds->dp0, 3 * sizeof(float));
+ gzwrite(gzf, &mds->shift, 3 * sizeof(int));
+ gzwrite(gzf, &mds->obj_shift_f, 3 * sizeof(float));
+ gzwrite(gzf, &mds->obmat, 16 * sizeof(float));
+ gzwrite(gzf, &mds->base_res, 3 * sizeof(int));
+ gzwrite(gzf, &mds->res_min, 3 * sizeof(int));
+ gzwrite(gzf, &mds->res_max, 3 * sizeof(int));
+ gzwrite(gzf, &mds->active_color, 3 * sizeof(float));
gzclose(gzf);
@@ -1283,11 +1284,8 @@ int MANTA::readConfiguration(MantaModifierData *mmd, int framenr)
std::string dformat = getCacheFileEnding(m
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list