Skip to content

Commit ea5c0d8

Browse files
committed
test
1 parent d0a97d3 commit ea5c0d8

File tree

3 files changed

+781
-0
lines changed

3 files changed

+781
-0
lines changed
Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
# Parameter file generated with
2+
# D2K_GIT_BRANCH= master
3+
# D2K_GIT_SHORTREV= a43b2c9
4+
# DEAL_II_GIT_BRANCH= master
5+
# DEAL_II_GIT_SHORTREV= 2aed525
6+
subsection Dirichlet boundary conditions
7+
set IDs and component masks = 0=ALL
8+
set IDs and expressions = 0=(1-y)*y*sin(2*pi*(x-t))
9+
set Known component names = u
10+
set Used constants =
11+
end
12+
subsection Domain
13+
set Colorize = false
14+
set Copy boundary to manifold ids = false
15+
set Copy material to manifold ids = false
16+
set Create default manifolds = true
17+
set Grid to generate = rectangle
18+
set Input grid file name =
19+
set Manifold descriptors =
20+
set Mesh smoothing alogrithm = none
21+
set Optional Point<spacedim> 1 = 0,0
22+
set Optional Point<spacedim> 2 = 1,1
23+
set Optional double 1 = 1.0
24+
set Optional double 2 = 0.5
25+
set Optional double 3 = 1.5
26+
set Optional int 1 = 1
27+
set Optional int 2 = 2
28+
set Optional vector of dim int = 1,1
29+
set Output grid file name =
30+
end
31+
subsection Error Tables
32+
set Compute error = true
33+
set Error file format = tex
34+
set Error precision = 3
35+
set Output error tables = true
36+
set Solution names = u
37+
set Solution names for latex = u
38+
set Table names = error
39+
set Write error files = false
40+
subsection Table 0
41+
set Add convergence rates = true
42+
set Extra terms = cells,dofs
43+
set Latex table caption = error
44+
set List of error norms to compute = L2,H1
45+
set Rate key =
46+
end
47+
end
48+
subsection Exact solution
49+
set Function constants =
50+
set Function expression = (1-y)*y*sin(2*pi*(x-t))
51+
set Variable names = x,y,t
52+
end
53+
subsection Forcing terms
54+
set IDs and component masks = 0=u
55+
set IDs and expressions = 0=2*pi*(y-1)*y*cos(-2*pi*(t-x))-2*(2*pi^2*(y-1)*y*sin(-2*pi*(t-x))-sin(-2*pi*(t-x)))
56+
set Known component names = u
57+
set Used constants =
58+
end
59+
subsection IDA Solver Parameters
60+
set Absolute error tolerance = 1e-4
61+
set Final time = 0.1
62+
set Ignore algebraic terms for error computations = false
63+
set Initial condition Newton max iterations = 5
64+
set Initial condition Newton parameter = 0.33
65+
set Initial condition type = use_y_diff
66+
set Initial condition type after restart = use_y_dot
67+
set Initial step size = 1e-4
68+
set Initial time = 0
69+
set Maximum number of nonlinear iterations = 10
70+
set Maximum order of BDF = 5
71+
set Min step size = 5e-5
72+
set Relative error tolerance = 1e-3
73+
set Seconds between each output = 1e-2
74+
set Show output of time steps = true
75+
set Use local tolerances = false
76+
end
77+
subsection IMEX Parameters
78+
set Absolute error tolerance = 1e-6
79+
set Final time = 0.
80+
set Initial time = 0.
81+
set Intervals between outputs = 1
82+
set Maximum number of inner nonlinear iterations = 3
83+
set Maximum number of outer nonlinear iterations = 5
84+
set Newton relaxation parameter = 1.000000
85+
set Relative error tolerance = 0.000000
86+
set Step size = 1e10
87+
set Update continuously Jacobian = true
88+
end
89+
subsection Initial solution
90+
set Function constants =
91+
set Function expression = 0
92+
set Variable names = x,y,t
93+
end
94+
subsection Initial solution_dot
95+
set Function constants =
96+
set Function expression = 0
97+
set Variable names = x,y,t
98+
end
99+
subsection Neumann boundary conditions
100+
set IDs and component masks =
101+
set IDs and expressions =
102+
set Known component names = u
103+
set Used constants =
104+
end
105+
subsection Output Parameters
106+
set Files to save in run directory =
107+
set Incremental run prefix =
108+
set Output format = vtu
109+
set Output partitioning = false
110+
set Problem base name = strong
111+
set Solution names = u
112+
set Subdivisions = 1
113+
end
114+
subsection Poisson problem
115+
set Block of differential components = 1
116+
set Blocking of the finite element = u
117+
set Finite element space = FESystem[FE_Q(1)]
118+
end
119+
subsection Refinement
120+
set Bottom fraction = 0.2
121+
set Maximum number of cells (if available) = 0
122+
set Order (optimize) = 2
123+
set Refinement strategy = fraction
124+
set Top fraction = 0.2
125+
end
126+
subsection Time derivative of Dirichlet boundary conditions
127+
set IDs and component masks =
128+
set IDs and expressions =
129+
set Known component names = u
130+
set Used constants =
131+
end
132+
subsection Zero average constraints
133+
set Known component names = u
134+
set Zero average on boundary =
135+
set Zero average on whole domain =
136+
end
137+
subsection pidomus
138+
set Adaptive refinement = true
139+
set Initial global refinement = 1
140+
set Jacobian solver tolerance = 1e-8
141+
set Maximum number of time steps = 10000
142+
set Number of cycles = 1
143+
set Overwrite Newton's iterations = true
144+
set Print some useful informations about processes = true
145+
set Refine mesh during transient = true
146+
set Threshold for solver's restart = 1e-2
147+
set Time stepper = ida
148+
set Show timer = false
149+
set Use direct solver if available = true
150+
end

tests/poisson_04.cc

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#include "pidomus.h"
2+
#include "interfaces/poisson_problem.h"
3+
#include "tests.h"
4+
5+
using namespace dealii;
6+
int main (int argc, char *argv[])
7+
{
8+
9+
Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1);
10+
11+
initlog();
12+
deallog.depth_file(1);
13+
14+
const int dim = 2;
15+
const int spacedim = 2;
16+
17+
PoissonProblem<dim,spacedim,LAPETSc> p;
18+
piDoMUS<dim,spacedim,LAPETSc> solver ("pidomus",p);
19+
ParameterAcceptor::initialize(SOURCE_DIR "/parameters/poisson_problem_04.prm", "used_parameters.prm");
20+
21+
22+
solver.run ();
23+
24+
auto sol = solver.get_solution();
25+
for (unsigned int i = 0; i<sol.size(); ++i)
26+
deallog << sol[i] << std::endl;
27+
28+
return 0;
29+
}

0 commit comments

Comments
 (0)