Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
fluidparticles
MigFlow
Commits
f7b61685
Commit
f7b61685
authored
Nov 14, 2018
by
Jonathan Lambrechts
Browse files
release some memory
parent
80e38aa5
Pipeline
#4581
passed with stage
in 2 minutes and 4 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
fluid/fluid_problem.c
View file @
f7b61685
...
...
@@ -1092,6 +1092,7 @@ void fluid_problem_free(FluidProblem *problem)
free
(
problem
->
solution
);
free
(
problem
->
porosity
);
free
(
problem
->
oldporosity
);
free
(
problem
->
node_volume
);
hxtLinearSystemDelete
(
&
problem
->
linear_system
);
free
(
problem
->
particle_uvw
);
free
(
problem
->
particle_element_id
);
...
...
@@ -1112,6 +1113,7 @@ void fluid_problem_free(FluidProblem *problem)
free
(
problem
->
strong_boundaries
);
mesh_tree_free
(
problem
->
mesh_tree
);
mesh_free
(
problem
->
mesh
);
free
(
problem
);
}
void
fluid_problem_adapt_gen_mesh
(
FluidProblem
*
problem
,
double
lcmax
,
double
lcmin
,
double
n_el
,
double
cmax
,
double
cmin
)
...
...
python/fluid.py
View file @
f7b61685
...
...
@@ -82,7 +82,7 @@ class FluidProblem :
def
__del__
(
self
):
"""Delete the fluid structure."""
if
(
self
.
_fp
!=
None
)
:
if
(
self
.
_fp
is
not
None
)
:
self
.
_lib
.
fluid_problem_free
(
self
.
_fp
)
def
load_msh
(
self
,
mesh_file_name
)
:
...
...
python/scontact.py
View file @
f7b61685
...
...
@@ -88,6 +88,11 @@ class ParticleProblem :
if
self
.
_p
==
None
:
raise
NameError
(
"Cannot create particle problem."
)
def
__del__
(
self
):
"""Delete the particle solver structure."""
if
(
self
.
_p
is
not
None
)
:
self
.
_lib
.
particleProblemDelete
(
self
.
_p
)
def
volume
(
self
):
"""Return the list of particle volumes."""
if
self
.
_dim
==
2
:
...
...
scontact/scontact.c
View file @
f7b61685
...
...
@@ -37,19 +37,6 @@ typedef struct _Disk Disk;
typedef
struct
_Segment
Segment
;
typedef
struct
_Triangle
Triangle
;
static
int
check_word_in_file
(
FILE
*
f
,
const
char
*
w
)
{
char
word
[
256
];
if
(
fscanf
(
f
,
"%255s"
,
word
)
!=
1
){
printf
(
"Invalid mesh file (
\"
%s
\"
expected).
\n
"
,
w
);
return
-
1
;
}
if
(
strcmp
(
word
,
w
)
!=
0
){
printf
(
"Invalid mesh file (
\"
%s
\"
expected).
\n
"
,
w
);
return
-
1
;
}
return
0
;
}
struct
_ParticleProblem
{
int
jacobi
;
double
relax
;
...
...
@@ -1320,6 +1307,10 @@ int particleProblemImportBoundaryVtk(ParticleProblem *p, const char *filename)
else
printf
(
"Unknown boundary object : %i
\n
"
,
t
);
}
free
(
pts
);
free
(
off
);
free
(
con
);
free
(
typ
);
}
else
{
printf
(
"unexpected element in
\"
%s
\"
:
\"
%s
\"\n
"
,
filename
,
f
.
name
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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