Tensor<2, dim, ADNumberType> grad_u;
const Tensor<2, dim, ADNumberType> F =
Physics::Elasticity::Kinematics::F(grad_u);
- const Tensor<1, dim, ADNumberType> N;
- const Tensor<1, dim, ADNumberType> V;
- const Tensor<2, dim, ADNumberType> T1;
- const SymmetricTensor<2, dim, ADNumberType> T2;
- const Tensor<4, dim, ADNumberType> TT1;
- const SymmetricTensor<4, dim, ADNumberType> TT2;
+ const Tensor<1, dim, ADNumberType> N{};
+ const Tensor<1, dim, ADNumberType> V{};
+ const Tensor<2, dim, ADNumberType> T1{};
+ const SymmetricTensor<2, dim, ADNumberType> T2{};
+ const Tensor<4, dim, ADNumberType> TT1{};
+ const SymmetricTensor<4, dim, ADNumberType> TT2{};
const Tensor<1, dim, ADNumberType> ddet_F_dC =
Physics::Transformations::nansons_formula(N, F);
{
std::string type_lin;
double tol_lin;
- double max_iterations_lin;
bool use_static_condensation;
std::string preconditioner_type;
double preconditioner_relaxation;
"1e-6",
Patterns::Double(0.0),
"Linear solver residual (scaled by residual norm)");
- prm.declare_entry(
- "Max iteration multiplier",
- "1",
- Patterns::Double(0.0),
- "Linear solver iterations (multiples of the system matrix size)");
prm.declare_entry("Use static condensation",
"true",
Patterns::Bool(),
{
type_lin = prm.get("Solver type");
tol_lin = prm.get_double("Residual");
- max_iterations_lin = prm.get_double("Max iteration multiplier");
use_static_condensation = prm.get_bool("Use static condensation");
preconditioner_type = prm.get("Preconditioner type");
preconditioner_relaxation = prm.get_double("Preconditioner relaxation");
std::cout << " SLV " << std::flush;
if (parameters.type_lin == "CG")
{
- const auto solver_its = static_cast<unsigned int>(
- tangent_matrix.block(u_dof, u_dof).m() *
- parameters.max_iterations_lin);
+ const auto solver_its = tangent_matrix.block(u_dof, u_dof).m();
const double tol_sol =
parameters.tol_lin * system_rhs.block(u_dof).l2_norm();
SolverControl solver_control(solver_its, tol_sol, false, false);
preconditioner_K_Jp_inv.use_matrix(
tangent_matrix.block(J_dof, p_dof));
ReductionControl solver_control_K_Jp_inv(
- static_cast<unsigned int>(tangent_matrix.block(J_dof, p_dof).m() *
- parameters.max_iterations_lin),
+ tangent_matrix.block(J_dof, p_dof).m(),
1.0e-30,
parameters.tol_lin);
SolverSelector<Vector<double>> solver_K_Jp_inv;
preconditioner_K_con_inv.use_matrix(
tangent_matrix.block(u_dof, u_dof));
ReductionControl solver_control_K_con_inv(
- static_cast<unsigned int>(tangent_matrix.block(u_dof, u_dof).m() *
- parameters.max_iterations_lin),
+ tangent_matrix.block(u_dof, u_dof).m(),
1.0e-30,
parameters.tol_lin);
SolverSelector<Vector<double>> solver_K_con_inv;
{
std::string type_lin;
double tol_lin;
- double max_iterations_lin;
bool use_static_condensation;
std::string preconditioner_type;
double preconditioner_relaxation;
"1e-6",
Patterns::Double(0.0),
"Linear solver residual (scaled by residual norm)");
- prm.declare_entry(
- "Max iteration multiplier",
- "1",
- Patterns::Double(0.0),
- "Linear solver iterations (multiples of the system matrix size)");
prm.declare_entry("Use static condensation",
"true",
Patterns::Bool(),
{
type_lin = prm.get("Solver type");
tol_lin = prm.get_double("Residual");
- max_iterations_lin = prm.get_double("Max iteration multiplier");
use_static_condensation = prm.get_bool("Use static condensation");
preconditioner_type = prm.get("Preconditioner type");
preconditioner_relaxation = prm.get_double("Preconditioner relaxation");
std::cout << " SLV " << std::flush;
if (parameters.type_lin == "CG")
{
- const int solver_its = tangent_matrix.block(u_dof, u_dof).m() *
- parameters.max_iterations_lin;
+ const unsigned int solver_its =
+ tangent_matrix.block(u_dof, u_dof).m();
const double tol_sol =
parameters.tol_lin * system_rhs.block(u_dof).l2_norm();
SolverControl solver_control(solver_its, tol_sol, false, false);
preconditioner_K_Jp_inv.use_matrix(
tangent_matrix.block(J_dof, p_dof));
ReductionControl solver_control_K_Jp_inv(
- tangent_matrix.block(J_dof, p_dof).m() *
- parameters.max_iterations_lin,
+ tangent_matrix.block(J_dof, p_dof).m(),
1.0e-30,
parameters.tol_lin);
SolverSelector<Vector<double>> solver_K_Jp_inv;
preconditioner_K_con_inv.use_matrix(
tangent_matrix.block(u_dof, u_dof));
ReductionControl solver_control_K_con_inv(
- tangent_matrix.block(u_dof, u_dof).m() *
- parameters.max_iterations_lin,
+ tangent_matrix.block(u_dof, u_dof).m(),
1.0e-30,
parameters.tol_lin);
SolverSelector<Vector<double>> solver_K_con_inv;
{
std::string type_lin;
double tol_lin;
- double max_iterations_lin;
bool use_static_condensation;
std::string preconditioner_type;
double preconditioner_relaxation;
"1e-6",
Patterns::Double(0.0),
"Linear solver residual (scaled by residual norm)");
- prm.declare_entry(
- "Max iteration multiplier",
- "1",
- Patterns::Double(0.0),
- "Linear solver iterations (multiples of the system matrix size)");
prm.declare_entry("Use static condensation",
"true",
Patterns::Bool(),
{
type_lin = prm.get("Solver type");
tol_lin = prm.get_double("Residual");
- max_iterations_lin = prm.get_double("Max iteration multiplier");
use_static_condensation = prm.get_bool("Use static condensation");
preconditioner_type = prm.get("Preconditioner type");
preconditioner_relaxation = prm.get_double("Preconditioner relaxation");
std::cout << " SLV " << std::flush;
if (parameters.type_lin == "CG")
{
- const auto solver_its = static_cast<unsigned int>(
- tangent_matrix.block(u_dof, u_dof).m() *
- parameters.max_iterations_lin);
+ const unsigned int solver_its =
+ tangent_matrix.block(u_dof, u_dof).m();
const double tol_sol =
parameters.tol_lin * system_rhs.block(u_dof).l2_norm();
SolverControl solver_control(solver_its, tol_sol, false, false);
preconditioner_K_Jp_inv.use_matrix(
tangent_matrix.block(J_dof, p_dof));
ReductionControl solver_control_K_Jp_inv(
- static_cast<unsigned int>(tangent_matrix.block(J_dof, p_dof).m() *
- parameters.max_iterations_lin),
+ tangent_matrix.block(J_dof, p_dof).m(),
1.0e-30,
parameters.tol_lin);
SolverSelector<Vector<double>> solver_K_Jp_inv;
preconditioner_K_con_inv.use_matrix(
tangent_matrix.block(u_dof, u_dof));
ReductionControl solver_control_K_con_inv(
- static_cast<unsigned int>(tangent_matrix.block(u_dof, u_dof).m() *
- parameters.max_iterations_lin),
+ tangent_matrix.block(u_dof, u_dof).m(),
1.0e-30,
parameters.tol_lin);
SolverSelector<Vector<double>> solver_K_con_inv;
{
std::string type_lin;
double tol_lin;
- double max_iterations_lin;
bool use_static_condensation;
std::string preconditioner_type;
double preconditioner_relaxation;
"1e-6",
Patterns::Double(0.0),
"Linear solver residual (scaled by residual norm)");
- prm.declare_entry(
- "Max iteration multiplier",
- "1",
- Patterns::Double(0.0),
- "Linear solver iterations (multiples of the system matrix size)");
prm.declare_entry("Use static condensation",
"true",
Patterns::Bool(),
{
type_lin = prm.get("Solver type");
tol_lin = prm.get_double("Residual");
- max_iterations_lin = prm.get_double("Max iteration multiplier");
use_static_condensation = prm.get_bool("Use static condensation");
preconditioner_type = prm.get("Preconditioner type");
preconditioner_relaxation = prm.get_double("Preconditioner relaxation");
std::cout << " SLV " << std::flush;
if (parameters.type_lin == "CG")
{
- const int solver_its = tangent_matrix.block(u_dof, u_dof).m() *
- parameters.max_iterations_lin;
+ const unsigned int solver_its =
+ tangent_matrix.block(u_dof, u_dof).m();
const double tol_sol =
parameters.tol_lin * system_rhs.block(u_dof).l2_norm();
SolverControl solver_control(solver_its, tol_sol, false, false);
preconditioner_K_Jp_inv.use_matrix(
tangent_matrix.block(J_dof, p_dof));
ReductionControl solver_control_K_Jp_inv(
- tangent_matrix.block(J_dof, p_dof).m() *
- parameters.max_iterations_lin,
+ tangent_matrix.block(J_dof, p_dof).m(),
1.0e-30,
parameters.tol_lin);
SolverSelector<Vector<double>> solver_K_Jp_inv;
preconditioner_K_con_inv.use_matrix(
tangent_matrix.block(u_dof, u_dof));
ReductionControl solver_control_K_con_inv(
- tangent_matrix.block(u_dof, u_dof).m() *
- parameters.max_iterations_lin,
+ tangent_matrix.block(u_dof, u_dof).m(),
1.0e-30,
parameters.tol_lin);
SolverSelector<Vector<double>> solver_K_con_inv;
<< "Type code: " << static_cast<int>(ad_type_code) << std::endl;
const ADNumberType a = 1.0;
- const Tensor<1, dim, ADNumberType> v;
+ const Tensor<1, dim, ADNumberType> v{};
const SymmetricTensor<2, dim, ADNumberType> A(
unit_symmetric_tensor<dim, ADNumberType>());
const SymmetricTensor<2, dim, ADNumberType> B(
<< "Type code: " << static_cast<int>(ad_type_code) << std::endl;
const ADNumberType a = 1.0;
- const Tensor<1, dim, ADNumberType> v1;
- const Tensor<1, dim, ADNumberType> v2;
+ const Tensor<1, dim, ADNumberType> v1{};
+ const Tensor<1, dim, ADNumberType> v2{};
const Tensor<2, dim, ADNumberType> A(
unit_symmetric_tensor<dim, ADNumberType>());
const Tensor<2, dim, ADNumberType> B(
subsection Linear solver
- # Linear solver iterations (multiples of the system matrix size)
- # In 2-d, this value is best set at 2. In 3-d, a value of 1 work fine.
- set Max iteration multiplier = 2
-
# Linear solver residual (scaled by residual norm)
set Residual = 1e-6
subsection Linear solver
- # Linear solver iterations (multiples of the system matrix size)
- # In 2-d, this value is best set at 2. In 3-d, a value of 1 work fine.
- set Max iteration multiplier = 2
-
# Linear solver residual (scaled by residual norm)
set Residual = 1e-6