-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6f1aa38
commit d2a2c28
Showing
3 changed files
with
781 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,150 @@ | ||
# Parameter file generated with | ||
# D2K_GIT_BRANCH= master | ||
# D2K_GIT_SHORTREV= a43b2c9 | ||
# DEAL_II_GIT_BRANCH= master | ||
# DEAL_II_GIT_SHORTREV= 2aed525 | ||
subsection Dirichlet boundary conditions | ||
set IDs and component masks = 0=ALL | ||
set IDs and expressions = 0=(1-y)*y*sin(2*pi*(x-t)) | ||
set Known component names = u | ||
set Used constants = | ||
end | ||
subsection Domain | ||
set Colorize = false | ||
set Copy boundary to manifold ids = false | ||
set Copy material to manifold ids = false | ||
set Create default manifolds = true | ||
set Grid to generate = rectangle | ||
set Input grid file name = | ||
set Manifold descriptors = | ||
set Mesh smoothing alogrithm = none | ||
set Optional Point<spacedim> 1 = 0,0 | ||
set Optional Point<spacedim> 2 = 1,1 | ||
set Optional double 1 = 1.0 | ||
set Optional double 2 = 0.5 | ||
set Optional double 3 = 1.5 | ||
set Optional int 1 = 1 | ||
set Optional int 2 = 2 | ||
set Optional vector of dim int = 1,1 | ||
set Output grid file name = | ||
end | ||
subsection Error Tables | ||
set Compute error = true | ||
set Error file format = tex | ||
set Error precision = 3 | ||
set Output error tables = true | ||
set Solution names = u | ||
set Solution names for latex = u | ||
set Table names = error | ||
set Write error files = false | ||
subsection Table 0 | ||
set Add convergence rates = true | ||
set Extra terms = cells,dofs | ||
set Latex table caption = error | ||
set List of error norms to compute = L2,H1 | ||
set Rate key = | ||
end | ||
end | ||
subsection Exact solution | ||
set Function constants = | ||
set Function expression = (1-y)*y*sin(2*pi*(x-t)) | ||
set Variable names = x,y,t | ||
end | ||
subsection Forcing terms | ||
set IDs and component masks = 0=u | ||
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))) | ||
set Known component names = u | ||
set Used constants = | ||
end | ||
subsection IDA Solver Parameters | ||
set Absolute error tolerance = 1e-4 | ||
set Final time = 0.1 | ||
set Ignore algebraic terms for error computations = false | ||
set Initial condition Newton max iterations = 5 | ||
set Initial condition Newton parameter = 0.33 | ||
set Initial condition type = use_y_diff | ||
set Initial condition type after restart = use_y_dot | ||
set Initial step size = 1e-4 | ||
set Initial time = 0 | ||
set Maximum number of nonlinear iterations = 10 | ||
set Maximum order of BDF = 5 | ||
set Min step size = 5e-5 | ||
set Relative error tolerance = 1e-3 | ||
set Seconds between each output = 1e-2 | ||
set Show output of time steps = true | ||
set Use local tolerances = false | ||
end | ||
subsection IMEX Parameters | ||
set Absolute error tolerance = 1e-6 | ||
set Final time = 0. | ||
set Initial time = 0. | ||
set Intervals between outputs = 1 | ||
set Maximum number of inner nonlinear iterations = 3 | ||
set Maximum number of outer nonlinear iterations = 5 | ||
set Newton relaxation parameter = 1.000000 | ||
set Relative error tolerance = 0.000000 | ||
set Step size = 1e10 | ||
set Update continuously Jacobian = true | ||
end | ||
subsection Initial solution | ||
set Function constants = | ||
set Function expression = 0 | ||
set Variable names = x,y,t | ||
end | ||
subsection Initial solution_dot | ||
set Function constants = | ||
set Function expression = 0 | ||
set Variable names = x,y,t | ||
end | ||
subsection Neumann boundary conditions | ||
set IDs and component masks = | ||
set IDs and expressions = | ||
set Known component names = u | ||
set Used constants = | ||
end | ||
subsection Output Parameters | ||
set Files to save in run directory = | ||
set Incremental run prefix = | ||
set Output format = vtu | ||
set Output partitioning = false | ||
set Problem base name = strong | ||
set Solution names = u | ||
set Subdivisions = 1 | ||
end | ||
subsection Poisson problem | ||
set Block of differential components = 1 | ||
set Blocking of the finite element = u | ||
set Finite element space = FESystem[FE_Q(1)] | ||
end | ||
subsection Refinement | ||
set Bottom fraction = 0.2 | ||
set Maximum number of cells (if available) = 0 | ||
set Order (optimize) = 2 | ||
set Refinement strategy = fraction | ||
set Top fraction = 0.2 | ||
end | ||
subsection Time derivative of Dirichlet boundary conditions | ||
set IDs and component masks = | ||
set IDs and expressions = | ||
set Known component names = u | ||
set Used constants = | ||
end | ||
subsection Zero average constraints | ||
set Known component names = u | ||
set Zero average on boundary = | ||
set Zero average on whole domain = | ||
end | ||
subsection pidomus | ||
set Adaptive refinement = true | ||
set Initial global refinement = 1 | ||
set Jacobian solver tolerance = 1e-8 | ||
set Maximum number of time steps = 10000 | ||
set Number of cycles = 1 | ||
set Overwrite Newton's iterations = true | ||
set Print some useful informations about processes = true | ||
set Refine mesh during transient = true | ||
set Threshold for solver's restart = 1e-2 | ||
set Time stepper = ida | ||
set Show timer = false | ||
set Use direct solver if available = true | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#include "pidomus.h" | ||
#include "interfaces/poisson_problem.h" | ||
#include "tests.h" | ||
|
||
using namespace dealii; | ||
int main (int argc, char *argv[]) | ||
{ | ||
|
||
Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); | ||
|
||
initlog(); | ||
deallog.depth_file(1); | ||
|
||
const int dim = 2; | ||
const int spacedim = 2; | ||
|
||
PoissonProblem<dim,spacedim,LAPETSc> p; | ||
piDoMUS<dim,spacedim,LAPETSc> solver ("pidomus",p); | ||
ParameterAcceptor::initialize(SOURCE_DIR "/parameters/poisson_problem_04.prm", "used_parameters.prm"); | ||
|
||
|
||
solver.run (); | ||
|
||
auto sol = solver.get_solution(); | ||
for (unsigned int i = 0; i<sol.size(); ++i) | ||
deallog << sol[i] << std::endl; | ||
|
||
return 0; | ||
} |
Oops, something went wrong.