Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tobias Schruff
waLBerla
Commits
437dbd21
Commit
437dbd21
authored
Oct 14, 2019
by
Tobias Schruff
Browse files
Fixed FileSystemHelper warning
parent
88ebe61e
Pipeline
#18870
failed with stage
in 172 minutes and 55 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
apps/sandbox/CMakeLists.txt
View file @
437dbd21
waLBerla_link_files_to_builddir
(
*.dat
)
# Sandbox
waLBerla_add_executable
(
NAME Sandbox
...
...
apps/sandbox/sandbox.cpp
View file @
437dbd21
...
...
@@ -53,7 +53,7 @@ int main( int argc, char ** argv )
generator
::
registerAll
();
const
auto
simConfig
=
config
->
getOneBlock
(
"SimulationSetup"
);
const
uint_t
timesteps
=
simConfig
.
getParameter
<
uint_t
>
(
"time
s
teps"
);
const
uint_t
timesteps
=
simConfig
.
getParameter
<
uint_t
>
(
"time
S
teps"
);
peSetup_T
peSetup
(
*
config
);
...
...
apps/sandbox/sandbox.dat
View file @
437dbd21
...
...
@@ -7,7 +7,7 @@ DomainSetup
SimulationSetup
{
time
s
teps 2001;
time
S
teps 2001;
}
pe
...
...
@@ -55,11 +55,11 @@ pe
{
position <250, 250, 250>;
lengths < 1, 1, 1>;
userId 100;
#
[OPTIONAL]
material bodyMaterial;
#
[OPTIONAL]
global off;
#
[OPTIONAL]
communicating on;
#
[OPTIONAL]
infiniteMass off;
#
[OPTIONAL]
userId 100;
//
[OPTIONAL]
material bodyMaterial;
//
[OPTIONAL]
global off;
//
[OPTIONAL]
communicating on;
//
[OPTIONAL]
infiniteMass off;
//
[OPTIONAL]
}*/
/*Capsule
...
...
@@ -67,32 +67,33 @@ pe
position <250, 250, 250>;
radius 0.5;
length 2;
userId 100;
#
[OPTIONAL]
material bodyMaterial;
#
[OPTIONAL]
global off;
#
[OPTIONAL]
communicating on;
#
[OPTIONAL]
infiniteMass off;
#
[OPTIONAL]
userId 100;
//
[OPTIONAL]
material bodyMaterial;
//
[OPTIONAL]
global off;
//
[OPTIONAL]
communicating on;
//
[OPTIONAL]
infiniteMass off;
//
[OPTIONAL]
}*/
/*CylindricalBoundary
{
position <250, 250, 0>;
radius 250;
userId 100;
#
[OPTIONAL]
material bodyMaterial;
#
[OPTIONAL]
userId 100;
//
[OPTIONAL]
material bodyMaterial;
//
[OPTIONAL]
}*/
/*Ellipsoid
{
position <250, 250, 250>;
semiAxes < 1, 1, 1>;
userId 100;
#
[OPTIONAL]
material bodyMaterial;
#
[OPTIONAL]
global off;
#
[OPTIONAL]
communicating on;
#
[OPTIONAL]
infiniteMass off;
#
[OPTIONAL]
userId 100;
//
[OPTIONAL]
material bodyMaterial;
//
[OPTIONAL]
global off;
//
[OPTIONAL]
communicating on;
//
[OPTIONAL]
infiniteMass off;
//
[OPTIONAL]
}*/
/** Add a bottom plane **/
Plane
{
position <250, 250, 0>;
...
...
@@ -104,11 +105,11 @@ pe
{
position <250, 250, 250>;
radius 5;
userId 100;
#
[OPTIONAL]
material bodyMaterial;
#
[OPTIONAL]
global false;
#
[OPTIONAL]
communicating on;
#
[OPTIONAL]
infiniteMass on;
#
[OPTIONAL]
userId 100;
//
[OPTIONAL]
material bodyMaterial;
//
[OPTIONAL]
global false;
//
[OPTIONAL]
communicating on;
//
[OPTIONAL]
infiniteMass on;
//
[OPTIONAL]
}*/
/*Squirmer
...
...
@@ -117,11 +118,11 @@ pe
radius 5;
velocity 0.1;
beta 0.01;
userId 100;
#
[OPTIONAL]
material bodyMaterial;
#
[OPTIONAL]
global false;
#
[OPTIONAL]
communicating on;
#
[OPTIONAL]
infiniteMass on;
#
[OPTIONAL]
userId 100;
//
[OPTIONAL]
material bodyMaterial;
//
[OPTIONAL]
global false;
//
[OPTIONAL]
communicating on;
//
[OPTIONAL]
infiniteMass on;
//
[OPTIONAL]
}*/
}
...
...
@@ -129,7 +130,7 @@ pe
{
/*ConfigFileImport
{
identifer configImport;
identif
i
er configImport;
execution <0, 1, 0>;
initTime 0;
...
...
@@ -141,7 +142,7 @@ pe
{
/*EllipsoidSource
{
execution <0, 100,
$(timesteps)
>;
execution <0, 100,
1000
>;
numBodies -1;
Material { value bodyMaterial; }
...
...
@@ -159,8 +160,8 @@ pe
Position
{
type cartesianGrid;
aabb [<0.
2
, 0.
2
,
0.8
>, <
0.8, 0.8, 1.
0>];
spacing 0.
2
;
aabb [<0.
0
, 0.
0
,
480
>, <
500, 500, 49
0>];
spacing
1
0.
0
;
}
AngularVelocity
...
...
@@ -183,9 +184,17 @@ pe
Radius
{
type logNormalDistribution;
mean 5.0;
sigma 1.2;
type transform;
// transform volume to radius
expression root(3.0 * value / (4.0 * PI), 3);
/** Generate log-normal distributed sphere volumes **/
Value
{
type logNormalDistribution;
mean 500; // -> R ~ 5
sigma 1.2;
}
}
Position
...
...
@@ -230,7 +239,7 @@ pe
{
identifier volumeFractionMapping;
execution <2000, 1, 2000>;
//
initTime 0;
initTime 0;
fieldId volumeFractionField;
initValue 0;
...
...
@@ -238,7 +247,7 @@ pe
synchronize off;
fractionType solid; // "solid" or "void"
//
domain [<
min>, <max
>];
domain [<
0.0, 0.0, 0.0>, <500.0, 500.0, 500.0
>];
BodyFilter { All { } }
...
...
src/sandbox/core/io/FileSystemHelper.cpp
View file @
437dbd21
...
...
@@ -55,11 +55,15 @@ std::vector<filesystem::path> getFilePathsFromRegex( const std::string & regex )
if
(
!
std
::
regex_match
(
i
->
path
().
filename
().
string
(),
filter
)
)
continue
;
// only store FILE paths that match the expression
paths
.
push_back
(
i
->
path
()
);
}
}
catch
(
std
::
regex_error
)
{
// input is not a regex, so there is only one file
paths
.
push_back
(
absPath
);
}
catch
(
std
::
regex_error
&
)
{
// input is just a file path
if
(
filesystem
::
is_regular_file
(
absPath
)
)
paths
.
push_back
(
absPath
);
else
throw
std
::
runtime_error
(
"Invalid file path or regex: "
+
absPath
.
string
()
);
}
return
paths
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment