Skip to content

Commit f270e08

Browse files
committed
remove this commit
1 parent 94b5e0a commit f270e08

File tree

4 files changed

+39
-108
lines changed

4 files changed

+39
-108
lines changed

include/interfaces/navier_stokes-chorin-temam.h

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ class NavierStokes
147147
*/
148148
double nu;
149149

150-
double delta_t;
150+
double initial_delta_t;
151151
/**
152152
* Solver tolerance for CG
153153
*/
@@ -198,10 +198,10 @@ declare_parameters (ParameterHandler &prm)
198198
"nu [Pa s]", "1.0",
199199
Patterns::Double(0.0),
200200
"Viscosity");
201-
this->add_parameter(prm, &delta_t,
202-
"delta t", "1e-1",
201+
this->add_parameter(prm, &initial_delta_t,
202+
"initial delta t", "1e-1",
203203
Patterns::Double(0.0),
204-
"Delta t");
204+
"Initial Delta t");
205205
this->add_parameter(prm, &CG_solver_tolerance,
206206
"CG Solver tolerance", "1e-8",
207207
Patterns::Double(0.0));
@@ -250,7 +250,7 @@ energies_and_residuals(const typename DoFHandler<dim,spacedim>::active_cell_iter
250250

251251
const unsigned int n_quad_points = us.size();
252252
auto &JxW = fe_cache.get_JxW_values();
253-
// auto delta_t = this->get_timestep();
253+
const auto delta_t = this->get_timestep() != this->get_timestep() ? initial_delta_t : this->get_timestep() ;
254254
auto &fev = fe_cache.get_current_fe_values();
255255

256256
for (unsigned int quad=0; quad<n_quad_points; ++quad)
@@ -364,9 +364,11 @@ NavierStokes<dim,spacedim,LAC>::compute_system_operators(
364364
}
365365
}
366366
);
367+
prec_op = diag_inv;
368+
/*
367369
prec_op = block_forward_substitution(
368370
BlockLinearOperator< VEC >(S),
369-
diag_inv);
371+
diag_inv);*/
370372
}
371373

372374
#endif

source/pidomus.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ piDoMUS<dim, spacedim, LAC>::solve_jacobian_system(const typename LAC::VectorTyp
398398
if (we_are_parallel == false &&
399399
use_direct_solver == true)
400400
{
401-
401+
std::cout << "DIRETTO!" << std::endl;
402402
SparseDirectUMFPACK inverse;
403403
inverse.factorize((sMAT &) *matrices[0]);
404404
inverse.vmult((sVEC &)dst, (sVEC &)src);

tests/parameters/navier_stokes_chorin-temam_00.prm

Lines changed: 7 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -13,37 +13,17 @@ subsection Forcing terms
1313
t^2*y + x*cos(y) + y*sin(x);\
1414
0; 0; 0
1515
set Known component names = v,v,p,u,u
16-
set Used constants = k=0.01
16+
set Used constants = d=0.01
1717
end
1818

1919
subsection Dirichlet boundary conditions
20-
set IDs and component masks = 0 = v
20+
set IDs and component masks = 0 = v;p
2121
set IDs and expressions = 0 = t*cos(x); t*y*sin(x); -1*y*sin(x);\
2222
t*cos(x); t*y*sin(x)
2323
set Known component names = v,v,p,u,u
2424
set Used constants = k=0.01
2525
end
2626

27-
#subsection Forcing terms
28-
# set IDs and component masks = 0=v
29-
# set IDs and expressions = 0=-sin(x)*cos(x) + sin(y) + 0.1*cos(x);\
30-
# x*cos(y)+y*sin(x)*sin(x)+y*cos(x)*cos(x); 0;0;0
31-
# set Known component names = v,v,u,u,p
32-
# set Used constants = k=0.0
33-
#end
34-
#
35-
#subsection Dirichlet boundary conditions
36-
# set IDs and component masks = 0=u;p
37-
# set IDs and expressions = 0=0; 0; cos(x); y*sin(x); x*sin(y)
38-
# set Known component names = v,v,u,u,p
39-
# set Used constants = k=0.0
40-
#end
41-
#
42-
#subsection Exact solution
43-
# set Function expression = 0; 0; cos(x); y*sin(x); x*sin(y)
44-
# set Variable names = x,y,t
45-
#end
46-
4727
subsection Domain
4828
set Colorize = false
4929
set Grid to generate = rectangle
@@ -52,10 +32,8 @@ subsection Domain
5232
end
5333

5434
subsection IMEX Parameters
55-
set Absolute error tolerance = 1e-12
56-
set Final time = 1.0
35+
set Final time = 1e0
5736
set Initial time = 0.0
58-
set Intervals between outputs = 1
5937
set Step size = 1e-1
6038
end
6139

@@ -68,7 +46,7 @@ subsection Navier Stokes Interface
6846
set Finite element space = FESystem[FE_Q(2)^d-FE_Q(1)-FE_Q(2)^d]
6947
set nu [Pa s] = 0.1
7048
set rho [kg m^3] = 1.0
71-
set delta t = 1e-1
49+
set initial delta t = 1e-3
7250
end
7351

7452
subsection Output Parameters
@@ -83,8 +61,9 @@ end
8361
subsection piDoMUS<2, 2, LADealII>
8462
set Adaptive refinement = false
8563
set Enable finer preconditioner = false
86-
set Initial global refinement = 2
87-
set Jacobian solver tolerance = 1e-8
64+
set Initial global refinement = 3
65+
set Number of cycles = 1
66+
set Jacobian solver tolerance = 1e-12
8867
set Use direct solver if available = true
8968
end
9069

tests/parameters/navier_stokes_chorin-temam_01.prm

Lines changed: 23 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# Listing of Parameters
22
# ---------------------
33
subsection AMG for u
4-
set Aggregation threshold = 10
4+
set Aggregation threshold = 0.2
55
set Variable related to constant modes = u
66
end
77
subsection AMG for v
8-
set Aggregation threshold = 10
8+
set Aggregation threshold = 0.2
99
set Variable related to constant modes = v
1010
end
1111
subsection AMG for p
12-
set Aggregation threshold = 10
12+
set Aggregation threshold = 0.2
1313
set Variable related to constant modes = p
1414
end
1515

@@ -26,36 +26,29 @@ subsection Forcing terms
2626
t^2*y + x*cos(y) + y*sin(x);\
2727
0; 0; 0
2828
set Known component names = v,v,p,u,u
29-
set Used constants = k=0.01
29+
set Used constants = d=0.01
3030
end
3131

3232
subsection Dirichlet boundary conditions
33-
set IDs and component masks = 0 = v
33+
set IDs and component masks = 0 = v;u;p % 1 = v;u;p % 2 = v;u;p % 3 = v;u;p
3434
set IDs and expressions = 0 = t*cos(x); t*y*sin(x); -1*y*sin(x);\
35+
t*cos(x); t*y*sin(x) %\
36+
1 = t*cos(x); t*y*sin(x); -1*y*sin(x);\
37+
t*cos(x); t*y*sin(x) %\
38+
2 = t*cos(x); t*y*sin(x); -1*y*sin(x);\
39+
t*cos(x); t*y*sin(x) %\
40+
3 = t*cos(x); t*y*sin(x); -1*y*sin(x);\
3541
t*cos(x); t*y*sin(x)
3642
set Known component names = v,v,p,u,u
3743
set Used constants = k=0.01
3844
end
3945

40-
#subsection Forcing terms
41-
# set IDs and component masks = 0=v
42-
# set IDs and expressions = 0=-sin(x)*cos(x) + sin(y) + 0.1*cos(x);\
43-
# x*cos(y)+y*sin(x)*sin(x)+y*cos(x)*cos(x); 0;0;0
44-
# set Known component names = v,v,u,u,p
45-
# set Used constants = k=0.0
46-
#end
47-
#
48-
#subsection Dirichlet boundary conditions
49-
# set IDs and component masks = 0=u;p
50-
# set IDs and expressions = 0=0; 0; cos(x); y*sin(x); x*sin(y)
51-
# set Known component names = v,v,u,u,p
52-
# set Used constants = k=0.0
53-
#end
54-
#
55-
#subsection Exact solution
56-
# set Function expression = 0; 0; cos(x); y*sin(x); x*sin(y)
57-
# set Variable names = x,y,t
58-
#end
46+
subsection Neumann boundary conditions
47+
set IDs and component masks = 0 = p
48+
set IDs and expressions = 0 = 0;0;0;0;0
49+
set Known component names = v,v,p,u,u
50+
set Used constants = k=0.01
51+
end
5952

6053
subsection Domain
6154
set Colorize = false
@@ -65,28 +58,11 @@ subsection Domain
6558
end
6659

6760
subsection IMEX Parameters
68-
set Absolute error tolerance = 1e-12
69-
set Final time = 1.0
61+
set Final time = 1e0
7062
set Initial time = 0.0
71-
set Intervals between outputs = 1
7263
set Step size = 1e-1
73-
set Update continuously Jacobian = true
74-
set Use the KINSOL solver = true
7564
end
7665

77-
subsection KINSOL for IMEX
78-
set Level of verbosity of the KINSOL solver = 0
79-
set Maximum number of iteration before Jacobian update = 10
80-
set Maximum number of iterations = 50
81-
set Step tolerance = 1e-12
82-
# newton = basic Newton iteration
83-
# global_newton = Newton with line search
84-
# fixed_point = fixed-point iteration with Anderson Acceleration
85-
# picard = Picard iteration with Anderson Acceleration
86-
set Strategy = global_newton
87-
set Tolerance for residuals = 1e-10
88-
set Use internal KINSOL direct solver = false
89-
end
9066

9167
subsection Navier Stokes Interface
9268
set Block of differential components = 1,0,1
@@ -96,51 +72,25 @@ subsection Navier Stokes Interface
9672
set Finite element space = FESystem[FE_Q(2)^d-FE_Q(1)-FE_Q(2)^d]
9773
set nu [Pa s] = 0.1
9874
set rho [kg m^3] = 1.0
99-
set delta t = 1e-1
75+
set initial delta t = 1e-3
10076
end
10177

10278
subsection Output Parameters
10379
set Files to save in run directory =
10480
set Incremental run prefix =
10581
set Output format = vtu
10682
set Output partitioning = true
83+
set Solution names = v
10784
set Problem base name = Navier_Stokes_chorin-temam
10885
end
10986

110-
111-
subsection Refinement
112-
# Coarsening fraction.
113-
set Bottom fraction = 0.1
114-
115-
# Maximum number of cells.
116-
set Maximum number of cells (if available) = 0
117-
118-
# Maximum number of cells.
119-
set Order (optimize) = 2
120-
121-
# Refinement strategy to use. fraction|number
122-
set Refinement strategy = fraction
123-
124-
# Refinement fraction.
125-
set Top fraction = 0.3
126-
end
127-
12887
subsection piDoMUS<2, 2, LATrilinos>
12988
set Adaptive refinement = false
13089
set Enable finer preconditioner = false
131-
set Initial global refinement = 2
132-
set Jacobian solver tolerance = 1e-8
133-
set Max iterations = 500
134-
set Max iterations finer prec. = 0
135-
set Max tmp vectors = 30
136-
set Max tmp vectors for finer system = 50
90+
set Initial global refinement = 4
13791
set Number of cycles = 1
138-
set Overwrite Newton's iterations = false
139-
set Print some useful informations about processes = true
140-
set Refine mesh during transient = false
141-
set Threshold for solver's restart = 1e-2
142-
set Time stepper = euler
143-
set Use direct solver if available = true
92+
set Jacobian solver tolerance = 1e-12
93+
set Use direct solver if available = false
14494
end
14595

14696
subsection Error Tables

0 commit comments

Comments
 (0)