void
test_scalar_scalar_coupled()
{
- typedef AD::ScalarFunction<dim, ad_type_code, number_t> ADHelper;
- typedef typename ADHelper::ad_type ADNumberType;
- typedef typename ADHelper::scalar_type ScalarNumberType;
+ using ADHelper = AD::ScalarFunction<dim, ad_type_code, number_t>;
+ using ADNumberType = typename ADHelper::ad_type;
+ using ScalarNumberType = typename ADHelper::scalar_type;
std::cout << "*** Test variables: Scalar + Scalar (coupled), "
<< "dim = " << Utilities::to_string(dim) << ", "
FullMatrix<ScalarNumberType> D2psi;
// Function and its derivatives
- typedef FunctionsTestScalarScalarCoupled<dim, ADNumberType> func_ad;
+ using func_ad = FunctionsTestScalarScalarCoupled<dim, ADNumberType>;
// Setup the variable components and choose a value at which to
// evaluate the tape
<< "extracted Dpsi (s2): " << dpsi_ds2 << "\n";
// Verify the result
- typedef FunctionsTestScalarScalarCoupled<dim, ScalarNumberType> func;
- static const ScalarNumberType tol =
+ using func = FunctionsTestScalarScalarCoupled<dim, ScalarNumberType>;
+ static const ScalarNumberType tol =
1e5 * std::numeric_limits<ScalarNumberType>::epsilon();
Assert(std::abs(psi - func::psi(s1, s2)) < tol,
ExcMessage("No match for function value."));
void
test_vector_scalar_coupled()
{
- typedef AD::ScalarFunction<dim, ad_type_code, number_t> ADHelper;
- typedef typename ADHelper::ad_type ADNumberType;
- typedef typename ADHelper::scalar_type ScalarNumberType;
+ using ADHelper = AD::ScalarFunction<dim, ad_type_code, number_t>;
+ using ADNumberType = typename ADHelper::ad_type;
+ using ScalarNumberType = typename ADHelper::scalar_type;
std::cout << "*** Test variables: Vector + Scalar (coupled), "
<< "dim = " << Utilities::to_string(dim) << ", "
FullMatrix<ScalarNumberType> D2psi;
// Function and its derivatives
- typedef FunctionsTestVectorScalarCoupled<dim, ADNumberType> func_ad;
+ using func_ad = FunctionsTestVectorScalarCoupled<dim, ADNumberType>;
// Setup the variable components and choose a value at which to
// evaluate the tape
<< "extracted Dpsi (s): " << dpsi_ds << "\n";
// Verify the result
- typedef FunctionsTestVectorScalarCoupled<dim, ScalarNumberType> func;
- static const ScalarNumberType tol =
+ using func = FunctionsTestVectorScalarCoupled<dim, ScalarNumberType>;
+ static const ScalarNumberType tol =
1e5 * std::numeric_limits<ScalarNumberType>::epsilon();
Assert(std::abs(psi - func::psi(v, s)) < tol,
ExcMessage("No match for function value."));
void
test_tensor_scalar_coupled()
{
- typedef AD::ScalarFunction<dim, ad_type_code, number_t> ADHelper;
- typedef typename ADHelper::ad_type ADNumberType;
- typedef typename ADHelper::scalar_type ScalarNumberType;
+ using ADHelper = AD::ScalarFunction<dim, ad_type_code, number_t>;
+ using ADNumberType = typename ADHelper::ad_type;
+ using ScalarNumberType = typename ADHelper::scalar_type;
std::cout << "*** Test variables: Tensor + Scalar (coupled), "
<< "dim = " << Utilities::to_string(dim) << ", "
FullMatrix<ScalarNumberType> D2psi;
// Function and its derivatives
- typedef FunctionsTestTensorScalarCoupled<dim, ADNumberType> func_ad;
+ using func_ad = FunctionsTestTensorScalarCoupled<dim, ADNumberType>;
const FEValuesExtractors::Tensor<2> t_dof(0);
const FEValuesExtractors::Scalar s_dof(
;
// Verify the result
- typedef FunctionsTestTensorScalarCoupled<dim, ScalarNumberType> func;
- static const ScalarNumberType tol =
+ using func = FunctionsTestTensorScalarCoupled<dim, ScalarNumberType>;
+ static const ScalarNumberType tol =
1e5 * std::numeric_limits<ScalarNumberType>::epsilon();
Assert(std::abs(psi - func::psi(t, s)) < tol,
void
test_vector_vector_coupled()
{
- typedef AD::ScalarFunction<dim, ad_type_code, number_t> ADHelper;
- typedef typename ADHelper::ad_type ADNumberType;
- typedef typename ADHelper::scalar_type ScalarNumberType;
+ using ADHelper = AD::ScalarFunction<dim, ad_type_code, number_t>;
+ using ADNumberType = typename ADHelper::ad_type;
+ using ScalarNumberType = typename ADHelper::scalar_type;
std::cout << "*** Test variables: Vector + Vector (coupled), "
<< "dim = " << Utilities::to_string(dim) << ", "
FullMatrix<ScalarNumberType> D2psi;
// Function and its derivatives
- typedef FunctionsTestVectorVectorCoupled<dim, ADNumberType> func_ad;
+ using func_ad = FunctionsTestVectorVectorCoupled<dim, ADNumberType>;
const FEValuesExtractors::Vector v1_dof(0);
const FEValuesExtractors::Vector v2_dof(
<< "extracted Dpsi (v2): " << dpsi_dv2 << "\n";
// Verify the result
- typedef FunctionsTestVectorVectorCoupled<dim, ScalarNumberType> func;
- static const ScalarNumberType tol =
+ using func = FunctionsTestVectorVectorCoupled<dim, ScalarNumberType>;
+ static const ScalarNumberType tol =
1e5 * std::numeric_limits<ScalarNumberType>::epsilon();
Assert(std::abs(psi - func::psi(v1, v2)) < tol,
void
test_tensor_vector_coupled()
{
- typedef AD::ScalarFunction<dim, ad_type_code, number_t> ADHelper;
- typedef typename ADHelper::ad_type ADNumberType;
- typedef typename ADHelper::scalar_type ScalarNumberType;
+ using ADHelper = AD::ScalarFunction<dim, ad_type_code, number_t>;
+ using ADNumberType = typename ADHelper::ad_type;
+ using ScalarNumberType = typename ADHelper::scalar_type;
std::cout << "*** Test variables: Tensor + Vector (coupled), "
<< "dim = " << Utilities::to_string(dim) << ", "
FullMatrix<ScalarNumberType> D2psi;
// Function and its derivatives
- typedef FunctionsTestTensorVectorCoupled<dim, ADNumberType> func_ad;
+ using func_ad = FunctionsTestTensorVectorCoupled<dim, ADNumberType>;
// Setup the variable components and choose a value at which to
// evaluate the tape
<< "extracted Dpsi (v): " << dpsi_dv << "\n";
// Verify the result
- typedef FunctionsTestTensorVectorCoupled<dim, ScalarNumberType> func;
- static const ScalarNumberType tol =
+ using func = FunctionsTestTensorVectorCoupled<dim, ScalarNumberType>;
+ static const ScalarNumberType tol =
1e5 * std::numeric_limits<ScalarNumberType>::epsilon();
std::cout << "dpsi_dt: " << dpsi_dt << std::endl;
std::cout << "func::dpsi_dt(t,v): " << func::dpsi_dt(t, v) << std::endl;
void
test_symmetric_tensor_vector_coupled()
{
- typedef AD::ScalarFunction<dim, ad_type_code, number_t> ADHelper;
- typedef typename ADHelper::ad_type ADNumberType;
- typedef typename ADHelper::scalar_type ScalarNumberType;
+ using ADHelper = AD::ScalarFunction<dim, ad_type_code, number_t>;
+ using ADNumberType = typename ADHelper::ad_type;
+ using ScalarNumberType = typename ADHelper::scalar_type;
std::cout << "*** Test variables: SymmetricTensor + Vector (coupled), "
<< "dim = " << Utilities::to_string(dim) << ", "
FullMatrix<ScalarNumberType> D2psi;
// Function and its derivatives
- typedef FunctionsTestSymmetricTensorVectorCoupled<dim, ADNumberType> func_ad;
+ using func_ad = FunctionsTestSymmetricTensorVectorCoupled<dim, ADNumberType>;
// Setup the variable components and choose a value at which to
// evaluate the tape
<< "extracted Dpsi (v): " << dpsi_dv << "\n";
// Verify the result
- typedef FunctionsTestSymmetricTensorVectorCoupled<dim, ScalarNumberType> func;
- static const ScalarNumberType tol =
+ using func = FunctionsTestSymmetricTensorVectorCoupled<dim, ScalarNumberType>;
+ static const ScalarNumberType tol =
1e5 * std::numeric_limits<ScalarNumberType>::epsilon();
std::cout << "dpsi_dt: " << dpsi_dt << std::endl;
std::cout << "func::dpsi_dt(t,v): " << func::dpsi_dt(t, v) << std::endl;
void
test_symmetric_tensor_vector_coupled()
{
- typedef AD::ScalarFunction<dim, ad_type_code, number_t> ADHelper;
- typedef typename ADHelper::ad_type ADNumberType;
- typedef typename ADHelper::scalar_type ScalarNumberType;
+ using ADHelper = AD::ScalarFunction<dim, ad_type_code, number_t>;
+ using ADNumberType = typename ADHelper::ad_type;
+ using ScalarNumberType = typename ADHelper::scalar_type;
std::cout << "*** Test variables: SymmetricTensor + Vector (coupled), "
<< "dim = " << Utilities::to_string(dim) << ", "
FullMatrix<ScalarNumberType> D2psi;
// Function and its derivatives
- typedef FunctionsTestSymmetricTensorVectorCoupled<dim, ADNumberType> func_ad;
+ using func_ad = FunctionsTestSymmetricTensorVectorCoupled<dim, ADNumberType>;
// Setup the variable components and choose a value at which to
// evaluate the tape
<< "extracted Dpsi (v): " << dpsi_dv << "\n";
// Verify the result
- typedef FunctionsTestSymmetricTensorVectorCoupled<dim, ScalarNumberType> func;
- static const ScalarNumberType tol =
+ using func = FunctionsTestSymmetricTensorVectorCoupled<dim, ScalarNumberType>;
+ static const ScalarNumberType tol =
1e5 * std::numeric_limits<ScalarNumberType>::epsilon();
std::cout << "dpsi_dt: " << dpsi_dt << std::endl;
std::cout << "func::dpsi_dt(t,v): " << func::dpsi_dt(t, v) << std::endl;
void
test_symmetric_tensor_tensor_coupled()
{
- typedef AD::ScalarFunction<dim, ad_type_code, number_t> ADHelper;
- typedef typename ADHelper::ad_type ADNumberType;
- typedef typename ADHelper::scalar_type ScalarNumberType;
+ using ADHelper = AD::ScalarFunction<dim, ad_type_code, number_t>;
+ using ADNumberType = typename ADHelper::ad_type;
+ using ScalarNumberType = typename ADHelper::scalar_type;
std::cout << "*** Test variables: SymmetricTensor + Tensor (coupled), "
<< "dim = " << Utilities::to_string(dim) << ", "
FullMatrix<ScalarNumberType> D2psi;
// Function and its derivatives
- typedef FunctionsTestSymmetricTensorTensorCoupled<dim, ADNumberType> func_ad;
+ using func_ad = FunctionsTestSymmetricTensorTensorCoupled<dim, ADNumberType>;
// Setup the variable components and choose a value at which to
// evaluate the tape
<< "extracted Dpsi (t2): " << dpsi_dt2 << "\n";
// Verify the result
- typedef FunctionsTestSymmetricTensorTensorCoupled<dim, ScalarNumberType> func;
- static const ScalarNumberType tol =
+ using func = FunctionsTestSymmetricTensorTensorCoupled<dim, ScalarNumberType>;
+ static const ScalarNumberType tol =
1e5 * std::numeric_limits<ScalarNumberType>::epsilon();
std::cout << "dpsi_dt1: " << dpsi_dt1 << std::endl;
std::cout << "func::dpsi_dt1(t1,t2): " << func::dpsi_dt1(t1, t2) << std::endl;
void
test_symmetric_tensor_symmetric_tensor_coupled()
{
- typedef AD::ScalarFunction<dim, ad_type_code, number_t> ADHelper;
- typedef typename ADHelper::ad_type ADNumberType;
- typedef typename ADHelper::scalar_type ScalarNumberType;
+ using ADHelper = AD::ScalarFunction<dim, ad_type_code, number_t>;
+ using ADNumberType = typename ADHelper::ad_type;
+ using ScalarNumberType = typename ADHelper::scalar_type;
std::cout
<< "*** Test variables: SymmetricTensor + SymmetricTensor (coupled), "
FullMatrix<ScalarNumberType> D2psi;
// Function and its derivatives
- typedef FunctionsTestSymmetricTensorSymmetricTensorCoupled<dim, ADNumberType>
- func_ad;
+ using func_ad =
+ FunctionsTestSymmetricTensorSymmetricTensorCoupled<dim, ADNumberType>;
// Setup the variable components and choose a value at which to
// evaluate the tape
<< "extracted Dpsi (t2): " << dpsi_dt2 << "\n";
// Verify the result
- typedef FunctionsTestSymmetricTensorSymmetricTensorCoupled<dim,
- ScalarNumberType>
- func;
+ using func =
+ FunctionsTestSymmetricTensorSymmetricTensorCoupled<dim, ScalarNumberType>;
static const ScalarNumberType tol =
1e5 * std::numeric_limits<ScalarNumberType>::epsilon();
std::cout << "dpsi_dt1: " << dpsi_dt1 << std::endl;
void
test_tensor_vector_scalar_coupled()
{
- typedef AD::ScalarFunction<dim, ad_type_code, number_t> ADHelper;
- typedef typename ADHelper::ad_type ADNumberType;
- typedef typename ADHelper::scalar_type ScalarNumberType;
+ using ADHelper = AD::ScalarFunction<dim, ad_type_code, number_t>;
+ using ADNumberType = typename ADHelper::ad_type;
+ using ScalarNumberType = typename ADHelper::scalar_type;
const unsigned int this_mpi_process =
Utilities::MPI::this_mpi_process(MPI_COMM_WORLD);
FullMatrix<ScalarNumberType> D2psi;
// Function and its derivatives
- typedef FunctionsTestTensorVectorScalarCoupled<dim, ADNumberType> func_ad;
+ using func_ad = FunctionsTestTensorVectorScalarCoupled<dim, ADNumberType>;
// Setup the variable components and choose a value at which to
// evaluate the tape
<< "extracted Dpsi (s): " << dpsi_ds << "\n";
// Verify the result
- typedef FunctionsTestTensorVectorScalarCoupled<dim, ScalarNumberType> func;
- static const ScalarNumberType tol =
+ using func = FunctionsTestTensorVectorScalarCoupled<dim, ScalarNumberType>;
+ static const ScalarNumberType tol =
1e5 * std::numeric_limits<ScalarNumberType>::epsilon();
Assert(std::abs(psi - func::psi(t, v, s)) < tol,
ExcMessage("No match for function value."));
void
test_tensor_vector_scalar_coupled()
{
- typedef AD::ScalarFunction<dim, ad_type_code, number_t> ADHelper;
- typedef typename ADHelper::ad_type ADNumberType;
- typedef typename ADHelper::scalar_type ScalarNumberType;
+ using ADHelper = AD::ScalarFunction<dim, ad_type_code, number_t>;
+ using ADNumberType = typename ADHelper::ad_type;
+ using ScalarNumberType = typename ADHelper::scalar_type;
const unsigned int this_mpi_process =
Utilities::MPI::this_mpi_process(MPI_COMM_WORLD);
FullMatrix<ScalarNumberType> D2psi;
// Function and its derivatives
- typedef FunctionsTestTensorVectorScalarCoupled<dim, ADNumberType> func_ad;
+ using func_ad = FunctionsTestTensorVectorScalarCoupled<dim, ADNumberType>;
// Setup the variable components and choose a value at which to
// evaluate the tape
<< "extracted Dpsi (s): " << dpsi_ds << "\n";
// Verify the result
- typedef FunctionsTestTensorVectorScalarCoupled<dim, ScalarNumberType> func;
- static const ScalarNumberType tol =
+ using func = FunctionsTestTensorVectorScalarCoupled<dim, ScalarNumberType>;
+ static const ScalarNumberType tol =
1e5 * std::numeric_limits<ScalarNumberType>::epsilon();
Assert(std::abs(psi - func::psi(t, v, s)) < tol,
ExcMessage("No match for function value."));
void
test_scalar()
{
- typedef AD::ScalarFunction<dim, ad_type_code, number_t> ADHelper;
- typedef typename ADHelper::ad_type ADNumberType;
- typedef typename ADHelper::scalar_type ScalarNumberType;
+ using ADHelper = AD::ScalarFunction<dim, ad_type_code, number_t>;
+ using ADNumberType = typename ADHelper::ad_type;
+ using ScalarNumberType = typename ADHelper::scalar_type;
std::cout << "*** Test variables: Scalar dof, "
<< "dim = " << Utilities::to_string(dim) << ", "
FullMatrix<ScalarNumberType> D2psi;
// Function and its derivatives
- typedef FunctionsTestScalar<dim, ADNumberType> func_ad;
+ using func_ad = FunctionsTestScalar<dim, ADNumberType>;
// Setup the variable components and choose a value at which to
// evaluate the tape
ad_helper.extract_gradient_component(Dpsi, s_dof);
// Verify the result
- typedef FunctionsTestScalar<dim, ScalarNumberType> func;
- static const ScalarNumberType tol =
+ using func = FunctionsTestScalar<dim, ScalarNumberType>;
+ static const ScalarNumberType tol =
1e5 * std::numeric_limits<ScalarNumberType>::epsilon();
std::cout << "psi: " << psi << std::endl;
std::cout << "func::psi(s): " << func::psi(s) << std::endl;
void
test_vector()
{
- typedef AD::ScalarFunction<dim, ad_type_code, number_t> ADHelper;
- typedef typename ADHelper::ad_type ADNumberType;
- typedef typename ADHelper::scalar_type ScalarNumberType;
+ using ADHelper = AD::ScalarFunction<dim, ad_type_code, number_t>;
+ using ADNumberType = typename ADHelper::ad_type;
+ using ScalarNumberType = typename ADHelper::scalar_type;
std::cout << "*** Test variables: Vector dof, "
<< "dim = " << Utilities::to_string(dim) << ", "
FullMatrix<ScalarNumberType> D2psi;
// Function and its derivatives
- typedef FunctionsTestVector<dim, ADNumberType> func_ad;
+ using func_ad = FunctionsTestVector<dim, ADNumberType>;
// Setup the variable components and choose a value at which to
// evaluate the tape
ad_helper.extract_gradient_component(Dpsi, v_dof);
// Verify the result
- typedef FunctionsTestVector<dim, ScalarNumberType> func;
- static const ScalarNumberType tol =
+ using func = FunctionsTestVector<dim, ScalarNumberType>;
+ static const ScalarNumberType tol =
1e5 * std::numeric_limits<ScalarNumberType>::epsilon();
std::cout << "psi: " << psi << std::endl;
std::cout << "func::psi(v): " << func::psi(v) << std::endl;
void
test_tensor()
{
- typedef AD::ScalarFunction<dim, ad_type_code, number_t> ADHelper;
- typedef typename ADHelper::ad_type ADNumberType;
- typedef typename ADHelper::scalar_type ScalarNumberType;
+ using ADHelper = AD::ScalarFunction<dim, ad_type_code, number_t>;
+ using ADNumberType = typename ADHelper::ad_type;
+ using ScalarNumberType = typename ADHelper::scalar_type;
std::cout << "*** Test variables: Tensor dof, "
<< "dim = " << Utilities::to_string(dim) << ", "
FullMatrix<ScalarNumberType> D2psi;
// Function and its derivatives
- typedef FunctionsTestTensor<dim, ADNumberType> func_ad;
+ using func_ad = FunctionsTestTensor<dim, ADNumberType>;
// Setup the variable components and choose a value at which to
// evaluate the tape
ad_helper.extract_gradient_component(Dpsi, t_dof);
// Verify the result
- typedef FunctionsTestTensor<dim, ScalarNumberType> func;
- static const ScalarNumberType tol =
+ using func = FunctionsTestTensor<dim, ScalarNumberType>;
+ static const ScalarNumberType tol =
1e5 * std::numeric_limits<ScalarNumberType>::epsilon();
std::cout << "psi: " << psi << std::endl;
std::cout << "func::psi(t): " << func::psi(t) << std::endl;
void
test_symmetric_tensor()
{
- typedef AD::ScalarFunction<dim, ad_type_code, number_t> ADHelper;
- typedef typename ADHelper::ad_type ADNumberType;
- typedef typename ADHelper::scalar_type ScalarNumberType;
+ using ADHelper = AD::ScalarFunction<dim, ad_type_code, number_t>;
+ using ADNumberType = typename ADHelper::ad_type;
+ using ScalarNumberType = typename ADHelper::scalar_type;
std::cout << "*** Test variables: SymmetricTensor dof, "
<< "dim = " << Utilities::to_string(dim) << ", "
FullMatrix<ScalarNumberType> D2psi;
// Function and its derivatives
- typedef FunctionsTestSymmetricTensor<dim, ADNumberType> func_ad;
+ using func_ad = FunctionsTestSymmetricTensor<dim, ADNumberType>;
// Setup the variable components and choose a value at which to
// evaluate the tape
ad_helper.extract_gradient_component(Dpsi, t_dof);
// Verify the result
- typedef FunctionsTestSymmetricTensor<dim, ScalarNumberType> func;
- static const ScalarNumberType tol =
+ using func = FunctionsTestSymmetricTensor<dim, ScalarNumberType>;
+ static const ScalarNumberType tol =
1e5 * std::numeric_limits<ScalarNumberType>::epsilon();
std::cout << "psi: " << psi << std::endl;
std::cout << "func::psi(t): " << func::psi(t) << std::endl;
void
test_AD_vector_jacobian()
{
- typedef AD::VectorFunction<dim, ad_type_code, number_t> ADHelper;
- typedef typename ADHelper::ad_type ADNumberType;
- typedef typename ADHelper::scalar_type ScalarNumberType;
+ using ADHelper = AD::VectorFunction<dim, ad_type_code, number_t>;
+ using ADNumberType = typename ADHelper::ad_type;
+ using ScalarNumberType = typename ADHelper::scalar_type;
std::cout << "*** Test variables: Variables: 1 independent, 1 dependent, "
<< "dim = " << Utilities::to_string(dim) << ", "
<< "Type code: " << static_cast<int>(ad_type_code) << std::endl;
// Function and its derivatives
- typedef FunctionsTestScalar<dim, ADNumberType> func_ad;
+ using func_ad = FunctionsTestScalar<dim, ADNumberType>;
// Setup the variable components and choose a value at which to
// evaluate the tape
Dfuncs.print_formatted(std::cout, 3, true, 0, "0.0");
// Verify the result
- typedef FunctionsTestScalar<dim, ScalarNumberType> func;
- static const ScalarNumberType tol =
+ using func = FunctionsTestScalar<dim, ScalarNumberType>;
+ static const ScalarNumberType tol =
1e5 * std::numeric_limits<ScalarNumberType>::epsilon();
std::cout << "funcs[0]: " << funcs[0]
<< "\t func::f0(s[0])): " << func::f0(s[0]) << std::endl;
void
test_AD_vector_jacobian()
{
- typedef AD::VectorFunction<dim, ad_type_code, number_t> ADHelper;
- typedef typename ADHelper::ad_type ADNumberType;
- typedef typename ADHelper::scalar_type ScalarNumberType;
+ using ADHelper = AD::VectorFunction<dim, ad_type_code, number_t>;
+ using ADNumberType = typename ADHelper::ad_type;
+ using ScalarNumberType = typename ADHelper::scalar_type;
std::cout << "*** Test variables: Variables: 1 independent, 2 dependent, "
<< "dim = " << Utilities::to_string(dim) << ", "
<< "Type code: " << static_cast<int>(ad_type_code) << std::endl;
// Function and its derivatives
- typedef FunctionsTestSquare<dim, ADNumberType> func_ad;
+ using func_ad = FunctionsTestSquare<dim, ADNumberType>;
// Setup the variable components and choose a value at which to
// evaluate the tape
Dfuncs.print_formatted(std::cout, 3, true, 0, "0.0");
// Verify the result
- typedef FunctionsTestSquare<dim, ScalarNumberType> func;
- static const ScalarNumberType tol =
+ using func = FunctionsTestSquare<dim, ScalarNumberType>;
+ static const ScalarNumberType tol =
1e5 * std::numeric_limits<ScalarNumberType>::epsilon();
std::cout << "funcs[0]: " << funcs[0]
<< "\t func::f0(s[0])): " << func::f0(s[0]) << std::endl;
void
test_AD_vector_jacobian()
{
- typedef AD::VectorFunction<dim, ad_type_code, number_t> ADHelper;
- typedef typename ADHelper::ad_type ADNumberType;
- typedef typename ADHelper::scalar_type ScalarNumberType;
+ using ADHelper = AD::VectorFunction<dim, ad_type_code, number_t>;
+ using ADNumberType = typename ADHelper::ad_type;
+ using ScalarNumberType = typename ADHelper::scalar_type;
std::cout << "*** Test variables: Variables: 2 independent, 1 dependent, "
<< "dim = " << Utilities::to_string(dim) << ", "
<< "Type code: " << static_cast<int>(ad_type_code) << std::endl;
// Function and its derivatives
- typedef FunctionsTestSquare<dim, ADNumberType> func_ad;
+ using func_ad = FunctionsTestSquare<dim, ADNumberType>;
// Setup the variable components and choose a value at which to
// evaluate the tape
Dfuncs.print_formatted(std::cout, 3, true, 0, "0.0");
// Verify the result
- typedef FunctionsTestSquare<dim, ScalarNumberType> func;
- static const ScalarNumberType tol =
+ using func = FunctionsTestSquare<dim, ScalarNumberType>;
+ static const ScalarNumberType tol =
1e5 * std::numeric_limits<ScalarNumberType>::epsilon();
std::cout << "funcs[0]: " << funcs[0]
<< "\t func::f0(s[0],s[1])): " << func::f0(s[0], s[1]) << std::endl;
void
test_AD_vector_jacobian()
{
- typedef AD::VectorFunction<dim, ad_type_code, number_t> ADHelper;
- typedef typename ADHelper::ad_type ADNumberType;
- typedef typename ADHelper::scalar_type ScalarNumberType;
+ using ADHelper = AD::VectorFunction<dim, ad_type_code, number_t>;
+ using ADNumberType = typename ADHelper::ad_type;
+ using ScalarNumberType = typename ADHelper::scalar_type;
std::cout << "*** Test variables: Variables: 2 independent, 2 dependent, "
<< "dim = " << Utilities::to_string(dim) << ", "
<< "Type code: " << static_cast<int>(ad_type_code) << std::endl;
// Function and its derivatives
- typedef FunctionsTestSquare<dim, ADNumberType> func_ad;
+ using func_ad = FunctionsTestSquare<dim, ADNumberType>;
// Setup the variable components and choose a value at which to
// evaluate the tape
Dfuncs.print_formatted(std::cout, 3, true, 0, "0.0");
// Verify the result
- typedef FunctionsTestSquare<dim, ScalarNumberType> func;
- static const ScalarNumberType tol =
+ using func = FunctionsTestSquare<dim, ScalarNumberType>;
+ static const ScalarNumberType tol =
1e5 * std::numeric_limits<ScalarNumberType>::epsilon();
std::cout << "funcs[0]: " << funcs[0]
<< "\t func::f0(s[0],s[1])): " << func::f0(s[0], s[1]) << std::endl;
void
test_physics()
{
- typedef
- typename AD::NumberTraits<number_t, ad_type_code>::ad_type ADNumberType;
+ using ADNumberType =
+ typename AD::NumberTraits<number_t, ad_type_code>::ad_type;
std::cout << "*** Test physics functions: Kinematics, "
<< "dim = " << Utilities::to_string(dim) << ", "
void
test_physics()
{
- typedef
- typename AD::NumberTraits<number_t, ad_type_code>::ad_type ADNumberType;
+ using ADNumberType =
+ typename AD::NumberTraits<number_t, ad_type_code>::ad_type;
std::cout << "*** Test physics functions: Standard tensors, "
<< "dim = " << Utilities::to_string(dim) << ", "
void
test_physics()
{
- typedef
- typename AD::NumberTraits<number_t, ad_type_code>::ad_type ADNumberType;
+ using ADNumberType =
+ typename AD::NumberTraits<number_t, ad_type_code>::ad_type;
std::cout << "*** Test physics functions: Standard tensors, "
<< "dim = " << Utilities::to_string(dim) << ", "
Assert(n_dependent_variables == n_independent_variables,
ExcMessage("Expect square system."));
- typedef AD::ResidualLinearization<ad_type_code, number_t> ADHelper;
- typedef typename ADHelper::ad_type ADNumberType;
+ using ADHelper = AD::ResidualLinearization<ad_type_code, number_t>;
+ using ADNumberType = typename ADHelper::ad_type;
ADHelper ad_helper(n_independent_variables, n_dependent_variables);
ad_helper.set_tape_buffer_sizes(); // Increase the buffer size from the
// default values
const unsigned int n_independent_variables =
SymmetricTensor<2, dim>::n_independent_components + 1 + 1;
- typedef AD::ScalarFunction<dim, ad_type_code, number_t> ADHelper;
- typedef typename ADHelper::ad_type ADNumberType;
+ using ADHelper = AD::ScalarFunction<dim, ad_type_code, number_t>;
+ using ADNumberType = typename ADHelper::ad_type;
ADHelper ad_helper(n_independent_variables);
ad_helper.set_tape_buffer_sizes(); // Increase the buffer size from the
// default values
const FEValuesExtractors::Scalar J_dofs(0);
const unsigned int n_independent_variables = 1;
- typedef typename AD::ScalarFunction<dim, ad_type_code, double>::ad_type
- ADNumberType;
+ using ADNumberType =
+ typename AD::ScalarFunction<dim, ad_type_code, double>::ad_type;
AD::ScalarFunction<dim, ad_type_code, double> ad_helper(
n_independent_variables);
ad_helper.set_tape_buffer_sizes(); // Increase the buffer size from the
const unsigned int n_independent_variables = data.local_dof_indices.size();
- typedef AD::EnergyFunctional<ad_type_code, number_t> ADHelper;
- typedef typename ADHelper::ad_type ADNumberType;
+ using ADHelper = AD::EnergyFunctional<ad_type_code, number_t>;
+ using ADNumberType = typename ADHelper::ad_type;
ADHelper ad_helper(n_independent_variables);
ad_helper.set_tape_buffer_sizes(); // Increase the buffer size from the
// default values
Assert(n_dependent_variables == n_independent_variables,
ExcMessage("Expect square system."));
- typedef AD::VectorFunction<dim, ad_type_code, number_t> ADHelper;
- typedef typename ADHelper::ad_type ADNumberType;
+ using ADHelper = AD::VectorFunction<dim, ad_type_code, number_t>;
+ using ADNumberType = typename ADHelper::ad_type;
ADHelper ad_helper(n_independent_variables, n_dependent_variables);
ad_helper.set_tape_buffer_sizes(); // Increase the buffer size from the
// default values
void
test_symmetric_tensor()
{
- typedef
- typename AD::NumberTraits<number_t, ad_type_code>::ad_type ADNumberType;
+ using ADNumberType =
+ typename AD::NumberTraits<number_t, ad_type_code>::ad_type;
std::cout << "*** Test SymmetricTensor functions, "
<< "dim = " << Utilities::to_string(dim) << ", "
void
test_symmetric_tensor()
{
- typedef AD::ScalarFunction<dim, ad_type_code, number_t> ADHelper;
- typedef typename ADHelper::ad_type ADNumberType;
- typedef typename ADHelper::scalar_type ScalarNumberType;
+ using ADHelper = AD::ScalarFunction<dim, ad_type_code, number_t>;
+ using ADNumberType = typename ADHelper::ad_type;
+ using ScalarNumberType = typename ADHelper::scalar_type;
std::cout << "*** dim = " << Utilities::to_string(dim) << ", "
<< "Type code: " << static_cast<int>(ad_type_code) << std::endl;
FullMatrix<ScalarNumberType> D2psi;
// Function and its derivatives
- typedef FunctionsTestSymmetricTensor<dim, ADNumberType> func_ad;
+ using func_ad = FunctionsTestSymmetricTensor<dim, ADNumberType>;
// Setup the variable components and choose a value at which to
// evaluate the tape
ad_helper.extract_gradient_component(Dpsi, t_dof);
// Verify the result
- typedef FunctionsTestSymmetricTensor<dim, ScalarNumberType> func;
- static const ScalarNumberType tol =
+ using func = FunctionsTestSymmetricTensor<dim, ScalarNumberType>;
+ static const ScalarNumberType tol =
1e5 * std::numeric_limits<ScalarNumberType>::epsilon();
std::cout << "psi: " << psi << std::endl;
std::cout << "func::psi(t): " << func::psi(t) << std::endl;
void
test_NH(const bool nontrivial_initial_values)
{
- typedef AD::ScalarFunction<dim, ad_type_code, number_t> ADHelper;
- typedef typename ADHelper::ad_type ADNumberType;
- typedef typename ADHelper::scalar_type ScalarNumberType;
+ using ADHelper = AD::ScalarFunction<dim, ad_type_code, number_t>;
+ using ADNumberType = typename ADHelper::ad_type;
+ using ScalarNumberType = typename ADHelper::scalar_type;
std::cout << "*** Standard definition of incompressible NeoHookean material, "
<< "dim = " << Utilities::to_string(dim) << ", "
FullMatrix<ScalarNumberType> D2psi;
// Function and its derivatives
- typedef IncompressibleNeoHookean<dim, ADNumberType> func_ad;
+ using func_ad = IncompressibleNeoHookean<dim, ADNumberType>;
// Setup the variable components and choose a value at which to
// evaluate the tape
ad_helper.extract_gradient_component(Dpsi, C_dof);
// Verify the result
- typedef IncompressibleNeoHookean<dim, ScalarNumberType> func;
- static const ScalarNumberType tol =
+ using func = IncompressibleNeoHookean<dim, ScalarNumberType>;
+ static const ScalarNumberType tol =
1e5 * std::numeric_limits<ScalarNumberType>::epsilon();
std::cout << "psi: " << psi << std::endl;
std::cout << "func::psi(C): " << func::psi(C) << std::endl;
test_NH_eigen_energy(const enum SymmetricTensorEigenvectorMethod method,
const bool nontrivial_initial_values)
{
- typedef AD::ScalarFunction<dim, ad_type_code, number_t> ADHelper;
- typedef typename ADHelper::ad_type ADNumberType;
- typedef typename ADHelper::scalar_type ScalarNumberType;
+ using ADHelper = AD::ScalarFunction<dim, ad_type_code, number_t>;
+ using ADNumberType = typename ADHelper::ad_type;
+ using ScalarNumberType = typename ADHelper::scalar_type;
std::cout
<< "*** Principal stretch definition of incompressible NeoHookean material (from free energy function), "
FullMatrix<ScalarNumberType> D2psi;
// Function and its derivatives
- typedef IncompressibleNeoHookeanPrincipalStretches<dim, ADNumberType> func_ad;
+ using func_ad = IncompressibleNeoHookeanPrincipalStretches<dim, ADNumberType>;
// Setup the variable components and choose a value at which to
// evaluate the tape
ad_helper.extract_gradient_component(Dpsi, C_dof);
// Verify the result
- typedef IncompressibleNeoHookean<dim, ScalarNumberType> func;
- static const ScalarNumberType tol_val =
+ using func = IncompressibleNeoHookean<dim, ScalarNumberType>;
+ static const ScalarNumberType tol_val =
(nontrivial_initial_values ?
1e-6 :
1e5 * std::numeric_limits<ScalarNumberType>::epsilon());
void
test_NH(const bool nontrivial_initial_values)
{
- typedef AD::ScalarFunction<dim, ad_type_code, number_t> ADHelper;
- typedef typename ADHelper::ad_type ADNumberType;
- typedef typename ADHelper::scalar_type ScalarNumberType;
+ using ADHelper = AD::ScalarFunction<dim, ad_type_code, number_t>;
+ using ADNumberType = typename ADHelper::ad_type;
+ using ScalarNumberType = typename ADHelper::scalar_type;
std::cout << "*** Standard definition of incompressible NeoHookean material, "
<< "dim = " << Utilities::to_string(dim) << ", "
FullMatrix<ScalarNumberType> D2psi;
// Function and its derivatives
- typedef IncompressibleNeoHookean<dim, ADNumberType> func_ad;
+ using func_ad = IncompressibleNeoHookean<dim, ADNumberType>;
// Setup the variable components and choose a value at which to
// evaluate the tape
ad_helper.extract_gradient_component(Dpsi, C_dof);
// Verify the result
- typedef IncompressibleNeoHookean<dim, ScalarNumberType> func;
- static const ScalarNumberType tol =
+ using func = IncompressibleNeoHookean<dim, ScalarNumberType>;
+ static const ScalarNumberType tol =
1e5 * std::numeric_limits<ScalarNumberType>::epsilon();
std::cout << "psi: " << psi << std::endl;
std::cout << "func::psi(C): " << func::psi(C) << std::endl;
test_NH_eigen_stress(const enum SymmetricTensorEigenvectorMethod method,
const bool nontrivial_initial_values)
{
- typedef AD::VectorFunction<dim, ad_type_code, number_t> ADHelper;
- typedef typename ADHelper::ad_type ADNumberType;
- typedef typename ADHelper::scalar_type ScalarNumberType;
+ using ADHelper = AD::VectorFunction<dim, ad_type_code, number_t>;
+ using ADNumberType = typename ADHelper::ad_type;
+ using ScalarNumberType = typename ADHelper::scalar_type;
std::cout
<< "*** Principal stretch definition of incompressible NeoHookean material (from stress), "
FullMatrix<ScalarNumberType> D2psi;
// Function and its derivatives
- typedef IncompressibleNeoHookeanPrincipalStretches<dim, ADNumberType> func_ad;
+ using func_ad = IncompressibleNeoHookeanPrincipalStretches<dim, ADNumberType>;
// Setup the variable components and choose a value at which to
// evaluate the tape
ad_helper.extract_value_component(Dpsi, C_dof);
// Verify the result
- typedef IncompressibleNeoHookean<dim, ScalarNumberType> func;
- static const ScalarNumberType tol_val =
+ using func = IncompressibleNeoHookean<dim, ScalarNumberType>;
+ static const ScalarNumberType tol_val =
(nontrivial_initial_values ?
1e-4 :
1e6 * std::numeric_limits<ScalarNumberType>::epsilon());
void
test_tensor()
{
- typedef
- typename AD::NumberTraits<number_t, ad_type_code>::ad_type ADNumberType;
+ using ADNumberType =
+ typename AD::NumberTraits<number_t, ad_type_code>::ad_type;
std::cout << "*** Test Tensor functions, "
<< "dim = " << Utilities::to_string(dim) << ", "
void
test_tensor()
{
- typedef AD::ScalarFunction<dim, ad_type_code, number_t> ADHelper;
- typedef typename ADHelper::ad_type ADNumberType;
- typedef typename ADHelper::scalar_type ScalarNumberType;
+ using ADHelper = AD::ScalarFunction<dim, ad_type_code, number_t>;
+ using ADNumberType = typename ADHelper::ad_type;
+ using ScalarNumberType = typename ADHelper::scalar_type;
std::cout << "*** dim = " << Utilities::to_string(dim) << ", "
<< "Type code: " << static_cast<int>(ad_type_code) << std::endl;
FullMatrix<ScalarNumberType> D2psi;
// Function and its derivatives
- typedef FunctionsTestTensor<dim, ADNumberType> func_ad;
+ using func_ad = FunctionsTestTensor<dim, ADNumberType>;
// Setup the variable components and choose a value at which to
// evaluate the tape
ad_helper.extract_gradient_component(Dpsi, t_dof);
// Verify the result
- typedef FunctionsTestTensor<dim, ScalarNumberType> func;
- static const ScalarNumberType tol =
+ using func = FunctionsTestTensor<dim, ScalarNumberType>;
+ static const ScalarNumberType tol =
1e5 * std::numeric_limits<ScalarNumberType>::epsilon();
std::cout << "psi: " << psi << std::endl;
std::cout << "func::psi(t): " << func::psi(t) << std::endl;
const number_t s2,
const bool overwrite_tape)
{
- typedef AD::ScalarFunction<dim, ad_type_code, number_t> ADHelper;
- typedef typename ADHelper::ad_type ADNumberType;
- typedef typename ADHelper::scalar_type ScalarNumberType;
+ using ADHelper = AD::ScalarFunction<dim, ad_type_code, number_t>;
+ using ADNumberType = typename ADHelper::ad_type;
+ using ScalarNumberType = typename ADHelper::scalar_type;
std::cout << "*** Test variables: Scalar + Scalar (coupled), "
<< "dim = " << Utilities::to_string(dim) << ", "
FullMatrix<ScalarNumberType> D2psi;
// Function and its derivatives
- typedef FunctionsTestScalarScalarCoupled<dim, ADNumberType> func_ad;
+ using func_ad = FunctionsTestScalarScalarCoupled<dim, ADNumberType>;
// Setup the variable components and choose a value at which to
// evaluate the tape
<< "extracted Dpsi (s2): " << dpsi_ds2 << "\n";
// Verify the result
- typedef FunctionsTestScalarScalarCoupled<dim, ScalarNumberType> func;
- static const ScalarNumberType tol =
+ using func = FunctionsTestScalarScalarCoupled<dim, ScalarNumberType>;
+ static const ScalarNumberType tol =
1e8 * std::numeric_limits<ScalarNumberType>::epsilon();
std::cout << "dpsi_ds1: " << dpsi_ds1 << std::endl;
std::cout << "func::dpsi_ds1(s1,s2): " << func::dpsi_ds1(s1, s2) << std::endl;
const number_t s2,
const bool overwrite_tape)
{
- typedef AD::ScalarFunction<dim, ad_type_code, number_t> ADHelper;
- typedef typename ADHelper::ad_type ADNumberType;
- typedef typename ADHelper::scalar_type ScalarNumberType;
+ using ADHelper = AD::ScalarFunction<dim, ad_type_code, number_t>;
+ using ADNumberType = typename ADHelper::ad_type;
+ using ScalarNumberType = typename ADHelper::scalar_type;
std::cout << "*** Test variables: Scalar + Scalar (coupled), "
<< "dim = " << Utilities::to_string(dim) << ", "
FullMatrix<ScalarNumberType> D2psi;
// Function and its derivatives
- typedef FunctionsTestScalarScalarCoupled<dim, ADNumberType> func_ad;
+ using func_ad = FunctionsTestScalarScalarCoupled<dim, ADNumberType>;
// Setup the variable components and choose a value at which to
// evaluate the tape
<< "extracted Dpsi (s2): " << dpsi_ds2 << "\n";
// Verify the result
- typedef FunctionsTestScalarScalarCoupled<dim, ScalarNumberType> func;
- static const ScalarNumberType tol =
+ using func = FunctionsTestScalarScalarCoupled<dim, ScalarNumberType>;
+ static const ScalarNumberType tol =
1e8 * std::numeric_limits<ScalarNumberType>::epsilon();
std::cout << "dpsi_ds1: " << dpsi_ds1 << std::endl;
std::cout << "func::dpsi_ds1(s1,s2): " << func::dpsi_ds1(s1, s2) << std::endl;
const number_t s2,
const bool clear_tapes)
{
- typedef AD::ScalarFunction<dim, ad_type_code, number_t> ADHelper;
- typedef typename ADHelper::ad_type ADNumberType;
- typedef typename ADHelper::scalar_type ScalarNumberType;
+ using ADHelper = AD::ScalarFunction<dim, ad_type_code, number_t>;
+ using ADNumberType = typename ADHelper::ad_type;
+ using ScalarNumberType = typename ADHelper::scalar_type;
std::cout << "*** Test variables: Scalar + Scalar (coupled), "
<< "dim = " << Utilities::to_string(dim) << ", "
FullMatrix<ScalarNumberType> D2psi;
// Function and its derivatives
- typedef FunctionsTestScalarScalarCoupled<dim, ADNumberType> func_ad;
+ using func_ad = FunctionsTestScalarScalarCoupled<dim, ADNumberType>;
// Setup the variable components and choose a value at which to
// evaluate the tape
<< "extracted Dpsi (s2): " << dpsi_ds2 << "\n";
// Verify the result
- typedef FunctionsTestScalarScalarCoupled<dim, ScalarNumberType> func;
- static const ScalarNumberType tol =
+ using func = FunctionsTestScalarScalarCoupled<dim, ScalarNumberType>;
+ static const ScalarNumberType tol =
1e8 * std::numeric_limits<ScalarNumberType>::epsilon();
std::cout << "dpsi_ds1: " << dpsi_ds1 << std::endl;
std::cout << "func::dpsi_ds1(s1,s2): " << func::dpsi_ds1(s1, s2) << std::endl;
bool
test_overlapping_ind_var_components()
{
- typedef AD::ScalarFunction<dim, ad_type_code, number_t> ADHelper;
- typedef typename ADHelper::ad_type ADNumberType;
+ using ADHelper = AD::ScalarFunction<dim, ad_type_code, number_t>;
+ using ADNumberType = typename ADHelper::ad_type;
std::cout << "*** Test variables: Scalar + Scalar (coupled), "
<< (AD::ADNumberTraits<ADNumberType>::is_taped == true ? "Taped" :
bool
test_overlapping_ind_var_components()
{
- typedef AD::ScalarFunction<dim, ad_type_code, number_t> ADHelper;
- typedef typename ADHelper::ad_type ADNumberType;
+ using ADHelper = AD::ScalarFunction<dim, ad_type_code, number_t>;
+ using ADNumberType = typename ADHelper::ad_type;
std::cout << "*** Test variables: Vector + Scalar (coupled), "
<< (AD::ADNumberTraits<ADNumberType>::is_taped == true ? "Taped" :
bool
test_overlapping_ind_var_components()
{
- typedef AD::ScalarFunction<dim, ad_type_code, number_t> ADHelper;
- typedef typename ADHelper::ad_type ADNumberType;
+ using ADHelper = AD::ScalarFunction<dim, ad_type_code, number_t>;
+ using ADNumberType = typename ADHelper::ad_type;
std::cout << "*** Test variables: Tensor + Vector (coupled), "
<< (AD::ADNumberTraits<ADNumberType>::is_taped == true ? "Taped" :
bool
test_incorrect_no_of_ind_vars()
{
- typedef AD::ScalarFunction<dim, ad_type_code, number_t> ADHelper;
- typedef typename ADHelper::ad_type ADNumberType;
+ using ADHelper = AD::ScalarFunction<dim, ad_type_code, number_t>;
+ using ADNumberType = typename ADHelper::ad_type;
std::cout << "*** Test variables: Scalar + Scalar (coupled), "
<< (AD::ADNumberTraits<ADNumberType>::is_taped == true ? "Taped" :
bool
test_register_multiple_dep_vars()
{
- typedef AD::ScalarFunction<dim, ad_type_code, number_t> ADHelper;
- typedef typename ADHelper::ad_type ADNumberType;
+ using ADHelper = AD::ScalarFunction<dim, ad_type_code, number_t>;
+ using ADNumberType = typename ADHelper::ad_type;
std::cout << "*** Test variables: Scalar + Scalar (coupled), "
<< (AD::ADNumberTraits<ADNumberType>::is_taped == true ? "Taped" :
const number_t s2,
const tape_index_t tape_no)
{
- typedef AD::ScalarFunction<dim, ad_type_code, number_t> ADHelper;
- typedef typename ADHelper::ad_type ADNumberType;
- typedef typename ADHelper::scalar_type ScalarNumberType;
+ using ADHelper = AD::ScalarFunction<dim, ad_type_code, number_t>;
+ using ADNumberType = typename ADHelper::ad_type;
+ using ScalarNumberType = typename ADHelper::scalar_type;
std::cout
// << "*** Test variables: Scalar + Scalar (coupled), "
FullMatrix<ScalarNumberType> D2psi;
// Function and its derivatives
- typedef FunctionsTestScalarScalarCoupled<dim, ADNumberType> func_ad;
+ using func_ad = FunctionsTestScalarScalarCoupled<dim, ADNumberType>;
// Setup the variable components and choose a value at which to
// evaluate the tape
// << "extracted Dpsi (s2): " << dpsi_ds2 << "\n";
// Verify the result
- typedef FunctionsTestScalarScalarCoupled<dim, ScalarNumberType> func;
- static const ScalarNumberType tol = 1.e-7;
+ using func = FunctionsTestScalarScalarCoupled<dim, ScalarNumberType>;
+ static const ScalarNumberType tol = 1.e-7;
// std::cout << "dpsi_ds1: " << dpsi_ds1 << std::endl;
// std::cout << "func::dpsi_ds1(s1,s2): " << func::dpsi_ds1(s1,s2) <<
// std::endl; std::cout << "diff: " << std::abs(dpsi_ds1 -
void
test_tensor()
{
- typedef typename Differentiation::AD::NumberTraits<number_t,
- ad_number_enum>::ad_type
- ad_number_t;
- typedef Tensor<2, dim, ad_number_t> AD_Tensor;
- typedef Tensor<2, dim, number_t> NonAD_Tensor;
+ using ad_number_t =
+ typename Differentiation::AD::NumberTraits<number_t,
+ ad_number_enum>::ad_type;
+ using AD_Tensor = Tensor<2, dim, ad_number_t>;
+ using NonAD_Tensor = Tensor<2, dim, number_t>;
// Constructors
NonAD_Tensor t1;
void
test_symmetric_tensor()
{
- typedef typename Differentiation::AD::NumberTraits<number_t,
- ad_number_enum>::ad_type
- ad_number_t;
- typedef SymmetricTensor<2, dim, ad_number_t> AD_STensor;
- typedef SymmetricTensor<4, dim, ad_number_t> AD_STensor4;
- typedef SymmetricTensor<2, dim, number_t> NonAD_STensor;
- typedef SymmetricTensor<4, dim, number_t> NonAD_STensor4;
+ using ad_number_t =
+ typename Differentiation::AD::NumberTraits<number_t,
+ ad_number_enum>::ad_type;
+ using AD_STensor = SymmetricTensor<2, dim, ad_number_t>;
+ using AD_STensor4 = SymmetricTensor<4, dim, ad_number_t>;
+ using NonAD_STensor = SymmetricTensor<2, dim, number_t>;
+ using NonAD_STensor4 = SymmetricTensor<4, dim, number_t>;
// Constructors
NonAD_STensor t1;
void
test_tensor()
{
- typedef typename Differentiation::AD::NumberTraits<number_t,
- ad_number_enum>::ad_type
- ad_number_t;
- typedef Tensor<2, dim, ad_number_t> AD_Tensor;
- typedef Tensor<2, dim, number_t> NonAD_Tensor;
+ using ad_number_t =
+ typename Differentiation::AD::NumberTraits<number_t,
+ ad_number_enum>::ad_type;
+ using AD_Tensor = Tensor<2, dim, ad_number_t>;
+ using NonAD_Tensor = Tensor<2, dim, number_t>;
AD_Tensor adt1;
for (unsigned int i = 0; i < NonAD_Tensor::n_independent_components; ++i)
void
test_symmetric_tensor()
{
- typedef typename Differentiation::AD::NumberTraits<number_t,
- ad_number_enum>::ad_type
- ad_number_t;
- typedef SymmetricTensor<2, dim, ad_number_t> AD_STensor2;
- typedef SymmetricTensor<4, dim, ad_number_t> AD_STensor4;
- typedef SymmetricTensor<2, dim, number_t> NonAD_STensor2;
- typedef SymmetricTensor<4, dim, number_t> NonAD_STensor4;
+ using ad_number_t =
+ typename Differentiation::AD::NumberTraits<number_t,
+ ad_number_enum>::ad_type;
+ using AD_STensor2 = SymmetricTensor<2, dim, ad_number_t>;
+ using AD_STensor4 = SymmetricTensor<4, dim, ad_number_t>;
+ using NonAD_STensor2 = SymmetricTensor<2, dim, number_t>;
+ using NonAD_STensor4 = SymmetricTensor<4, dim, number_t>;
// Constructors
AD_STensor2 adt1;
/*tolerance (global)*/ 0.0,
/*reduce (w.r.t. initial)*/ 1.e-13);
- typedef TrilinosWrappers::MPI::Vector VectorType;
+ using VectorType = TrilinosWrappers::MPI::Vector;
SolverGMRES<VectorType> solver_c(inner_control_c);
TrilinosWrappers::PreconditionIdentity preconditioner;
// set up iterative inverse
static ReductionControl inner_control_c(dof_handler.n_dofs(), 0.0, 1.e-13);
- typedef LinearAlgebra::distributed::Vector<double> VectorType;
+ using VectorType = LinearAlgebra::distributed::Vector<double>;
SolverCG<VectorType> solver_c(inner_control_c);
PreconditionIdentity preconditioner;
const auto shift_and_invert =
// set up iterative inverse
static ReductionControl inner_control_c(dof_handler.n_dofs(), 0.0, 1.e-14);
- typedef LinearAlgebra::distributed::Vector<double> VectorType;
+ using VectorType = LinearAlgebra::distributed::Vector<double>;
SolverCG<VectorType> solver_c(inner_control_c);
PreconditionIdentity preconditioner;
const auto invert = inverse_operator(linear_operator<VectorType>(mass),
// set up iterative inverse
static ReductionControl inner_control_c(dof_handler.n_dofs(), 0.0, 1.e-14);
- typedef LinearAlgebra::distributed::Vector<double> VectorType;
+ using VectorType = LinearAlgebra::distributed::Vector<double>;
SolverCG<VectorType> solver_c(inner_control_c);
PreconditionIdentity preconditioner;
const auto invert = inverse_operator(linear_operator<VectorType>(mass),
/*tolerance (global)*/ 0.0,
/*reduce (w.r.t. initial)*/ 1.e-13);
- typedef TrilinosWrappers::MPI::Vector VectorType;
+ using VectorType = TrilinosWrappers::MPI::Vector;
SolverCG<VectorType> solver_c(inner_control_c);
TrilinosWrappers::PreconditionIdentity preconditioner;
void
test()
{
- typedef AlignedVector<unsigned int> VEC;
- VEC a(4);
+ using VEC = AlignedVector<unsigned int>;
+ VEC a(4);
deallog << "Constructor: ";
for (unsigned int i = 0; i < a.size(); ++i)
deallog << a[i] << " ";
#include "../tests.h"
-typedef AlignedVector<unsigned int> VEC;
-typedef AlignedVector<VEC> VECVEC;
+using VEC = AlignedVector<unsigned int>;
+using VECVEC = AlignedVector<VEC>;
void
print_vec(VECVEC &v)
{
void
test()
{
- typedef AlignedVector<unsigned int> VEC;
- VEC a(4);
+ using VEC = AlignedVector<unsigned int>;
+ VEC a(4);
a[0] = 2;
a[1] = 1;
a[2] = 42;
void
test()
{
- typedef AlignedVector<bool> VEC;
- VEC a(4);
+ using VEC = AlignedVector<bool>;
+ VEC a(4);
deallog << "Constructor: ";
for (unsigned int i = 0; i < a.size(); ++i)
deallog << a[i] << " ";
void
test()
{
- typedef AlignedVector<unsigned int> VEC;
+ using VEC = AlignedVector<unsigned int>;
VEC a(4, 2);
using namespace Polynomials;
-typedef std::vector<Polynomial<double>> PolVector;
+using PolVector = std::vector<Polynomial<double>>;
void
// and we compute the first and second derivatives using
// Sacado
-typedef typename Sacado::Fad::DFad<double> Sdouble;
-typedef typename Sacado::Fad::DFad<Sdouble> SSdouble;
+using Sdouble = typename Sacado::Fad::DFad<double>;
+using SSdouble = typename Sacado::Fad::DFad<Sdouble>;
template <int dim, int spacedim>
void
auto my_proc = Utilities::MPI::this_mpi_process(MPI_COMM_WORLD);
// Test some fake structure, similar to particles
- typedef typename std::pair<unsigned int, Point<dim>> particle;
+ using particle = typename std::pair<unsigned int, Point<dim>>;
unsigned int n_local_particles = random_index(max_particles);
initlog();
deallog << std::setprecision(3);
- typedef Tensor<0, 1> T;
- T t1(13.), t2(42);
+ using T = Tensor<0, 1>;
+ T t1(13.), t2(42);
compare(T(), 0.);
compare(T(13.), 13.);
void
test()
{
- typedef VectorizedArray<double> vector_t;
- const unsigned int n_vectors = VectorizedArray<double>::size();
- typedef AlignedVector<vector_t> VEC;
- std::vector<double> a_ref(4), b_ref;
- VEC a(4);
+ using vector_t = VectorizedArray<double>;
+ const unsigned int n_vectors = VectorizedArray<double>::size();
+ using VEC = AlignedVector<vector_t>;
+ std::vector<double> a_ref(4), b_ref;
+ VEC a(4);
deallog << "Constructor: ";
for (unsigned int i = 0; i < a.size(); ++i)
for (unsigned int d = 0; d < n_vectors; ++d)
InVector local_dofs(source_dof.get_fe().dofs_per_cell);
// iterate over all active source cells
- typedef typename DoFHandler<dim>::active_cell_iterator cell_iterator;
+ using cell_iterator = typename DoFHandler<dim>::active_cell_iterator;
cell_iterator cell = source_dof.begin_active(), endc = source_dof.end();
for (; cell != endc; ++cell)
{
{
initlog();
- typedef std::iterator_traits<TriaRawIterator<TriaAccessor<2, 2, 2>>>::
- iterator_category tria_raw_iterator_category;
- typedef std::iterator_traits<TriaIterator<TriaAccessor<2, 2, 2>>>::
- iterator_category tria_iterator_category;
- typedef std::iterator_traits<TriaActiveIterator<TriaAccessor<2, 2, 2>>>::
- iterator_category tria_active_iterator_category;
-
- typedef std::iterator_traits<
- Particles::ParticleIterator<2>>::iterator_category particle_category;
-
- typedef std::iterator_traits<IteratorRange<
- Particles::ParticleIterator<2>>::IteratorOverIterators>::iterator_category
- iterator_over_iterator_category;
-
- typedef std::iterator_traits<
- internal::BlockVectorIterators::Iterator<BlockVector<double>, false>>::
- iterator_category block_vector_base_iterator_category;
-
- typedef std::iterator_traits<IndexSet::IntervalIterator>::iterator_category
- intervall_iterator_category;
- typedef std::iterator_traits<IndexSet::ElementIterator>::iterator_category
- element_iterator_category;
+ using tria_raw_iterator_category = std::iterator_traits<
+ TriaRawIterator<TriaAccessor<2, 2, 2>>>::iterator_category;
+ using tria_iterator_category = std::iterator_traits<
+ TriaIterator<TriaAccessor<2, 2, 2>>>::iterator_category;
+ using tria_active_iterator_category = std::iterator_traits<
+ TriaActiveIterator<TriaAccessor<2, 2, 2>>>::iterator_category;
+
+ using particle_category =
+ std::iterator_traits<Particles::ParticleIterator<2>>::iterator_category;
+
+ using iterator_over_iterator_category = std::iterator_traits<IteratorRange<
+ Particles::ParticleIterator<2>>::IteratorOverIterators>::iterator_category;
+
+ using block_vector_base_iterator_category = std::iterator_traits<
+ internal::BlockVectorIterators::Iterator<BlockVector<double>,
+ false>>::iterator_category;
+
+ using intervall_iterator_category =
+ std::iterator_traits<IndexSet::IntervalIterator>::iterator_category;
+ using element_iterator_category =
+ std::iterator_traits<IndexSet::ElementIterator>::iterator_category;
deallog << "OK" << std::endl;
}
MakeFlux<dim>::make_grid()
{
GridGenerator::hyper_cube(triangulation, -1, 1, true);
- typedef typename dealii::Triangulation<dim>::cell_iterator CellIteratorTria;
+ using CellIteratorTria = typename dealii::Triangulation<dim>::cell_iterator;
std::vector<dealii::GridTools::PeriodicFacePair<CellIteratorTria>>
periodic_faces;
const unsigned int b_id1 = 2;
{
const double tolerance = 1e-8;
- typedef SolverBicgstab<> Solver;
- SolverControl solver_control(N, tolerance);
- PrimitiveVectorMemory<> vector_memory;
- Solver solver(solver_control, vector_memory);
+ using Solver = SolverBicgstab<>;
+ SolverControl solver_control(N, tolerance);
+ PrimitiveVectorMemory<> vector_memory;
+ Solver solver(solver_control, vector_memory);
PreconditionSSOR<SparseMatrix<double>> preconditioner;
preconditioner.initialize(sm, 1.2);
void
Solver<dim>::assemble_linear_system(LinearSystem &linear_system)
{
- typedef typename DoFHandler<dim>::active_cell_iterator active_cell_iterator;
+ using active_cell_iterator = typename DoFHandler<dim>::active_cell_iterator;
const unsigned int n_threads = MultithreadInfo::n_threads();
std::vector<std::pair<active_cell_iterator, active_cell_iterator>>
void
Solver<dim>::assemble_linear_system(LinearSystem &linear_system)
{
- typedef typename DoFHandler<dim>::active_cell_iterator active_cell_iterator;
+ using active_cell_iterator = typename DoFHandler<dim>::active_cell_iterator;
const unsigned int n_threads = MultithreadInfo::n_threads();
std::vector<std::pair<active_cell_iterator, active_cell_iterator>>
template <int dim>
struct Exercise_2_3
{
- typedef Functions::ZeroFunction<dim> BoundaryValues;
+ using BoundaryValues = Functions::ZeroFunction<dim>;
class RightHandSide : public Functions::ConstantFunction<dim>
{
void
solve_dual_problem();
- typedef typename DoFHandler<dim>::active_cell_iterator active_cell_iterator;
+ using active_cell_iterator = typename DoFHandler<dim>::active_cell_iterator;
- typedef typename std::map<typename DoFHandler<dim>::face_iterator, double>
- FaceIntegrals;
+ using FaceIntegrals =
+ typename std::map<typename DoFHandler<dim>::face_iterator, double>;
struct CellData
{
struct Framework
{
public:
- typedef Evaluation::EvaluationBase<dim> Evaluator;
- typedef std::list<Evaluator *> EvaluatorList;
+ using Evaluator = Evaluation::EvaluationBase<dim>;
+ using EvaluatorList = std::list<Evaluator *>;
struct ProblemDescription
MGCoarseGridHouseholder<float, Vector<double>> mg_coarse;
mg_coarse.initialize(coarse_matrix);
- typedef PreconditionSOR<SparseMatrix<float>> RELAXATION;
+ using RELAXATION = PreconditionSOR<SparseMatrix<float>>;
MGSmootherRelaxation<SparseMatrix<float>, RELAXATION, Vector<double>>
mg_smoother;
Step4<dim>::make_grid()
{
GridGenerator::hyper_cube(triangulation, -1, 1, true);
- typedef typename dealii::Triangulation<dim>::cell_iterator CellIteratorTria;
+ using CellIteratorTria = typename dealii::Triangulation<dim>::cell_iterator;
std::vector<dealii::GridTools::PeriodicFacePair<CellIteratorTria>>
periodic_faces;
const unsigned int b_id1 = 2;
Step4<dim>::make_grid()
{
GridGenerator::hyper_cube(triangulation, -1, 1, true);
- typedef typename dealii::Triangulation<dim>::cell_iterator CellIteratorTria;
+ using CellIteratorTria = typename dealii::Triangulation<dim>::cell_iterator;
std::vector<dealii::GridTools::PeriodicFacePair<CellIteratorTria>>
periodic_faces;
const unsigned int b_id1 = 2;
void
test()
{
- typedef double Number;
+ using Number = double;
parallel::distributed::Triangulation<dim> tria(MPI_COMM_WORLD);
GridGenerator::hyper_cube(tria);
void
test()
{
- typedef double Number;
+ using Number = double;
parallel::distributed::Triangulation<dim> tria(MPI_COMM_WORLD);
GridGenerator::hyper_cube(tria);
void
test()
{
- typedef double Number;
+ using Number = double;
parallel::distributed::Triangulation<dim> tria(MPI_COMM_WORLD);
GridGenerator::hyper_cube(tria);
void
test()
{
- typedef double Number;
+ using Number = double;
parallel::shared::Triangulation<dim> tria(
MPI_COMM_WORLD,
void
test()
{
- typedef double Number;
+ using Number = double;
parallel::distributed::Triangulation<dim> tria(MPI_COMM_WORLD);
GridGenerator::hyper_cube(tria);
void
test()
{
- typedef double Number;
+ using Number = double;
parallel::distributed::Triangulation<dim> tria(MPI_COMM_WORLD);
GridGenerator::hyper_cube(tria);
void
test()
{
- typedef double Number;
+ using Number = double;
parallel::distributed::Triangulation<dim> tria(MPI_COMM_WORLD);
GridGenerator::hyper_cube(tria);
class TriaTest
{
private:
- typedef typename parallel::distributed::Triangulation<dim> TypeTria;
+ using TypeTria = typename parallel::distributed::Triangulation<dim>;
public:
TriaTest(const typename dealii::Triangulation<dim>::MeshSmoothing
class TriaTest
{
private:
- typedef typename parallel::distributed::Triangulation<dim> TypeTria;
+ using TypeTria = typename parallel::distributed::Triangulation<dim>;
public:
TriaTest(const typename dealii::Triangulation<dim>::MeshSmoothing
std::set<std::string> input, output;
- typedef double DT;
+ using DT = double;
std::map<CellId, DT> map;
DT counter = 0.0;
}
}
- typedef
- typename parallel::distributed::Triangulation<dim>::active_cell_iterator
- cell_iterator;
+ using cell_iterator =
+ typename parallel::distributed::Triangulation<dim>::active_cell_iterator;
GridTools::
exchange_cell_data_to_ghosts<DT, parallel::distributed::Triangulation<dim>>(
tria,
std::set<std::string> input, output;
- typedef typename DoFHandler<dim>::active_cell_iterator cell_iterator;
- typedef short DT;
- std::map<CellId, DT> map;
- short counter = 0;
+ using cell_iterator = typename DoFHandler<dim>::active_cell_iterator;
+ using DT = short;
+ std::map<CellId, DT> map;
+ short counter = 0;
std::map<unsigned int, std::set<dealii::types::subdomain_id>>
vertices_with_ghost_neighbors =
std::set<std::string> input, output;
- typedef typename parallel::shared::Triangulation<dim>::active_cell_iterator
- cell_iterator;
- typedef double DT;
+ using cell_iterator =
+ typename parallel::shared::Triangulation<dim>::active_cell_iterator;
+ using DT = double;
std::map<CellId, DT> map;
DT counter = 0.0;
std::map<CellId, std::string> input;
std::set<std::string> output;
- typedef
- typename parallel::distributed::Triangulation<dim>::active_cell_iterator
- cell_iterator;
- typedef double DT;
+ using cell_iterator =
+ typename parallel::distributed::Triangulation<dim>::active_cell_iterator;
+ using DT = double;
std::map<CellId, int> map;
int counter = 0;
InterGridMap<DoFHandler<dim>> grid_1_to_2_map;
grid_1_to_2_map.make_mapping(dof_handler1, dof_handler2);
- typedef std::vector<std::map<types::global_dof_index, float>> TransferRep;
+ using TransferRep = std::vector<std::map<types::global_dof_index, float>>;
TransferRep transfer_representation;
DoFTools::compute_intergrid_transfer_representation(
dof_handler1, 0, dof_handler2, 0, grid_1_to_2_map, transfer_representation);
void
Solver<dim>::assemble_linear_system(LinearSystem &linear_system)
{
- typedef typename DoFHandler<dim>::active_cell_iterator active_cell_iterator;
+ using active_cell_iterator = typename DoFHandler<dim>::active_cell_iterator;
const unsigned int n_threads = MultithreadInfo::n_threads();
std::vector<std::pair<active_cell_iterator, active_cell_iterator>>
template <int dim>
struct Exercise_2_3
{
- typedef Functions::ZeroFunction<dim> BoundaryValues;
+ using BoundaryValues = Functions::ZeroFunction<dim>;
class RightHandSide : public Functions::ConstantFunction<dim>
{
void
solve_dual_problem();
- typedef typename DoFHandler<dim>::active_cell_iterator active_cell_iterator;
+ using active_cell_iterator = typename DoFHandler<dim>::active_cell_iterator;
- typedef typename std::map<typename DoFHandler<dim>::face_iterator, double>
- FaceIntegrals;
+ using FaceIntegrals =
+ typename std::map<typename DoFHandler<dim>::face_iterator, double>;
struct CellData
{
struct Framework
{
public:
- typedef Evaluation::EvaluationBase<dim> Evaluator;
- typedef std::list<Evaluator *> EvaluatorList;
+ using Evaluator = Evaluation::EvaluationBase<dim>;
+ using EvaluatorList = std::list<Evaluator *>;
struct ProblemDescription
// Construct vector of predicates for 2 and 3 dimensions
Assert(dim == 2 || dim == 3, ExcDimensionMismatch2(dim, 2, 3));
- typedef std::function<bool(
- const typename Triangulation<dim>::active_cell_iterator &)>
- predicate_function;
+ using predicate_function = std::function<bool(
+ const typename Triangulation<dim>::active_cell_iterator &)>;
std::vector<predicate_function> predicates;
predicates.resize(5);
if (dim == 2)
template <>
struct InnerPreconditioner<2>
{
- typedef SparseDirectUMFPACK type;
+ using type = SparseDirectUMFPACK;
};
template <>
struct InnerPreconditioner<3>
{
- typedef SparseILU<double> type;
+ using type = SparseILU<double>;
};
template <int dim>
Quadrature<2> quadrature(fe.get_generalized_support_points());
FEValues<2> fev(fe, quadrature, update_values | update_JxW_values);
- typedef DoFHandler<2>::cell_iterator cell_it;
- cell_it cell = dofh.begin_active();
+ using cell_it = DoFHandler<2>::cell_iterator;
+ cell_it cell = dofh.begin_active();
for (; cell != dofh.end(); ++cell)
{
fev.reinit(cell);
const FEValuesExtractors::Scalar &extractor,
const std::vector<NumberType> & local_dof_values)
{
- typedef typename std::remove_reference<typename std::remove_const<decltype(
- fe_values[extractor])>::type>::type View;
- const View & fe_values_view = fe_values[extractor];
+ using View = typename std::remove_reference<
+ typename std::remove_const<decltype(fe_values[extractor])>::type>::type;
+ const View &fe_values_view = fe_values[extractor];
// Typedefs
- typedef typename View::template OutputType<NumberType> OutputType;
- typedef typename ProductType<typename View::value_type, NumberType>::type
- value_type;
- typedef typename ProductType<typename View::gradient_type, NumberType>::type
- gradient_type;
- typedef typename ProductType<typename View::hessian_type, NumberType>::type
- hessian_type;
- typedef typename ProductType<typename View::value_type, NumberType>::type
- laplacian_type;
- typedef
- typename ProductType<typename View::third_derivative_type, NumberType>::type
- third_derivative_type;
+ using OutputType = typename View::template OutputType<NumberType>;
+ using value_type =
+ typename ProductType<typename View::value_type, NumberType>::type;
+ using gradient_type =
+ typename ProductType<typename View::gradient_type, NumberType>::type;
+ using hessian_type =
+ typename ProductType<typename View::hessian_type, NumberType>::type;
+ using laplacian_type =
+ typename ProductType<typename View::value_type, NumberType>::type;
+ using third_derivative_type =
+ typename ProductType<typename View::third_derivative_type,
+ NumberType>::type;
// Values
std::vector<typename OutputType::value_type> qp_values_local(n_q_points);
const FEValuesExtractors::Vector &extractor,
const std::vector<NumberType> & local_dof_values)
{
- typedef typename std::remove_reference<typename std::remove_const<decltype(
- fe_values[extractor])>::type>::type View;
- const View & fe_values_view = fe_values[extractor];
+ using View = typename std::remove_reference<
+ typename std::remove_const<decltype(fe_values[extractor])>::type>::type;
+ const View &fe_values_view = fe_values[extractor];
// Typedefs
- typedef typename View::template OutputType<NumberType> OutputType;
- typedef typename ProductType<typename View::value_type, NumberType>::type
- value_type;
- typedef typename ProductType<typename View::gradient_type, NumberType>::type
- gradient_type;
- typedef typename ProductType<typename View::symmetric_gradient_type,
- NumberType>::type symmetric_gradient_type;
- typedef typename ProductType<typename View::divergence_type, NumberType>::type
- divergence_type;
- typedef
- typename ProductType<typename View::curl_type, NumberType>::type curl_type;
- typedef typename ProductType<typename View::hessian_type, NumberType>::type
- hessian_type;
- typedef typename ProductType<typename View::value_type, NumberType>::type
- laplacian_type;
- typedef
- typename ProductType<typename View::third_derivative_type, NumberType>::type
- third_derivative_type;
+ using OutputType = typename View::template OutputType<NumberType>;
+ using value_type =
+ typename ProductType<typename View::value_type, NumberType>::type;
+ using gradient_type =
+ typename ProductType<typename View::gradient_type, NumberType>::type;
+ using symmetric_gradient_type =
+ typename ProductType<typename View::symmetric_gradient_type,
+ NumberType>::type;
+ using divergence_type =
+ typename ProductType<typename View::divergence_type, NumberType>::type;
+ using curl_type =
+ typename ProductType<typename View::curl_type, NumberType>::type;
+ using hessian_type =
+ typename ProductType<typename View::hessian_type, NumberType>::type;
+ using laplacian_type =
+ typename ProductType<typename View::value_type, NumberType>::type;
+ using third_derivative_type =
+ typename ProductType<typename View::third_derivative_type,
+ NumberType>::type;
// Values
std::vector<typename OutputType::value_type> qp_values_local(n_q_points);
const FEValuesExtractors::SymmetricTensor<2> &extractor,
const std::vector<NumberType> & local_dof_values)
{
- typedef typename std::remove_reference<typename std::remove_const<decltype(
- fe_values[extractor])>::type>::type View;
- const View & fe_values_view = fe_values[extractor];
+ using View = typename std::remove_reference<
+ typename std::remove_const<decltype(fe_values[extractor])>::type>::type;
+ const View &fe_values_view = fe_values[extractor];
// Typedefs
- typedef typename View::template OutputType<NumberType> OutputType;
- typedef typename ProductType<typename View::value_type, NumberType>::type
- value_type;
- typedef typename ProductType<typename View::divergence_type, NumberType>::type
- divergence_type;
+ using OutputType = typename View::template OutputType<NumberType>;
+ using value_type =
+ typename ProductType<typename View::value_type, NumberType>::type;
+ using divergence_type =
+ typename ProductType<typename View::divergence_type, NumberType>::type;
// Values
std::vector<typename OutputType::value_type> qp_values_local(n_q_points);
const FEValuesExtractors::Tensor<2> &extractor,
const std::vector<NumberType> & local_dof_values)
{
- typedef typename std::remove_reference<typename std::remove_const<decltype(
- fe_values[extractor])>::type>::type View;
- const View & fe_values_view = fe_values[extractor];
+ using View = typename std::remove_reference<
+ typename std::remove_const<decltype(fe_values[extractor])>::type>::type;
+ const View &fe_values_view = fe_values[extractor];
// Typedefs
- typedef typename View::template OutputType<NumberType> OutputType;
- typedef typename ProductType<typename View::value_type, NumberType>::type
- value_type;
- typedef typename ProductType<typename View::gradient_type, NumberType>::type
- gradient_type;
- typedef typename ProductType<typename View::divergence_type, NumberType>::type
- divergence_type;
+ using OutputType = typename View::template OutputType<NumberType>;
+ using value_type =
+ typename ProductType<typename View::value_type, NumberType>::type;
+ using gradient_type =
+ typename ProductType<typename View::gradient_type, NumberType>::type;
+ using divergence_type =
+ typename ProductType<typename View::divergence_type, NumberType>::type;
// Values
std::vector<typename OutputType::value_type> qp_values_local(n_q_points);
const FEValuesExtractors::Scalar &extractor,
const std::vector<NumberType> & local_dof_values)
{
- typedef typename std::remove_reference<typename std::remove_const<decltype(
- fe_values[extractor])>::type>::type View;
- const View & fe_values_view = fe_values[extractor];
+ using View = typename std::remove_reference<
+ typename std::remove_const<decltype(fe_values[extractor])>::type>::type;
+ const View &fe_values_view = fe_values[extractor];
// Typedefs
- typedef typename View::template OutputType<NumberType> OutputType;
+ using OutputType = typename View::template OutputType<NumberType>;
// Values
std::vector<typename OutputType::value_type> qp_values_local(n_q_points);
const FEValuesExtractors::Vector &extractor,
const std::vector<NumberType> & local_dof_values)
{
- typedef typename std::remove_reference<typename std::remove_const<decltype(
- fe_values[extractor])>::type>::type View;
- const View & fe_values_view = fe_values[extractor];
+ using View = typename std::remove_reference<
+ typename std::remove_const<decltype(fe_values[extractor])>::type>::type;
+ const View &fe_values_view = fe_values[extractor];
// Typedefs
- typedef typename View::template OutputType<NumberType> OutputType;
+ using OutputType = typename View::template OutputType<NumberType>;
// Values
std::vector<typename OutputType::value_type> qp_values_local(n_q_points);
const FEValuesExtractors::SymmetricTensor<2> &extractor,
const std::vector<NumberType> & local_dof_values)
{
- typedef typename std::remove_reference<typename std::remove_const<decltype(
- fe_values[extractor])>::type>::type View;
- const View & fe_values_view = fe_values[extractor];
+ using View = typename std::remove_reference<
+ typename std::remove_const<decltype(fe_values[extractor])>::type>::type;
+ const View &fe_values_view = fe_values[extractor];
// Typedefs
- typedef typename View::template OutputType<NumberType> OutputType;
- typedef typename ProductType<typename View::value_type, NumberType>::type
- value_type;
- typedef typename ProductType<typename View::divergence_type, NumberType>::type
- divergence_type;
+ using OutputType = typename View::template OutputType<NumberType>;
+ using value_type =
+ typename ProductType<typename View::value_type, NumberType>::type;
+ using divergence_type =
+ typename ProductType<typename View::divergence_type, NumberType>::type;
// Values
std::vector<typename OutputType::value_type> qp_values_local(n_q_points);
const FEValuesExtractors::Tensor<2> &extractor,
const std::vector<NumberType> & local_dof_values)
{
- typedef typename std::remove_reference<typename std::remove_const<decltype(
- fe_values[extractor])>::type>::type View;
- const View & fe_values_view = fe_values[extractor];
+ using View = typename std::remove_reference<
+ typename std::remove_const<decltype(fe_values[extractor])>::type>::type;
+ const View &fe_values_view = fe_values[extractor];
// Typedefs
- typedef typename View::template OutputType<NumberType> OutputType;
- typedef typename ProductType<typename View::value_type, NumberType>::type
- value_type;
- typedef typename ProductType<typename View::gradient_type, NumberType>::type
- gradient_type;
- typedef typename ProductType<typename View::divergence_type, NumberType>::type
- divergence_type;
+ using OutputType = typename View::template OutputType<NumberType>;
+ using value_type =
+ typename ProductType<typename View::value_type, NumberType>::type;
+ using gradient_type =
+ typename ProductType<typename View::gradient_type, NumberType>::type;
+ using divergence_type =
+ typename ProductType<typename View::divergence_type, NumberType>::type;
// Values
std::vector<typename OutputType::value_type> qp_values_local(n_q_points);
void
AdvectionProblem<dim>::assemble_system()
{
- typedef decltype(dof_handler.begin_active()) Iterator;
- BoundaryValues<dim> boundary_function;
+ using Iterator = decltype(dof_handler.begin_active());
+ BoundaryValues<dim> boundary_function;
auto cell_worker = [&](const Iterator & cell,
ScratchData<dim> &scratch_data,
void
test_LA_Trilinos()
{
- typedef LA_Trilinos LA;
+ using LA = LA_Trilinos;
unsigned int myid = Utilities::MPI::this_mpi_process(MPI_COMM_WORLD);
unsigned int numproc = Utilities::MPI::n_mpi_processes(MPI_COMM_WORLD);
deallog << "relevant: ";
locally_relevant_dofs.print(deallog);
- typedef typename LA::MPI::BlockSparseMatrix::value_type number;
+ using number = typename LA::MPI::BlockSparseMatrix::value_type;
AffineConstraints<number> constraints(locally_relevant_dofs);
constraints.close();
void
test_alt()
{
- typedef LA_Trilinos LA;
- unsigned int myid = Utilities::MPI::this_mpi_process(MPI_COMM_WORLD);
- unsigned int numproc = Utilities::MPI::n_mpi_processes(MPI_COMM_WORLD);
+ using LA = LA_Trilinos;
+ unsigned int myid = Utilities::MPI::this_mpi_process(MPI_COMM_WORLD);
+ unsigned int numproc = Utilities::MPI::n_mpi_processes(MPI_COMM_WORLD);
if (myid == 0)
deallog << "numproc=" << numproc << std::endl;
class MPI
{
public:
- typedef LinearAlgebraPETSc::MPI::Vector Vector;
- typedef LinearAlgebraPETSc::MPI::SparseMatrix SparseMatrix;
- typedef LinearAlgebraPETSc::MPI::BlockVector BlockVector;
- typedef LinearAlgebraPETSc::MPI::BlockSparseMatrix BlockSparseMatrix;
+ using Vector = LinearAlgebraPETSc::MPI::Vector;
+ using SparseMatrix = LinearAlgebraPETSc::MPI::SparseMatrix;
+ using BlockVector = LinearAlgebraPETSc::MPI::BlockVector;
+ using BlockSparseMatrix = LinearAlgebraPETSc::MPI::BlockSparseMatrix;
};
};
class MPI
{
public:
- typedef LinearAlgebraTrilinos::MPI::Vector Vector;
- typedef LinearAlgebraTrilinos::MPI::SparseMatrix SparseMatrix;
- typedef LinearAlgebraTrilinos::MPI::BlockVector BlockVector;
- typedef LinearAlgebraTrilinos::MPI::BlockSparseMatrix BlockSparseMatrix;
+ using Vector = LinearAlgebraTrilinos::MPI::Vector;
+ using SparseMatrix = LinearAlgebraTrilinos::MPI::SparseMatrix;
+ using BlockVector = LinearAlgebraTrilinos::MPI::BlockVector;
+ using BlockSparseMatrix = LinearAlgebraTrilinos::MPI::BlockSparseMatrix;
};
};
void
test_trilinos_alternative()
{
- typedef LA_Trilinos LA;
+ using LA = LA_Trilinos;
unsigned int myid = Utilities::MPI::this_mpi_process(MPI_COMM_WORLD);
unsigned int numproc = Utilities::MPI::n_mpi_processes(MPI_COMM_WORLD);
-typedef Triangulation<2>::active_cell_iterator active_cell_iterator;
+using active_cell_iterator = Triangulation<2>::active_cell_iterator;
template <typename Iterator>
bool
// check 4: and yet another possibility
if (true)
{
- typedef FilteredIterator<active_cell_iterator> FI;
+ using FI = FilteredIterator<active_cell_iterator>;
bool (*predicate)(const active_cell_iterator, const unsigned int) =
&level_equal_to<active_cell_iterator>;
// id
if (true)
{
- typedef FilteredIterator<active_cell_iterator> FI;
- const IteratorFilters::SubdomainEqualTo predicate(1);
- FI cell(predicate);
+ using FI = FilteredIterator<active_cell_iterator>;
+ const IteratorFilters::SubdomainEqualTo predicate(1);
+ FI cell(predicate);
cell.set_to_next_positive(tria.begin_active());
active_cell_iterator endc(tria.end());
active_cell_iterator cell1 = tria.begin_active();
-typedef Triangulation<2>::active_cell_iterator active_cell_iterator;
+using active_cell_iterator = Triangulation<2>::active_cell_iterator;
template <typename Iterator>
bool
// check 4: and yet another possibility
if (true)
{
- typedef FilteredIterator<active_cell_iterator> FI;
+ using FI = FilteredIterator<active_cell_iterator>;
bool (*predicate)(const active_cell_iterator, const unsigned int) =
&level_equal_to<active_cell_iterator>;
// id
if (true)
{
- typedef FilteredIterator<active_cell_iterator> FI;
- const IteratorFilters::SubdomainEqualTo predicate(1);
- FI cell(predicate);
+ using FI = FilteredIterator<active_cell_iterator>;
+ const IteratorFilters::SubdomainEqualTo predicate(1);
+ FI cell(predicate);
cell.set_to_next_positive(tria.begin_active());
active_cell_iterator endc(tria.end());
active_cell_iterator cell1 = tria.begin_active();
-typedef Triangulation<2>::active_cell_iterator active_cell_iterator;
+using active_cell_iterator = Triangulation<2>::active_cell_iterator;
template <typename Iterator>
bool
#include "../tests.h"
-typedef Triangulation<2>::active_cell_iterator active_cell_iterator;
+using active_cell_iterator = Triangulation<2>::active_cell_iterator;
void
test()
tria[1].last_active()->set_refine_flag();
tria[1].execute_coarsening_and_refinement();
- typedef std::list<std::pair<typename Triangulation<dim>::cell_iterator,
- typename Triangulation<dim>::cell_iterator>>
- CellList;
+ using CellList =
+ std::list<std::pair<typename Triangulation<dim>::cell_iterator,
+ typename Triangulation<dim>::cell_iterator>>;
const CellList cell_list =
GridTools::get_finest_common_cells(tria[0], tria[1]);
DoFHandler<dim> dh0(tria[0]);
DoFHandler<dim> dh1(tria[1]);
- typedef std::list<std::pair<typename DoFHandler<dim>::cell_iterator,
- typename DoFHandler<dim>::cell_iterator>>
- CellList;
+ using CellList =
+ std::list<std::pair<typename DoFHandler<dim>::cell_iterator,
+ typename DoFHandler<dim>::cell_iterator>>;
const CellList cell_list = GridTools::get_finest_common_cells(dh0, dh1);
for (typename CellList::const_iterator cell_pair = cell_list.begin();
DoFHandler<dim> dh0(tria[0]);
DoFHandler<dim> dh1(tria[1]);
- typedef std::list<std::pair<typename DoFHandler<dim>::cell_iterator,
- typename DoFHandler<dim>::cell_iterator>>
- CellList;
+ using CellList =
+ std::list<std::pair<typename DoFHandler<dim>::cell_iterator,
+ typename DoFHandler<dim>::cell_iterator>>;
const CellList cell_list = GridTools::get_finest_common_cells(dh0, dh1);
for (typename CellList::const_iterator cell_pair = cell_list.begin();
}
#endif
- typedef std::list<std::pair<typename Triangulation<dim>::cell_iterator,
- typename Triangulation<dim>::cell_iterator>>
- CellList;
+ using CellList =
+ std::list<std::pair<typename Triangulation<dim>::cell_iterator,
+ typename Triangulation<dim>::cell_iterator>>;
deallog << "number of locally owned cells in tria 0 and tria 1: "
<< tria_0.n_active_cells() << ' ' << tria_1.n_active_cells()
generate_grid(triangulation2);
- typedef Triangulation<2>::cell_iterator CellIterator2;
- typedef std::vector<GridTools::PeriodicFacePair<CellIterator2>> FaceVector2;
- FaceVector2 test2;
+ using CellIterator2 = Triangulation<2>::cell_iterator;
+ using FaceVector2 = std::vector<GridTools::PeriodicFacePair<CellIterator2>>;
+ FaceVector2 test2;
GridTools::collect_periodic_faces(
triangulation2, 42, 1, test2, dealii::Tensor<1, 2>());
generate_grid(triangulation3);
- typedef Triangulation<3>::cell_iterator CellIterator3;
- typedef std::vector<GridTools::PeriodicFacePair<CellIterator3>> FaceVector3;
- FaceVector3 test3;
+ using CellIterator3 = Triangulation<3>::cell_iterator;
+ using FaceVector3 = std::vector<GridTools::PeriodicFacePair<CellIterator3>>;
+ FaceVector3 test3;
GridTools::collect_periodic_faces(
triangulation3, 42, 2, test3, dealii::Tensor<1, 3>());
generate_grid(triangulation, i);
- typedef Triangulation<2>::cell_iterator CellIterator;
- typedef std::vector<GridTools::PeriodicFacePair<CellIterator>> FaceVector;
- FaceVector test;
+ using CellIterator = Triangulation<2>::cell_iterator;
+ using FaceVector = std::vector<GridTools::PeriodicFacePair<CellIterator>>;
+ FaceVector test;
GridTools::collect_periodic_faces(
triangulation, 42, 43, 1, test, dealii::Tensor<1, 2>());
generate_grid(triangulation, i);
- typedef Triangulation<3>::cell_iterator CellIterator;
- typedef std::vector<GridTools::PeriodicFacePair<CellIterator>> FaceVector;
- FaceVector test;
+ using CellIterator = Triangulation<3>::cell_iterator;
+ using FaceVector = std::vector<GridTools::PeriodicFacePair<CellIterator>>;
+ FaceVector test;
GridTools::collect_periodic_faces(
triangulation, 42, 43, 2, test, dealii::Tensor<1, 3>());
GridGenerator::hyper_cube(tria);
tria.refine_global(2);
- typedef typename Triangulation<dim>::active_cell_iterator cell_iterator;
+ using cell_iterator = typename Triangulation<dim>::active_cell_iterator;
// Mark a small block at the corner of the hypercube
cell_iterator cell = tria.begin_active(), endc = tria.end();
GridGenerator::subdivided_hyper_rectangle(
tria, step_sizes, bottom_left, upper_right, true);
- typedef typename Triangulation<dim>::active_cell_iterator cell_iterator;
+ using cell_iterator = typename Triangulation<dim>::active_cell_iterator;
// Mark a small block at the corner of the hypercube
cell_iterator cell = tria.begin_active(), endc = tria.end();
GridGenerator::hyper_cube(tria);
tria.refine_global(2);
- typedef typename Triangulation<dim>::active_cell_iterator cell_iterator;
+ using cell_iterator = typename Triangulation<dim>::active_cell_iterator;
// Mark a small block at the corner of the hypercube
cell_iterator cell = tria.begin_active(), endc = tria.end();
GridGenerator::hyper_cube(tria);
tria.refine_global(2);
- typedef typename Triangulation<dim>::active_cell_iterator cell_iterator;
+ using cell_iterator = typename Triangulation<dim>::active_cell_iterator;
// Mark a small block at the corner of the hypercube
cell_iterator cell = tria.begin_active(), endc = tria.end();
GridGenerator::hyper_cube(tria);
tria.refine_global(4);
- typedef typename parallel::distributed::Triangulation<dim, spacedim>::
- active_cell_iterator cell_iterator;
+ using cell_iterator = typename parallel::distributed::
+ Triangulation<dim, spacedim>::active_cell_iterator;
std::function<bool(const cell_iterator &)> predicate =
pred_locally_owned<dim, spacedim>;
GridGenerator::hyper_cube(tria);
tria.refine_global(2);
- typedef typename Triangulation<dim>::active_cell_iterator cell_iterator;
+ using cell_iterator = typename Triangulation<dim>::active_cell_iterator;
// Mark a small block at the corner of the hypercube
cell_iterator cell = tria.begin_active(), endc = tria.end();
GridGenerator::hyper_cube(tria);
tria.refine_global(2);
- typedef typename Triangulation<dim>::active_cell_iterator cell_iterator;
+ using cell_iterator = typename Triangulation<dim>::active_cell_iterator;
// Mark a small block at the corner of the hypercube
cell_iterator cell = tria.begin_active(), endc = tria.end();
GridGenerator::hyper_cube(tria);
tria.refine_global(2);
- typedef typename Triangulation<dim>::active_cell_iterator cell_iterator;
+ using cell_iterator = typename Triangulation<dim>::active_cell_iterator;
// Mark a small block at the corner of the hypercube
cell_iterator cell = tria.begin_active(), endc = tria.end();
tria.refine_global(2);
DoFHandler<dim> dof_handler(tria);
- typedef typename DoFHandler<dim>::active_cell_iterator cell_iterator;
+ using cell_iterator = typename DoFHandler<dim>::active_cell_iterator;
// Mark a small block at the corner of the hypercube
cell_iterator cell = dof_handler.begin_active(), endc = dof_handler.end();
tria.refine_global(2);
DoFHandler<dim> dof_handler(tria);
- typedef typename DoFHandler<dim>::active_cell_iterator cell_iterator;
+ using cell_iterator = typename DoFHandler<dim>::active_cell_iterator;
// Mark a small block at the corner of the hypercube
cell_iterator cell = dof_handler.begin_active(), endc = dof_handler.end();
GridGenerator::hyper_cube(tria);
tria.refine_global(2);
- typedef
- typename parallel::distributed::Triangulation<dim>::active_cell_iterator
- cell_iterator;
+ using cell_iterator =
+ typename parallel::distributed::Triangulation<dim>::active_cell_iterator;
// Mark a small block at the corner of the hypercube
std::vector<cell_iterator> ghost_cells_tria;
Triangulation<dim> tria;
GridGenerator::hyper_cube(tria, -1.0, 1.0, true);
- typedef GridTools::PeriodicFacePair<
- typename Triangulation<dim>::cell_iterator>
- periodic_face_pair;
+ using periodic_face_pair =
+ GridTools::PeriodicFacePair<typename Triangulation<dim>::cell_iterator>;
std::vector<periodic_face_pair> periodicity_vector;
GridTools::collect_periodic_faces(tria, 0, 1, 0, periodicity_vector);
tria.add_periodicity(periodicity_vector);
void
Solver<dim>::assemble_linear_system(LinearSystem &linear_system)
{
- typedef typename DoFHandler<dim>::active_cell_iterator active_cell_iterator;
+ using active_cell_iterator = typename DoFHandler<dim>::active_cell_iterator;
const unsigned int n_threads = MultithreadInfo::n_threads();
std::vector<std::pair<active_cell_iterator, active_cell_iterator>>
class Local : public Subscriptor
{
public:
- typedef EmptyInfo CellInfo;
+ using CellInfo = EmptyInfo;
void
cell(MeshWorker::DoFInfo<dim> &dinfo, CellInfo &info) const;
class EmptyInfoBox
{
public:
- typedef EmptyInfo CellInfo;
+ using CellInfo = EmptyInfo;
template <int dim, class DOFINFO>
void
post_cell(const MeshWorker::DoFInfoBox<dim, DOFINFO> &)
class Local : public Subscriptor
{
public:
- typedef EmptyInfo CellInfo;
+ using CellInfo = EmptyInfo;
void
cell(MeshWorker::DoFInfo<dim> &dinfo, CellInfo &info) const;
class Local : public Subscriptor
{
public:
- typedef MeshWorker::IntegrationInfo<dim> CellInfo;
+ using CellInfo = MeshWorker::IntegrationInfo<dim>;
void
cell(MeshWorker::DoFInfo<dim> &dinfo, CellInfo &info) const;
class Local : public Subscriptor
{
public:
- typedef MeshWorker::IntegrationInfo<dim> CellInfo;
+ using CellInfo = MeshWorker::IntegrationInfo<dim>;
void
cell(MeshWorker::DoFInfo<dim> &dinfo, CellInfo &info) const;
auto op_b = linear_operator<TrilinosWrappers::MPI::BlockVector>(b);
- typedef LinearOperator<TrilinosWrappers::MPI::Vector,
- TrilinosWrappers::MPI::Vector>
- Op_MPI;
+ using Op_MPI = LinearOperator<TrilinosWrappers::MPI::Vector,
+ TrilinosWrappers::MPI::Vector>;
auto op_c = block_diagonal_operator<2, TrilinosWrappers::MPI::BlockVector>(
std::array<Op_MPI, 2>({{op_a, op_a}}));
AssertThrow(correct_constraints.is_constrained(i) ==
library_constraints.is_constrained(i),
ExcInternalError());
- typedef const std::vector<std::pair<types::global_dof_index, double>>
- &constraint_format;
+ using constraint_format =
+ const std::vector<std::pair<types::global_dof_index, double>> &;
if (correct_constraints.is_constrained(i))
{
constraint_format correct =
void
test(const bool hanging_nodes = true)
{
- typedef double number;
+ using number = double;
parallel::distributed::Triangulation<dim> tria(MPI_COMM_WORLD);
GridGenerator::hyper_cube(tria);
struct LeftVector
{
- typedef double value_type;
- value_type value;
+ using value_type = double;
+ value_type value;
LeftVector &
operator=(value_type new_value)
struct RightVector
{
- typedef double value_type;
- value_type value;
+ using value_type = double;
+ value_type value;
RightVector &
operator=(value_type new_value)
// Create to distinct linear operators:
- typedef dealii::internal::LinearOperatorImplementation::EmptyPayload Payload;
+ using Payload = dealii::internal::LinearOperatorImplementation::EmptyPayload;
LinearOperator<LeftVector, RightVector, Payload> multiply2;
multiply2.vmult = [](LeftVector &v, const RightVector &u) {
v.value = 2 * u.value;
struct LeftVector
{
- typedef std::complex<double> value_type;
- value_type value;
+ using value_type = std::complex<double>;
+ value_type value;
LeftVector &
operator=(value_type new_value)
struct RightVector
{
- typedef std::complex<double> value_type;
- value_type value;
+ using value_type = std::complex<double>;
+ value_type value;
RightVector &
operator=(value_type new_value)
// Create to distinct linear operators:
- typedef dealii::internal::LinearOperatorImplementation::EmptyPayload Payload;
+ using Payload = dealii::internal::LinearOperatorImplementation::EmptyPayload;
LinearOperator<LeftVector, RightVector, Payload> multiply2;
multiply2.vmult = [](LeftVector &v, const RightVector &u) {
v.value = 2. * u.value;
initlog();
deallog << std::setprecision(10);
- typedef TrilinosWrappers::MPI::Vector vector_t;
- typedef TrilinosWrappers::SparseMatrix matrix_t;
+ using vector_t = TrilinosWrappers::MPI::Vector;
+ using matrix_t = TrilinosWrappers::SparseMatrix;
matrix_t a(5U, 5U, 3U);
a.compress(VectorOperation::add);
{
deallog << "PreconditionChebyshev" << std::endl;
- typedef PreconditionChebyshev<SparseMatrix<double>> PREC;
+ using PREC = PreconditionChebyshev<SparseMatrix<double>>;
test_preconditioner<PREC>(A, b);
}
{
deallog << "PreconditionIdentity" << std::endl;
- typedef PreconditionIdentity PREC;
+ using PREC = PreconditionIdentity;
test_preconditioner<PREC>(A, b);
}
{
deallog << "PreconditionJacobi" << std::endl;
- typedef PreconditionJacobi<SparseMatrix<double>> PREC;
+ using PREC = PreconditionJacobi<SparseMatrix<double>>;
test_preconditioner<PREC>(A, b);
}
{
deallog << "PreconditionPSOR" << std::endl;
- typedef PreconditionPSOR<SparseMatrix<double>> PREC;
- std::vector<PREC::size_type> permutation(b.size());
+ using PREC = PreconditionPSOR<SparseMatrix<double>>;
+ std::vector<PREC::size_type> permutation(b.size());
std::vector<PREC::size_type> inverse_permutation(b.size());
test_preconditioner<PREC>(
A, b, typename PREC::AdditionalData(permutation, inverse_permutation));
}
{
deallog << "PreconditionRichardson" << std::endl;
- typedef PreconditionRichardson PREC;
+ using PREC = PreconditionRichardson;
test_preconditioner<PREC>(A, b);
}
{
}
{
deallog << "PreconditionSOR" << std::endl;
- typedef PreconditionSOR<SparseMatrix<double>> PREC;
+ using PREC = PreconditionSOR<SparseMatrix<double>>;
test_preconditioner<PREC>(A, b);
}
{
deallog << "PreconditionSSOR" << std::endl;
- typedef PreconditionSSOR<SparseMatrix<double>> PREC;
+ using PREC = PreconditionSSOR<SparseMatrix<double>>;
test_preconditioner<PREC>(A, b);
}
{
deallog << "SparseILU" << std::endl;
- typedef SparseILU<double> PREC;
+ using PREC = SparseILU<double>;
test_preconditioner<PREC>(A, b);
}
{
deallog << "SparseMIC" << std::endl;
- typedef SparseMIC<double> PREC;
+ using PREC = SparseMIC<double>;
test_preconditioner<PREC>(A, b);
}
{
deallog << "SparseVanka" << std::endl;
- typedef SparseVanka<double> PREC;
- typedef typename PREC::AdditionalData PREC_AD;
+ using PREC = SparseVanka<double>;
+ using PREC_AD = typename PREC::AdditionalData;
test_preconditioner<PREC>(A, b, PREC_AD(std::vector<bool>(rc, true)));
}
deallog.pop();
{
deallog << "SolverBicgstab" << std::endl;
- typedef SolverBicgstab<Vector<double>> SLVR;
+ using SLVR = SolverBicgstab<Vector<double>>;
test_solver<SLVR>(A, b);
}
{
deallog << "SolverCG" << std::endl;
- typedef SolverCG<Vector<double>> SLVR;
+ using SLVR = SolverCG<Vector<double>>;
test_solver<SLVR>(A, b);
}
{
deallog << "SolverFGMRES" << std::endl;
- typedef SolverFGMRES<Vector<double>> SLVR;
+ using SLVR = SolverFGMRES<Vector<double>>;
test_solver<SLVR>(A, b);
}
{
deallog << "SolverGMRES" << std::endl;
- typedef SolverGMRES<Vector<double>> SLVR;
+ using SLVR = SolverGMRES<Vector<double>>;
test_solver<SLVR>(A, b);
}
{
deallog << "SolverMinRes" << std::endl;
- typedef SolverMinRes<Vector<double>> SLVR;
+ using SLVR = SolverMinRes<Vector<double>>;
test_solver<SLVR>(A, b);
}
{
deallog << "SolverQMRS" << std::endl;
- typedef SolverQMRS<Vector<double>> SLVR;
+ using SLVR = SolverQMRS<Vector<double>>;
test_solver<SLVR>(A, b);
}
{
deallog << "SolverRelaxation" << std::endl;
- typedef SolverRelaxation<Vector<double>> SLVR;
+ using SLVR = SolverRelaxation<Vector<double>>;
test_solver<SLVR>(A, b);
}
{
deallog << "SolverRichardson" << std::endl;
- typedef SolverRichardson<Vector<double>> SLVR;
+ using SLVR = SolverRichardson<Vector<double>>;
test_solver<SLVR>(A, b);
}
{
// === PRECONDITIONERS ===
{
deallog << "PreconditionBlockIdentity" << std::endl;
- typedef PreconditionBlockIdentity<SparseMatrix<double>> PREC;
+ using PREC = PreconditionBlockIdentity<SparseMatrix<double>>;
test_preconditioner_block<PREC>(A, b);
}
int
main(int argc, char *argv[])
{
- typedef PETScWrappers::MPI::SparseMatrix::size_type size_type;
+ using size_type = PETScWrappers::MPI::SparseMatrix::size_type;
Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1);
PRECONDITIONER preconditioner;
preconditioner.initialize(A, data);
- typedef TrilinosWrappers::SolverCG SOLVER;
- SolverControl solver_control(100, 1.0e-10);
- SOLVER solver(solver_control);
+ using SOLVER = TrilinosWrappers::SolverCG;
+ SolverControl solver_control(100, 1.0e-10);
+ SOLVER solver(solver_control);
// Exact inverse
const auto lo_A_inv = inverse_operator(lo_A, solver, preconditioner);
{
// Stand-alone
deallog.push("S.A.");
- typedef dealii::TrilinosWrappers::internal::LinearOperatorImplementation::
- TrilinosPayload PAYLOAD;
- const auto lo_A_inv_approx =
+ using PAYLOAD = dealii::TrilinosWrappers::internal::
+ LinearOperatorImplementation::TrilinosPayload;
+ const auto lo_A_inv_approx =
linear_operator<VECTOR, VECTOR, PAYLOAD>(preconditioner);
// Singular operation
SolverControl solver_control(100, 1.0e-10);
SOLVER solver(solver_control);
- typedef TrilinosWrappers::PreconditionJacobi PRECONDITIONER;
- PRECONDITIONER preconditioner;
+ using PRECONDITIONER = TrilinosWrappers::PreconditionJacobi;
+ PRECONDITIONER preconditioner;
preconditioner.initialize(A);
{
{
deallog.push("PreconditionAMG");
- typedef TrilinosWrappers::PreconditionAMG PREC;
+ using PREC = TrilinosWrappers::PreconditionAMG;
test_preconditioner<PREC>(A, b);
test_preconditioner<PREC>(A, c);
deallog.pop();
#ifdef DEAL_II_TRILINOS_WITH_MUELU
{
deallog.push("PreconditionAMGMueLu");
- typedef TrilinosWrappers::PreconditionAMGMueLu PREC;
+ using PREC = TrilinosWrappers::PreconditionAMGMueLu;
test_preconditioner<PREC>(A, b);
test_preconditioner<PREC>(A, c);
deallog.pop();
{
deallog.push("PreconditionChebyshev");
- typedef TrilinosWrappers::PreconditionChebyshev PREC;
+ using PREC = TrilinosWrappers::PreconditionChebyshev;
test_preconditioner<PREC>(A, b);
test_preconditioner<PREC>(A, c);
deallog.pop();
{
deallog.push("PreconditionIC");
- typedef TrilinosWrappers::PreconditionIC PREC;
+ using PREC = TrilinosWrappers::PreconditionIC;
test_preconditioner<PREC>(A, b);
test_preconditioner<PREC>(A, c);
deallog.pop();
{
deallog.push("PreconditionIdentity");
- typedef TrilinosWrappers::PreconditionIdentity PREC;
+ using PREC = TrilinosWrappers::PreconditionIdentity;
test_preconditioner<PREC>(A, b);
test_preconditioner<PREC>(A, c);
deallog.pop();
{
deallog.push("PreconditionILU");
- typedef TrilinosWrappers::PreconditionILU PREC;
+ using PREC = TrilinosWrappers::PreconditionILU;
test_preconditioner<PREC>(A, b);
test_preconditioner<PREC>(A, c);
deallog.pop();
{
deallog.push("PreconditionILUT");
- typedef TrilinosWrappers::PreconditionILUT PREC;
+ using PREC = TrilinosWrappers::PreconditionILUT;
test_preconditioner<PREC>(A, b);
test_preconditioner<PREC>(A, c);
deallog.pop();
{
deallog.push("PreconditionJacobi");
- typedef TrilinosWrappers::PreconditionJacobi PREC;
+ using PREC = TrilinosWrappers::PreconditionJacobi;
test_preconditioner<PREC>(A, b);
test_preconditioner<PREC>(A, c);
deallog.pop();
{
deallog.push("PreconditionSOR");
- typedef TrilinosWrappers::PreconditionSOR PREC;
+ using PREC = TrilinosWrappers::PreconditionSOR;
test_preconditioner<PREC>(A, b);
test_preconditioner<PREC>(A, c);
deallog.pop();
{
deallog.push("PreconditionSSOR");
- typedef TrilinosWrappers::PreconditionSSOR PREC;
+ using PREC = TrilinosWrappers::PreconditionSSOR;
test_preconditioner<PREC>(A, b);
test_preconditioner<PREC>(A, c);
deallog.pop();
// Note: Even though this test fails, we would still like to check
// that we can build LinearOperators with this solver
deallog.push("SolverBicgstab");
- typedef TrilinosWrappers::SolverBicgstab SLVR;
+ using SLVR = TrilinosWrappers::SolverBicgstab;
test_solver<SLVR>(A, b);
deallog.pop();
}
{
deallog.push("SolverCG");
- typedef TrilinosWrappers::SolverCG SLVR;
+ using SLVR = TrilinosWrappers::SolverCG;
test_solver<SLVR>(A, b);
deallog.pop();
}
{
deallog.push("SolverCGS");
- typedef TrilinosWrappers::SolverCGS SLVR;
+ using SLVR = TrilinosWrappers::SolverCGS;
test_solver<SLVR>(A, b);
deallog.pop();
}
// the LinearOperator class.
// {
// deallog.push("SolverDirect");
- // typedef TrilinosWrappers::SolverDirect SLVR;
+ // using SLVR = TrilinosWrappers::SolverDirect;
// // test_solver<SLVR> (A, b);
//
- // typedef dealii::TrilinosWrappers::MPI::Vector VectorType;
+ // using VectorType = dealii::TrilinosWrappers::MPI::Vector;
// typedef
// dealii::TrilinosWrappers::internal::LinearOperatorImplementation::TrilinosPayload
// PayloadType;
{
deallog.push("SolverGMRES");
- typedef TrilinosWrappers::SolverGMRES SLVR;
+ using SLVR = TrilinosWrappers::SolverGMRES;
test_solver<SLVR>(A, b);
deallog.pop();
}
// Note: Even though this test fails, we would still like to check
// that we can build LinearOperators with this solver
deallog.push("SolverTFQMR");
- typedef TrilinosWrappers::SolverTFQMR SLVR;
+ using SLVR = TrilinosWrappers::SolverTFQMR;
test_solver<SLVR>(A, b);
deallog.pop();
}
PRECONDITIONER preconditioner;
preconditioner.initialize(A, data);
- typedef SolverCG<VECTOR> SOLVER;
- SolverControl solver_control(100, 1.0e-10, false, false);
- SOLVER solver(solver_control);
+ using SOLVER = SolverCG<VECTOR>;
+ SolverControl solver_control(100, 1.0e-10, false, false);
+ SOLVER solver(solver_control);
// Exact inverse
const auto lo_A_inv = inverse_operator(lo_A, solver, preconditioner);
{
// Stand-alone
deallog.push("S.A.");
- typedef dealii::TrilinosWrappers::internal::LinearOperatorImplementation::
- TrilinosPayload PAYLOAD;
- const auto lo_A_inv_approx =
+ using PAYLOAD = dealii::TrilinosWrappers::internal::
+ LinearOperatorImplementation::TrilinosPayload;
+ const auto lo_A_inv_approx =
linear_operator<VECTOR, VECTOR, PAYLOAD>(preconditioner);
// Singular operation
SolverControl solver_control(100, 1.0e-10, false, false);
SOLVER solver(solver_control);
- typedef TrilinosWrappers::PreconditionJacobi PRECONDITIONER;
- PRECONDITIONER preconditioner;
+ using PRECONDITIONER = TrilinosWrappers::PreconditionJacobi;
+ PRECONDITIONER preconditioner;
preconditioner.initialize(A);
{
{
deallog.push("PreconditionAMG");
- typedef TrilinosWrappers::PreconditionAMG PREC;
+ using PREC = TrilinosWrappers::PreconditionAMG;
test_preconditioner<PREC>(A, b);
test_preconditioner<PREC>(A, c);
deallog.pop();
#ifdef DEAL_II_TRILINOS_WITH_MUELU
{
deallog.push("PreconditionAMGMueLu");
- typedef TrilinosWrappers::PreconditionAMGMueLu PREC;
+ using PREC = TrilinosWrappers::PreconditionAMGMueLu;
test_preconditioner<PREC>(A, b);
test_preconditioner<PREC>(A, c);
deallog.pop();
{
deallog.push("PreconditionChebyshev");
- typedef TrilinosWrappers::PreconditionChebyshev PREC;
+ using PREC = TrilinosWrappers::PreconditionChebyshev;
test_preconditioner<PREC>(A, b);
test_preconditioner<PREC>(A, c);
deallog.pop();
{
deallog.push("PreconditionIC");
- typedef TrilinosWrappers::PreconditionIC PREC;
+ using PREC = TrilinosWrappers::PreconditionIC;
test_preconditioner<PREC>(A, b);
test_preconditioner<PREC>(A, c);
deallog.pop();
{
deallog.push("PreconditionIdentity");
- typedef TrilinosWrappers::PreconditionIdentity PREC;
+ using PREC = TrilinosWrappers::PreconditionIdentity;
test_preconditioner<PREC>(A, b);
test_preconditioner<PREC>(A, c);
deallog.pop();
{
deallog.push("PreconditionILU");
- typedef TrilinosWrappers::PreconditionILU PREC;
+ using PREC = TrilinosWrappers::PreconditionILU;
test_preconditioner<PREC>(A, b);
test_preconditioner<PREC>(A, c);
deallog.pop();
{
deallog.push("PreconditionILUT");
- typedef TrilinosWrappers::PreconditionILUT PREC;
+ using PREC = TrilinosWrappers::PreconditionILUT;
test_preconditioner<PREC>(A, b);
test_preconditioner<PREC>(A, c);
deallog.pop();
{
deallog.push("PreconditionJacobi");
- typedef TrilinosWrappers::PreconditionJacobi PREC;
+ using PREC = TrilinosWrappers::PreconditionJacobi;
test_preconditioner<PREC>(A, b);
test_preconditioner<PREC>(A, c);
deallog.pop();
{
deallog.push("PreconditionSOR");
- typedef TrilinosWrappers::PreconditionSOR PREC;
+ using PREC = TrilinosWrappers::PreconditionSOR;
test_preconditioner<PREC>(A, b);
test_preconditioner<PREC>(A, c);
deallog.pop();
{
deallog.push("PreconditionSSOR");
- typedef TrilinosWrappers::PreconditionSSOR PREC;
+ using PREC = TrilinosWrappers::PreconditionSSOR;
test_preconditioner<PREC>(A, b);
test_preconditioner<PREC>(A, c);
deallog.pop();
{
deallog.push("SolverBicgstab");
- typedef SolverBicgstab<TrilinosWrappers::MPI::Vector> SLVR;
+ using SLVR = SolverBicgstab<TrilinosWrappers::MPI::Vector>;
test_solver<SLVR>(A, b);
deallog.pop();
}
{
deallog.push("SolverCG");
- typedef SolverCG<TrilinosWrappers::MPI::Vector> SLVR;
+ using SLVR = SolverCG<TrilinosWrappers::MPI::Vector>;
test_solver<SLVR>(A, b);
deallog.pop();
}
{
deallog.push("SolverGMRES");
- typedef SolverGMRES<TrilinosWrappers::MPI::Vector> SLVR;
+ using SLVR = SolverGMRES<TrilinosWrappers::MPI::Vector>;
test_solver<SLVR>(A, b);
deallog.pop();
}
{
deallog.push("SolverFGMRES");
- typedef SolverFGMRES<TrilinosWrappers::MPI::Vector> SLVR;
+ using SLVR = SolverFGMRES<TrilinosWrappers::MPI::Vector>;
test_solver<SLVR>(A, b);
deallog.pop();
}
{
deallog.push("SolverMinRes");
- typedef SolverMinRes<TrilinosWrappers::MPI::Vector> SLVR;
+ using SLVR = SolverMinRes<TrilinosWrappers::MPI::Vector>;
test_solver<SLVR>(A, b);
deallog.pop();
}
{
deallog.push("SolverQMRS");
- typedef SolverQMRS<TrilinosWrappers::MPI::Vector> SLVR;
+ using SLVR = SolverQMRS<TrilinosWrappers::MPI::Vector>;
test_solver<SLVR>(A, b);
deallog.pop();
}
{
deallog.push("SolverRichardson");
- typedef SolverRichardson<TrilinosWrappers::MPI::Vector> SLVR;
+ using SLVR = SolverRichardson<TrilinosWrappers::MPI::Vector>;
test_solver<SLVR>(A, b);
deallog.pop();
}
deallog.pop();
}
- typedef TrilinosWrappers::MPI::Vector VectorType;
- VectorType output(solution);
+ using VectorType = TrilinosWrappers::MPI::Vector;
+ VectorType output(solution);
{
deallog.push("Trilinos_CG_SSOR");
output = 0;
void
Step4<dim>::solve()
{
- typedef TrilinosWrappers::MPI::Vector VectorType;
+ using VectorType = TrilinosWrappers::MPI::Vector;
// Compute 'reference' solution with direct solver
VectorType temp_solution(system_rhs);
void
Step4<dim>::solve()
{
- typedef TrilinosWrappers::MPI::Vector VectorType;
+ using VectorType = TrilinosWrappers::MPI::Vector;
// Compute 'reference' solution with direct solver
VectorType temp_solution(system_rhs);
evaluate_ops(const TrilinosWrappers::BlockSparseMatrix &matrix,
const TrilinosWrappers::MPI::BlockVector & vector)
{
- const double tol = 1e-12;
- typedef dealii::TrilinosWrappers::SparseMatrix MatrixType;
- typedef dealii::TrilinosWrappers::MPI::Vector VectorType;
- typedef dealii::TrilinosWrappers::internal::LinearOperatorImplementation::
- TrilinosPayload PayloadType;
- typedef typename PayloadType::VectorType PayloadVectorType;
- typedef dealii::types::global_dof_index size_type;
+ const double tol = 1e-12;
+ using MatrixType = dealii::TrilinosWrappers::SparseMatrix;
+ using VectorType = dealii::TrilinosWrappers::MPI::Vector;
+ using PayloadType = dealii::TrilinosWrappers::internal::
+ LinearOperatorImplementation::TrilinosPayload;
+ using PayloadVectorType = typename PayloadType::VectorType;
+ using size_type = dealii::types::global_dof_index;
deallog.push("System info");
{
evaluate_ops(const TrilinosWrappers::BlockSparseMatrix &matrix,
const TrilinosWrappers::MPI::BlockVector & vector)
{
- const double tol = 1e-12;
- typedef dealii::TrilinosWrappers::SparseMatrix MatrixType;
- typedef dealii::TrilinosWrappers::MPI::Vector VectorType;
- typedef dealii::TrilinosWrappers::internal::LinearOperatorImplementation::
- TrilinosPayload PayloadType;
- typedef typename PayloadType::VectorType PayloadVectorType;
- typedef dealii::types::global_dof_index size_type;
+ const double tol = 1e-12;
+ using MatrixType = dealii::TrilinosWrappers::SparseMatrix;
+ using VectorType = dealii::TrilinosWrappers::MPI::Vector;
+ using PayloadType = dealii::TrilinosWrappers::internal::
+ LinearOperatorImplementation::TrilinosPayload;
+ using PayloadVectorType = typename PayloadType::VectorType;
+ using size_type = dealii::types::global_dof_index;
deallog.push("System info");
{
initlog();
deallog << std::setprecision(10);
- typedef LinearAlgebra::distributed::Vector<double> vector_t;
- typedef TrilinosWrappers::SparseMatrix matrix_t;
+ using vector_t = LinearAlgebra::distributed::Vector<double>;
+ using matrix_t = TrilinosWrappers::SparseMatrix;
matrix_t a(5U, 4U, 3U);
a.compress(VectorOperation::add);
void
test()
{
- typedef Vector<number> VectorType;
- QR<VectorType> qr;
+ using VectorType = Vector<number>;
+ QR<VectorType> qr;
const unsigned int v_size = 5;
VectorType v(v_size);
void
test()
{
- typedef Vector<number> VectorType;
- QR<VectorType> qr;
+ using VectorType = Vector<number>;
+ QR<VectorType> qr;
auto print_givens = [](const unsigned int i,
const unsigned int j,
void
test()
{
- typedef Vector<number> VectorType;
+ using VectorType = Vector<number>;
ImplicitQR<VectorType> qr;
const unsigned int v_size = 5;
void
test()
{
- typedef Vector<number> VectorType;
+ using VectorType = Vector<number>;
ImplicitQR<VectorType> qr;
auto print_givens = [](const unsigned int i,
void
test()
{
- typedef Vector<number> VectorType;
- QR<VectorType> qr;
+ using VectorType = Vector<number>;
+ QR<VectorType> qr;
const unsigned int v_size = 5;
VectorType v(v_size);
void
test()
{
- typedef Vector<number> VectorType;
- QR<VectorType> qr;
+ using VectorType = Vector<number>;
+ QR<VectorType> qr;
const unsigned int v_size = 5;
VectorType v(v_size);
void
test()
{
- typedef Vector<number> VectorType;
+ using VectorType = Vector<number>;
ImplicitQR<VectorType> qr;
const unsigned int v_size = 5;
void
test()
{
- typedef Vector<number> VectorType;
- QR<VectorType> qr;
+ using VectorType = Vector<number>;
+ QR<VectorType> qr;
const unsigned int v_size = 6;
VectorType v(v_size);
void
test()
{
- typedef Vector<number> VectorType;
+ using VectorType = Vector<number>;
QR<VectorType> qr;
ImplicitQR<VectorType> pqr;
void
test()
{
- typedef Vector<number> VectorType;
+ using VectorType = Vector<number>;
ImplicitQR<VectorType> qr;
const unsigned int v_size = 5;
*/
- const unsigned int rc = 1;
- typedef TrilinosWrappers::MPI::Vector VectorType;
+ const unsigned int rc = 1;
+ using VectorType = TrilinosWrappers::MPI::Vector;
TrilinosWrappers::SparseMatrix A(rc, rc, rc);
TrilinosWrappers::SparseMatrix B(rc, rc, rc);
data, true, 0, 0, start_vector_component);
FEFaceEvaluation<dim, fe_degree, n_q_points_1d, n_components, number> phi_p(
data, false, 0, 0, start_vector_component);
- typedef typename FEFaceEvaluation<dim,
- fe_degree,
- n_q_points_1d,
- n_components,
- number>::value_type value_type;
+ using value_type = typename FEFaceEvaluation<dim,
+ fe_degree,
+ n_q_points_1d,
+ n_components,
+ number>::value_type;
for (unsigned int face = face_range.first; face < face_range.second; face++)
{
const std::pair<unsigned int, unsigned int> &face_range) const
{
FEFaceEvaluation<dim, fe_degree, n_q_points_1d, n_components, number>
- fe_eval(data, true, 0, 0, start_vector_component);
- typedef typename FEFaceEvaluation<dim,
- fe_degree,
- n_q_points_1d,
- n_components,
- number>::value_type value_type;
+ fe_eval(data, true, 0, 0, start_vector_component);
+ using value_type = typename FEFaceEvaluation<dim,
+ fe_degree,
+ n_q_points_1d,
+ n_components,
+ number>::value_type;
for (unsigned int face = face_range.first; face < face_range.second; face++)
{
data, true, 0, 0, start_vector_component);
FEFaceEvaluation<dim, fe_degree, n_q_points_1d, n_components, number> phi_p(
data, false, 0, 0, start_vector_component);
- typedef typename FEFaceEvaluation<dim,
- fe_degree,
- n_q_points_1d,
- n_components,
- number>::value_type value_type;
+ using value_type = typename FEFaceEvaluation<dim,
+ fe_degree,
+ n_q_points_1d,
+ n_components,
+ number>::value_type;
for (unsigned int face = face_range.first; face < face_range.second; face++)
{
const std::pair<unsigned int, unsigned int> &face_range) const
{
FEFaceEvaluation<dim, fe_degree, n_q_points_1d, n_components, number>
- fe_eval(data, true, 0, 0, start_vector_component);
- typedef typename FEFaceEvaluation<dim,
- fe_degree,
- n_q_points_1d,
- n_components,
- number>::value_type value_type;
+ fe_eval(data, true, 0, 0, start_vector_component);
+ using value_type = typename FEFaceEvaluation<dim,
+ fe_degree,
+ n_q_points_1d,
+ n_components,
+ number>::value_type;
for (unsigned int face = face_range.first; face < face_range.second; face++)
{
data, true, 0, 0, start_vector_component);
FEFaceEvaluation<dim, fe_degree, n_q_points_1d, n_components, number> phi_p(
data, false, 0, 0, start_vector_component);
- typedef typename FEFaceEvaluation<dim,
- fe_degree,
- n_q_points_1d,
- n_components,
- number>::value_type value_type;
+ using value_type = typename FEFaceEvaluation<dim,
+ fe_degree,
+ n_q_points_1d,
+ n_components,
+ number>::value_type;
const unsigned int n_vect = VectorizedArray<number>::size();
const std::pair<unsigned int, unsigned int> &face_range) const
{
FEFaceEvaluation<dim, fe_degree, n_q_points_1d, n_components, number>
- fe_eval(data, true, 0, 0, start_vector_component);
- typedef typename FEFaceEvaluation<dim,
- fe_degree,
- n_q_points_1d,
- n_components,
- number>::value_type value_type;
+ fe_eval(data, true, 0, 0, start_vector_component);
+ using value_type = typename FEFaceEvaluation<dim,
+ fe_degree,
+ n_q_points_1d,
+ n_components,
+ number>::value_type;
const unsigned int n_vect = VectorizedArray<number>::size();
class LaplaceOperator : public Subscriptor
{
public:
- typedef number value_type;
+ using value_type = number;
LaplaceOperator(){};
class MatrixFreeTest
{
public:
- typedef typename DoFHandler<dim>::active_cell_iterator CellIterator;
- typedef double Number;
+ using CellIterator = typename DoFHandler<dim>::active_cell_iterator;
+ using Number = double;
MatrixFreeTest(const MatrixFree<dim, Number> &data_in)
: data(data_in){};
const VectorType & src,
const std::pair<unsigned int, unsigned int> &cell_range) const
{
- typedef VectorizedArray<Number> vector_t;
+ using vector_t = VectorizedArray<Number>;
// allocate FEEvaluation. This test will test proper alignment
AlignedVector<FEEvaluation<dim, degree_p + 1, degree_p + 2, dim, Number>>
velocity;
class MatrixFreeTest
{
public:
- typedef VectorizedArray<Number> vector_t;
+ using vector_t = VectorizedArray<Number>;
MatrixFreeTest(const MatrixFree<dim, Number> &data_in)
: data(data_in){};
void
test(const FiniteElement<dim> &fe, const unsigned int n_iterations)
{
- typedef double number;
+ using number = double;
Triangulation<dim> tria;
GridGenerator::hyper_cube(tria);
AffineConstraints<double> constraints;
constraints.close();
- typedef double number;
+ using number = double;
MatrixFree<dim, number> mf_data;
{
AffineConstraints<double> constraints;
constraints.close();
- typedef double number;
+ using number = double;
MatrixFree<dim, number> mf_data;
{
void
test()
{
- typedef double number;
+ using number = double;
const SphericalManifold<dim> manifold;
Triangulation<dim> tria;
GridGenerator::hyper_ball(tria);
void
test()
{
- typedef double number;
+ using number = double;
const SphericalManifold<dim> manifold;
Triangulation<dim> tria;
GridGenerator::hyper_ball(tria);
class MatrixFreeTest
{
public:
- typedef std::vector<Vector<Number>> VectorType;
+ using VectorType = std::vector<Vector<Number>>;
MatrixFreeTest(const MatrixFree<dim, Number> &data_in)
: data(data_in)
void
test()
{
- typedef double number;
+ using number = double;
Triangulation<dim> tria;
GridGenerator::hyper_cube(tria);
tria.refine_global(1);
class MatrixFreeTest
{
public:
- typedef std::vector<Vector<Number>> VectorType;
+ using VectorType = std::vector<Vector<Number>>;
MatrixFreeTest(const MatrixFree<dim, Number> &data_in)
: data(data_in)
void
test()
{
- typedef double number;
+ using number = double;
Triangulation<dim> tria;
GridGenerator::hyper_cube(tria);
tria.refine_global(1);
void
test()
{
- typedef double number;
+ using number = double;
const SphericalManifold<dim> manifold;
Triangulation<dim> tria;
GridGenerator::hyper_ball(tria);
void
test()
{
- typedef double number;
+ using number = double;
const SphericalManifold<dim> manifold;
Triangulation<dim> tria;
GridGenerator::hyper_ball(tria);
void
test()
{
- typedef double number;
+ using number = double;
const SphericalManifold<dim> manifold;
Triangulation<dim> tria;
GridGenerator::hyper_ball(tria);
class MatrixFreeTest
{
public:
- typedef Vector<Number> VectorType;
+ using VectorType = Vector<Number>;
MatrixFreeTest(const MatrixFree<dim, Number> &data_in)
: data(data_in){};
class MatrixFreeTest
{
public:
- typedef Vector<Number> VectorType;
+ using VectorType = Vector<Number>;
MatrixFreeTest(const MatrixFree<dim, Number> &data_in)
: data(data_in){};
class MatrixFreeTest
{
public:
- typedef std::vector<Vector<Number> *> VectorType;
+ using VectorType = std::vector<Vector<Number> *>;
MatrixFreeTest(const MatrixFree<dim, Number> &data_in)
: data(data_in)
void
test()
{
- typedef double number;
+ using number = double;
const SphericalManifold<dim> manifold;
Triangulation<dim> tria;
GridGenerator::hyper_ball(tria);
class MatrixFreeTest
{
public:
- typedef std::vector<Vector<Number>> VectorType;
+ using VectorType = std::vector<Vector<Number>>;
MatrixFreeTest(const MatrixFree<dim, Number> &data_in)
: data(data_in)
class MatrixFreeTest
{
public:
- typedef std::vector<Vector<Number>> VectorType;
+ using VectorType = std::vector<Vector<Number>>;
MatrixFreeTest(const MatrixFree<dim, Number> &data_in)
: data(data_in)
void
test()
{
- typedef double number;
+ using number = double;
parallel::distributed::Triangulation<dim> tria(MPI_COMM_WORLD);
GridGenerator::hyper_cube(tria);
void
test()
{
- typedef double number;
- F<dim> function(3, 1);
+ using number = double;
+ F<dim> function(3, 1);
parallel::distributed::Triangulation<dim> tria(MPI_COMM_WORLD);
GridGenerator::hyper_cube(tria);
void
test()
{
- typedef double number;
+ using number = double;
parallel::distributed::Triangulation<dim> tria(MPI_COMM_WORLD);
GridGenerator::hyper_cube(tria);
void
test()
{
- typedef double number;
+ using number = double;
parallel::distributed::Triangulation<dim> tria(MPI_COMM_WORLD);
GridGenerator::hyper_cube(tria);
void
test()
{
- typedef double number;
+ using number = double;
parallel::distributed::Triangulation<dim> tria(MPI_COMM_WORLD);
GridGenerator::hyper_cube(tria);
void
test()
{
- typedef double number;
+ using number = double;
parallel::distributed::Triangulation<dim> tria(MPI_COMM_WORLD);
GridGenerator::hyper_cube(tria);
void
test()
{
- typedef double number;
+ using number = double;
parallel::distributed::Triangulation<dim> tria(MPI_COMM_WORLD);
GridGenerator::hyper_cube(tria);
void
test()
{
- typedef double number;
+ using number = double;
parallel::distributed::Triangulation<dim> tria(MPI_COMM_WORLD);
GridGenerator::hyper_cube(tria);
void
test()
{
- typedef double number;
+ using number = double;
parallel::distributed::Triangulation<dim> tria(MPI_COMM_WORLD);
GridGenerator::hyper_cube(tria);
class MatrixFreeTest
{
public:
- typedef VectorizedArray<Number> vector_t;
- static const std::size_t n_vectors = VectorizedArray<Number>::size();
+ using vector_t = VectorizedArray<Number>;
+ static const std::size_t n_vectors = VectorizedArray<Number>::size();
MatrixFreeTest(const MatrixFree<dim, Number> &data_in)
: data(data_in){};
void
test()
{
- typedef double number;
+ using number = double;
parallel::distributed::Triangulation<dim> tria(MPI_COMM_WORLD);
GridGenerator::hyper_cube(tria);
class MatrixFreeTest
{
public:
- typedef VectorizedArray<Number> vector_t;
- static const std::size_t n_vectors = VectorizedArray<Number>::size();
+ using vector_t = VectorizedArray<Number>;
+ static const std::size_t n_vectors = VectorizedArray<Number>::size();
MatrixFreeTest(const MatrixFree<dim, Number> &data_in)
: data(data_in){};
void
test()
{
- typedef double number;
+ using number = double;
parallel::distributed::Triangulation<dim> tria(MPI_COMM_WORLD);
GridGenerator::hyper_cube(tria);
void
test()
{
- typedef double number;
+ using number = double;
parallel::shared::Triangulation<dim> tria(
MPI_COMM_WORLD,
class MatrixFreeTest
{
public:
- typedef VectorizedArray<Number> vector_t;
- static const std::size_t n_vectors = VectorizedArray<Number>::size();
+ using vector_t = VectorizedArray<Number>;
+ static const std::size_t n_vectors = VectorizedArray<Number>::size();
MatrixFreeTest(const MatrixFree<dim, Number> &data_in)
: data(data_in){};
void
test()
{
- typedef double number;
+ using number = double;
Triangulation<dim> tria;
GridGenerator::hyper_cube(tria);
class MatrixFreeTest
{
public:
- typedef VectorizedArray<Number> vector_t;
- static const std::size_t n_vectors = VectorizedArray<Number>::size();
+ using vector_t = VectorizedArray<Number>;
+ static const std::size_t n_vectors = VectorizedArray<Number>::size();
MatrixFreeTest(const MatrixFree<dim, Number> &data_in)
: data(data_in){};
void
test()
{
- typedef double number;
+ using number = double;
Triangulation<dim> tria;
GridGenerator::hyper_cube(tria);
class MatrixFreeTest
{
public:
- typedef VectorizedArray<Number> vector_t;
- static const std::size_t n_vectors = VectorizedArray<Number>::size();
+ using vector_t = VectorizedArray<Number>;
+ static const std::size_t n_vectors = VectorizedArray<Number>::size();
MatrixFreeTest(const MatrixFree<dim, Number> &data_in)
: data(data_in){};
void
test()
{
- typedef double number;
+ using number = double;
parallel::distributed::Triangulation<dim> tria(MPI_COMM_WORLD);
GridGenerator::hyper_cube(tria);
class MatrixFreeTest
{
public:
- typedef VectorizedArray<Number> vector_t;
- static const std::size_t n_vectors = VectorizedArray<Number>::size();
+ using vector_t = VectorizedArray<Number>;
+ static const std::size_t n_vectors = VectorizedArray<Number>::size();
MatrixFreeTest(const MatrixFree<dim, Number> &data_in)
: data(data_in){};
void
test()
{
- typedef double number;
+ using number = double;
parallel::distributed::Triangulation<dim> tria(MPI_COMM_WORLD);
GridGenerator::hyper_cube(tria);
class MatrixFreeVariant
{
public:
- typedef VectorizedArray<Number> vector_t;
+ using vector_t = VectorizedArray<Number>;
MatrixFreeVariant(const MatrixFree<dim, Number> &data_in)
: data(data_in)
void
test()
{
- typedef double number;
+ using number = double;
parallel::distributed::Triangulation<dim> tria(MPI_COMM_WORLD);
GridGenerator::hyper_cube(tria);
class MatrixFreeTest
{
public:
- typedef typename DoFHandler<dim>::active_cell_iterator CellIterator;
- typedef double Number;
+ using CellIterator = typename DoFHandler<dim>::active_cell_iterator;
+ using Number = double;
MatrixFreeTest(const MatrixFree<dim, Number> &data_in)
: data(data_in){};
const VectorType & src,
const std::pair<unsigned int, unsigned int> &cell_range) const
{
- typedef VectorizedArray<Number> vector_t;
+ using vector_t = VectorizedArray<Number>;
FEEvaluation<dim, degree, degree + 1, dim, Number> phi(data);
vector_t coeff = make_vectorized_array(global_coefficient);
class MatrixFreeTest
{
public:
- typedef typename DoFHandler<dim>::active_cell_iterator CellIterator;
- typedef double Number;
+ using CellIterator = typename DoFHandler<dim>::active_cell_iterator;
+ using Number = double;
MatrixFreeTest(const MatrixFree<dim, Number> &data_in)
: data(data_in){};
const VectorType & src,
const std::pair<unsigned int, unsigned int> &cell_range) const
{
- typedef VectorizedArray<Number> vector_t;
+ using vector_t = VectorizedArray<Number>;
FEEvaluation<dim, degree, degree + 1, dim, Number> phi(data);
vector_t coeff = make_vectorized_array(global_coefficient);
system_matrix.vmult(solution, system_rhs);
- typedef std::vector<Vector<double>> VectorType;
+ using VectorType = std::vector<Vector<double>>;
MatrixFreeTest<dim, fe_degree, VectorType> mf(mf_data);
mf.vmult(vec2, vec1);
number,
VectorizedArrayType>
fe_eval_neighbor(data, false);
- typedef
+ using value_type =
typename FEFaceEvaluation<dim,
fe_degree,
n_q_points_1d,
n_components,
number,
- VectorizedArrayType>::value_type value_type;
+ VectorizedArrayType>::value_type;
const int actual_degree = data.get_dof_handler().get_fe().degree;
for (unsigned int face = face_range.first; face < face_range.second; face++)
number,
VectorizedArrayType>
fe_eval(data, true);
- typedef
+ using value_type =
typename FEFaceEvaluation<dim,
fe_degree,
n_q_points_1d,
n_components,
number,
- VectorizedArrayType>::value_type value_type;
+ VectorizedArrayType>::value_type;
const int actual_degree = data.get_dof_handler().get_fe().degree;
for (unsigned int face = face_range.first; face < face_range.second; face++)
{
number,
VectorizedArrayType>
fe_eval_neighbor(data, false, 0, 0, start_vector_component);
- typedef
+ using value_type =
typename FEFaceEvaluation<dim,
fe_degree,
n_q_points_1d,
n_components,
number,
- VectorizedArrayType>::value_type value_type;
+ VectorizedArrayType>::value_type;
const int actual_degree = data.get_dof_handler().get_fe().degree;
for (unsigned int face = face_range.first; face < face_range.second; face++)
number,
VectorizedArrayType>
fe_eval(data, true, 0, 0, start_vector_component);
- typedef
+ using value_type =
typename FEFaceEvaluation<dim,
fe_degree,
n_q_points_1d,
n_components,
number,
- VectorizedArrayType>::value_type value_type;
+ VectorizedArrayType>::value_type;
const int actual_degree = data.get_dof_handler().get_fe().degree;
for (unsigned int face = face_range.first; face < face_range.second; face++)
{
number,
VectorizedArrayType>
phi_p(data, false, 0, 0, start_vector_component);
- typedef
+ using value_type =
typename FEFaceEvaluation<dim,
fe_degree,
n_q_points_1d,
n_components,
number,
- VectorizedArrayType>::value_type value_type;
+ VectorizedArrayType>::value_type;
for (unsigned int face = face_range.first; face < face_range.second; face++)
{
number,
VectorizedArrayType>
fe_eval(data, true, 0, 0, start_vector_component);
- typedef
+ using value_type =
typename FEFaceEvaluation<dim,
fe_degree,
n_q_points_1d,
n_components,
number,
- VectorizedArrayType>::value_type value_type;
- value_type u_plus;
+ VectorizedArrayType>::value_type;
+ value_type u_plus;
u_plus = make_vectorized_array<number, VectorizedArrayType::size()>(1.3);
for (unsigned int face = face_range.first; face < face_range.second; face++)
if (fe_degree > 1)
return;
- typedef double number;
+ using number = double;
const SphericalManifold<dim> manifold;
Triangulation<dim> tria;
GridGenerator::hyper_ball(tria);
if (fe_degree > 1)
return;
- typedef double number;
+ using number = double;
const SphericalManifold<dim> manifold;
Triangulation<dim> tria;
GridGenerator::hyper_ball(tria);
if (fe_degree > 1)
return;
- typedef double number;
+ using number = double;
const SphericalManifold<dim> manifold;
parallel::distributed::Triangulation<dim> tria(MPI_COMM_WORLD);
GridGenerator::hyper_ball(tria);
void
test()
{
- typedef double number;
+ using number = double;
Triangulation<dim> tria;
GridGenerator::hyper_cube(tria);
const VectorType & src,
const std::pair<unsigned int, unsigned int> &cell_range)
{
- typedef typename VectorType::value_type Number;
+ using Number = typename VectorType::value_type;
FEEvaluation<dim, fe_degree, n_q_points_1d, 1, Number> fe_eval(data);
const unsigned int n_q_points = fe_eval.n_q_points;
const unsigned int active_fe_index,
const unsigned int active_quad_index)
{
- typedef typename VectorType::value_type Number;
- FEEvaluation<dim, -1, 0, 1, Number> fe_eval(
+ using Number = typename VectorType::value_type;
+ FEEvaluation<dim, -1, 0, 1, Number> fe_eval(
data, 0, 0, 0, active_fe_index, active_quad_index);
const unsigned int n_q_points = fe_eval.n_q_points;
class MatrixFreeTest
{
public:
- typedef VectorizedArray<Number> vector_t;
+ using vector_t = VectorizedArray<Number>;
MatrixFreeTest(const MatrixFree<dim, Number> &data_in)
: data(data_in)
system_matrix.reinit(sparsity);
// setup MG levels
- const unsigned int nlevels = tria.n_levels();
- typedef MatrixFree<dim> MatrixFreeTestType;
+ const unsigned int nlevels = tria.n_levels();
+ using MatrixFreeTestType = MatrixFree<dim>;
MGLevelObject<MatrixFreeTestType> mg_matrices;
MGLevelObject<AffineConstraints<double>> mg_constraints;
MGLevelObject<SparsityPattern> mg_sparsities;
class MatrixFreeTest
{
public:
- typedef typename DoFHandler<dim>::active_cell_iterator CellIterator;
- typedef double Number;
+ using CellIterator = typename DoFHandler<dim>::active_cell_iterator;
+ using Number = double;
MatrixFreeTest(const MatrixFree<dim, Number> &data_in)
: data(data_in){};
const VectorType & src,
const std::pair<unsigned int, unsigned int> &cell_range) const
{
- typedef VectorizedArray<Number> vector_t;
+ using vector_t = VectorizedArray<Number>;
FEEvaluation<dim, degree_p + 1, degree_p + 2, dim, Number> velocity(data,
0);
FEEvaluation<dim, degree_p, degree_p + 2, 1, Number> pressure(data, 1);
system_matrix.vmult(solution, system_rhs);
- typedef std::vector<Vector<double>> VectorType;
+ using VectorType = std::vector<Vector<double>>;
MatrixFreeTest<dim, fe_degree, VectorType> mf(mf_data);
mf.vmult(vec2, vec1);
class MatrixFreeTest : public MatrixFreeOperators::Base<dim, BlockVectorType>
{
public:
- typedef typename BlockVectorType::value_type Number;
- typedef typename MatrixFreeOperators::Base<dim, BlockVectorType> Base;
+ using Number = typename BlockVectorType::value_type;
+ using Base = typename MatrixFreeOperators::Base<dim, BlockVectorType>;
void
compute_diagonal()
const BlockVectorType & src,
const std::pair<unsigned int, unsigned int> &cell_range) const
{
- typedef VectorizedArray<Number> vector_t;
+ using vector_t = VectorizedArray<Number>;
FEEvaluation<dim, degree_p + 1, degree_p + 2, dim, Number> velocity(data,
0);
FEEvaluation<dim, degree_p, degree_p + 2, 1, Number> pressure(data, 1);
class MatrixFreeTest
{
public:
- typedef typename DoFHandler<dim>::active_cell_iterator CellIterator;
- typedef double Number;
+ using CellIterator = typename DoFHandler<dim>::active_cell_iterator;
+ using Number = double;
MatrixFreeTest(const MatrixFree<dim, Number> &data_in)
: data(data_in)
const VectorType & src,
const std::pair<unsigned int, unsigned int> &cell_range) const
{
- typedef VectorizedArray<Number> vector_t;
+ using vector_t = VectorizedArray<Number>;
FEEvaluation<dim, degree_p + 1, degree_p + 2, dim, Number> velocity(data,
0,
0,
class MatrixFreeTest
{
public:
- typedef typename DoFHandler<dim>::active_cell_iterator CellIterator;
- typedef double Number;
+ using CellIterator = typename DoFHandler<dim>::active_cell_iterator;
+ using Number = double;
MatrixFreeTest(const MatrixFree<dim, Number> &data_in)
: data(data_in){};
const VectorType & src,
const std::pair<unsigned int, unsigned int> &cell_range) const
{
- typedef VectorizedArray<Number> vector_t;
+ using vector_t = VectorizedArray<Number>;
FEEvaluation<dim, degree_p + 1, degree_p + 2, dim, Number> velocity(data,
0);
FEEvaluation<dim, degree_p, degree_p + 2, 1, Number> pressure(data, 1);
class MatrixFreeTest
{
public:
- typedef typename DoFHandler<dim>::active_cell_iterator CellIterator;
- typedef double Number;
+ using CellIterator = typename DoFHandler<dim>::active_cell_iterator;
+ using Number = double;
MatrixFreeTest(const MatrixFree<dim, Number> &data_in)
: data(data_in){};
const VectorType & src,
const std::pair<unsigned int, unsigned int> &cell_range) const
{
- typedef VectorizedArray<Number> vector_t;
+ using vector_t = VectorizedArray<Number>;
FEEvaluation<dim, -1, 0, dim, Number> velocity(data, 0);
FEEvaluation<dim, -1, 0, 1, Number> pressure(data, 1);
class MatrixFreeTest
{
public:
- typedef typename DoFHandler<dim>::active_cell_iterator CellIterator;
- typedef double Number;
+ using CellIterator = typename DoFHandler<dim>::active_cell_iterator;
+ using Number = double;
MatrixFreeTest(const MatrixFree<dim, Number> &data_in)
: data(data_in){};
const VectorType & src,
const std::pair<unsigned int, unsigned int> &cell_range) const
{
- typedef VectorizedArray<Number> vector_t;
+ using vector_t = VectorizedArray<Number>;
FEEvaluation<dim, degree_p + 1, degree_p + 2, dim, Number> velocity(data,
0,
0,
class MatrixFreeTest
{
public:
- typedef typename DoFHandler<dim>::active_cell_iterator CellIterator;
- typedef double Number;
+ using CellIterator = typename DoFHandler<dim>::active_cell_iterator;
+ using Number = double;
MatrixFreeTest(const MatrixFree<dim, Number> &data_in)
: data(data_in){};
const VectorType & src,
const std::pair<unsigned int, unsigned int> &cell_range) const
{
- typedef VectorizedArray<Number> vector_t;
+ using vector_t = VectorizedArray<Number>;
FEEvaluation<dim, degree_p + 1, degree_p + 2, dim, Number> velocity(data,
0);
FEEvaluation<dim, degree_p, degree_p + 2, 1, Number> pressure(data, 1);
system_matrix.vmult(solution, system_rhs);
- typedef std::vector<Vector<double>> VectorType;
+ using VectorType = std::vector<Vector<double>>;
MatrixFreeTest<dim, fe_degree, VectorType> mf(mf_data);
mf.vmult(vec2, vec1);
class MatrixFreeTest
{
public:
- typedef typename DoFHandler<dim>::active_cell_iterator CellIterator;
- typedef double Number;
+ using CellIterator = typename DoFHandler<dim>::active_cell_iterator;
+ using Number = double;
MatrixFreeTest(const MatrixFree<dim, Number> &data_in)
: data(data_in){};
const VectorType & src,
const std::pair<unsigned int, unsigned int> &cell_range) const
{
- typedef VectorizedArray<Number> vector_t;
+ using vector_t = VectorizedArray<Number>;
FEEvaluation<dim, -1, 0, dim, Number> velocity(data, 0);
FEEvaluation<dim, -1, 0, 1, Number> pressure(data, 1);
system_matrix.vmult(solution, system_rhs);
- typedef std::vector<Vector<double>> VectorType;
- MatrixFreeTest<dim, VectorType> mf(mf_data);
+ using VectorType = std::vector<Vector<double>>;
+ MatrixFreeTest<dim, VectorType> mf(mf_data);
mf.vmult(vec2, vec1);
// Verification
class LaplaceOperator : public Subscriptor
{
public:
- typedef number value_type;
+ using value_type = number;
LaplaceOperator(){};
in = 1.;
// set up multigrid in analogy to step-37
- typedef LaplaceOperator<dim, number> LevelMatrixType;
+ using LevelMatrixType = LaplaceOperator<dim, number>;
MGLevelObject<LevelMatrixType> mg_matrices;
mg_matrices.resize(0, dof.get_triangulation().n_global_levels() - 1);
MGCoarseIterative<LevelMatrixType, number> mg_coarse;
mg_coarse.initialize(mg_matrices[0]);
- typedef PreconditionChebyshev<LevelMatrixType,
- LinearAlgebra::distributed::Vector<number>>
- SMOOTHER;
+ using SMOOTHER =
+ PreconditionChebyshev<LevelMatrixType,
+ LinearAlgebra::distributed::Vector<number>>;
MGSmootherPrecondition<LevelMatrixType,
SMOOTHER,
LinearAlgebra::distributed::Vector<number>>
class LaplaceOperator : public Subscriptor
{
public:
- typedef number value_type;
+ using value_type = number;
LaplaceOperator(){};
in = 1.;
// set up multigrid in analogy to step-37
- typedef LaplaceOperator<dim, number> LevelMatrixType;
+ using LevelMatrixType = LaplaceOperator<dim, number>;
MGLevelObject<LevelMatrixType> mg_matrices;
mg_matrices.resize(0, dof.get_triangulation().n_global_levels() - 1);
MGCoarseIterative<LevelMatrixType, number> mg_coarse;
mg_coarse.initialize(mg_matrices[0]);
- typedef PreconditionChebyshev<LevelMatrixType,
- LinearAlgebra::distributed::Vector<number>>
- SMOOTHER;
+ using SMOOTHER =
+ PreconditionChebyshev<LevelMatrixType,
+ LinearAlgebra::distributed::Vector<number>>;
MGSmootherPrecondition<LevelMatrixType,
SMOOTHER,
LinearAlgebra::distributed::Vector<number>>
class LaplaceOperator : public Subscriptor
{
public:
- typedef number value_type;
+ using value_type = number;
LaplaceOperator(){};
in = 1.;
// set up multigrid in analogy to step-37
- typedef LaplaceOperator<dim, number> LevelMatrixType;
+ using LevelMatrixType = LaplaceOperator<dim, number>;
MGLevelObject<LevelMatrixType> mg_matrices;
mg_matrices.resize(0, dof.get_triangulation().n_global_levels() - 1);
MGCoarseIterative<LevelMatrixType, number> mg_coarse;
mg_coarse.initialize(mg_matrices[0]);
- typedef PreconditionChebyshev<LevelMatrixType,
- LinearAlgebra::distributed::Vector<number>>
- SMOOTHER;
+ using SMOOTHER =
+ PreconditionChebyshev<LevelMatrixType,
+ LinearAlgebra::distributed::Vector<number>>;
MGSmootherPrecondition<LevelMatrixType,
SMOOTHER,
LinearAlgebra::distributed::Vector<number>>
in = 1.;
// set up multigrid in analogy to step-37
- typedef LaplaceOperator<dim, fe_degree, n_q_points_1d, number>
- LevelMatrixType;
+ using LevelMatrixType =
+ LaplaceOperator<dim, fe_degree, n_q_points_1d, number>;
MGLevelObject<LevelMatrixType> mg_matrices;
mg_matrices.resize(0, dof.get_triangulation().n_global_levels() - 1);
MGCoarseIterative<LevelMatrixType, number> mg_coarse;
mg_coarse.initialize(mg_matrices[0]);
- typedef PreconditionChebyshev<LevelMatrixType,
- LinearAlgebra::distributed::Vector<number>>
- SMOOTHER;
+ using SMOOTHER =
+ PreconditionChebyshev<LevelMatrixType,
+ LinearAlgebra::distributed::Vector<number>>;
MGSmootherPrecondition<LevelMatrixType,
SMOOTHER,
LinearAlgebra::distributed::Vector<number>>
in = 1.;
// set up multigrid in analogy to step-37
- typedef LaplaceOperator<dim,
- fe_degree,
- n_q_points_1d,
- 1,
- LinearAlgebra::distributed::Vector<number>>
- LevelMatrixType;
+ using LevelMatrixType =
+ LaplaceOperator<dim,
+ fe_degree,
+ n_q_points_1d,
+ 1,
+ LinearAlgebra::distributed::Vector<number>>;
MGLevelObject<LevelMatrixType> mg_matrices;
MGLevelObject<MatrixFree<dim, number>> mg_level_data;
MGCoarseIterative<LevelMatrixType, number> mg_coarse;
mg_coarse.initialize(mg_matrices[0]);
- typedef PreconditionChebyshev<LevelMatrixType,
- LinearAlgebra::distributed::Vector<number>>
- SMOOTHER;
+ using SMOOTHER =
+ PreconditionChebyshev<LevelMatrixType,
+ LinearAlgebra::distributed::Vector<number>>;
MGSmootherPrecondition<LevelMatrixType,
SMOOTHER,
LinearAlgebra::distributed::Vector<number>>
in.local_element(i) = 1.;
// set up multigrid in analogy to step-37
- typedef LaplaceOperator<dim, fe_degree, n_q_points_1d, number>
- LevelMatrixType;
+ using LevelMatrixType =
+ LaplaceOperator<dim, fe_degree, n_q_points_1d, number>;
MGLevelObject<LevelMatrixType> mg_matrices;
mg_matrices.resize(0, dof.get_triangulation().n_global_levels() - 1);
MGCoarseIterative<LevelMatrixType, number> mg_coarse;
mg_coarse.initialize(mg_matrices[0]);
- typedef PreconditionChebyshev<LevelMatrixType,
- LinearAlgebra::distributed::Vector<number>>
- SMOOTHER;
+ using SMOOTHER =
+ PreconditionChebyshev<LevelMatrixType,
+ LinearAlgebra::distributed::Vector<number>>;
MGSmootherPrecondition<LevelMatrixType,
SMOOTHER,
LinearAlgebra::distributed::Vector<number>>
}
// set up multigrid in analogy to step-37
- typedef LaplaceOperator<dim,
- fe_degree,
- n_q_points_1d,
- 1,
- LinearAlgebra::distributed::Vector<number>>
- LevelMatrixType;
+ using LevelMatrixType =
+ LaplaceOperator<dim,
+ fe_degree,
+ n_q_points_1d,
+ 1,
+ LinearAlgebra::distributed::Vector<number>>;
MGLevelObject<LevelMatrixType> mg_matrices;
MGLevelObject<MatrixFree<dim, number>> mg_level_data;
MGCoarseIterative<LevelMatrixType, number> mg_coarse;
mg_coarse.initialize(mg_matrices[0]);
- typedef PreconditionChebyshev<LevelMatrixType,
- LinearAlgebra::distributed::Vector<number>>
- SMOOTHER;
+ using SMOOTHER =
+ PreconditionChebyshev<LevelMatrixType,
+ LinearAlgebra::distributed::Vector<number>>;
MGSmootherPrecondition<LevelMatrixType,
SMOOTHER,
LinearAlgebra::distributed::Vector<number>>
class LaplaceOperator : public Subscriptor
{
public:
- typedef number value_type;
+ using value_type = number;
LaplaceOperator(){};
in.local_element(i) = 1.;
// set up multigrid in analogy to step-37
- typedef LaplaceOperator<dim, fe_degree, n_q_points_1d, number>
- LevelMatrixType;
+ using LevelMatrixType =
+ LaplaceOperator<dim, fe_degree, n_q_points_1d, number>;
MGLevelObject<LevelMatrixType> mg_matrices;
mg_matrices.resize(0, dof.get_triangulation().n_global_levels() - 1);
MGCoarseIterative<LevelMatrixType, number> mg_coarse;
mg_coarse.initialize(mg_matrices[0]);
- typedef PreconditionChebyshev<LevelMatrixType,
- LinearAlgebra::distributed::Vector<number>>
- SMOOTHER;
+ using SMOOTHER =
+ PreconditionChebyshev<LevelMatrixType,
+ LinearAlgebra::distributed::Vector<number>>;
MGSmootherPrecondition<LevelMatrixType,
SMOOTHER,
LinearAlgebra::distributed::Vector<number>>
}
// set up multigrid in analogy to step-37
- typedef LaplaceOperator<dim,
- fe_degree,
- n_q_points_1d,
- 1,
- LinearAlgebra::distributed::Vector<number>>
- LevelMatrixType;
+ using LevelMatrixType =
+ LaplaceOperator<dim,
+ fe_degree,
+ n_q_points_1d,
+ 1,
+ LinearAlgebra::distributed::Vector<number>>;
MGLevelObject<LevelMatrixType> mg_matrices;
MGLevelObject<MatrixFree<dim, number>> mg_level_data;
MGCoarseIterative<LevelMatrixType, number> mg_coarse;
mg_coarse.initialize(mg_matrices[0]);
- typedef PreconditionChebyshev<LevelMatrixType,
- LinearAlgebra::distributed::Vector<number>>
- SMOOTHER;
+ using SMOOTHER =
+ PreconditionChebyshev<LevelMatrixType,
+ LinearAlgebra::distributed::Vector<number>>;
mg::SmootherRelaxation<SMOOTHER, LinearAlgebra::distributed::Vector<number>>
mg_smoother;
class LaplaceOperator : public Subscriptor
{
public:
- typedef number value_type;
+ using value_type = number;
LaplaceOperator(){};
in.local_element(i) = 1.;
// set up multigrid in analogy to step-37
- typedef LaplaceOperator<dim, fe_degree, n_q_points_1d, number>
- LevelMatrixType;
+ using LevelMatrixType =
+ LaplaceOperator<dim, fe_degree, n_q_points_1d, number>;
MGLevelObject<LevelMatrixType> mg_matrices;
mg_matrices.resize(0, dof.get_triangulation().n_global_levels() - 1);
MGCoarseIterative<LevelMatrixType, number> mg_coarse;
mg_coarse.initialize(mg_matrices[0]);
- typedef PreconditionChebyshev<LevelMatrixType,
- LinearAlgebra::distributed::Vector<number>>
- SMOOTHER;
+ using SMOOTHER =
+ PreconditionChebyshev<LevelMatrixType,
+ LinearAlgebra::distributed::Vector<number>>;
MGSmootherPrecondition<LevelMatrixType,
SMOOTHER,
LinearAlgebra::distributed::Vector<number>>
class BlockLaplace : public Subscriptor
{
public:
- typedef typename BlockVectorType::value_type value_type;
- typedef typename BlockVectorType::size_type size_type;
+ using value_type = typename BlockVectorType::value_type;
+ using size_type = typename BlockVectorType::size_type;
BlockLaplace()
: Subscriptor()
}
// set up multigrid in analogy to step-37
- typedef BlockLaplace<dim,
- fe_degree,
- n_q_points_1d,
- LinearAlgebra::distributed::BlockVector<number>>
- LevelMatrixType;
+ using LevelMatrixType =
+ BlockLaplace<dim,
+ fe_degree,
+ n_q_points_1d,
+ LinearAlgebra::distributed::BlockVector<number>>;
MGLevelObject<LevelMatrixType> mg_matrices;
MGLevelObject<MatrixFree<dim, number>> mg_level_data;
MGCoarseIterative<LevelMatrixType, number> mg_coarse;
mg_coarse.initialize(mg_matrices[0]);
- typedef PreconditionJacobi<LevelMatrixType> SMOOTHER;
+ using SMOOTHER = PreconditionJacobi<LevelMatrixType>;
MGSmootherPrecondition<LevelMatrixType,
SMOOTHER,
LinearAlgebra::distributed::BlockVector<number>>
}
// set up multigrid in analogy to step-37
- typedef LaplaceOperator<dim,
- fe_degree,
- n_q_points_1d,
- 1,
- LinearAlgebra::distributed::Vector<number>>
- LevelMatrixType;
+ using LevelMatrixType =
+ LaplaceOperator<dim,
+ fe_degree,
+ n_q_points_1d,
+ 1,
+ LinearAlgebra::distributed::Vector<number>>;
MGLevelObject<LevelMatrixType> mg_matrices;
MGLevelObject<MatrixFree<dim, number>> mg_level_data;
MGCoarseIterative<LevelMatrixType, number> mg_coarse;
mg_coarse.initialize(mg_matrices[0]);
- typedef PreconditionJacobi<LevelMatrixType> SMOOTHER;
+ using SMOOTHER = PreconditionJacobi<LevelMatrixType>;
MGSmootherPrecondition<LevelMatrixType,
SMOOTHER,
LinearAlgebra::distributed::Vector<double>>
class BlockLaplace : public Subscriptor
{
public:
- typedef typename BlockVectorType::value_type value_type;
- typedef typename BlockVectorType::size_type size_type;
+ using value_type = typename BlockVectorType::value_type;
+ using size_type = typename BlockVectorType::size_type;
BlockLaplace()
: Subscriptor()
}
// set up multigrid in analogy to step-37
- typedef BlockLaplace<dim,
- fe_degree_1,
- fe_degree_2,
- n_q_points_1d,
- LinearAlgebra::distributed::BlockVector<number>>
- LevelMatrixType;
+ using LevelMatrixType =
+ BlockLaplace<dim,
+ fe_degree_1,
+ fe_degree_2,
+ n_q_points_1d,
+ LinearAlgebra::distributed::BlockVector<number>>;
MGLevelObject<LevelMatrixType> mg_matrices;
MGLevelObject<MatrixFree<dim, number>> mg_level_data;
MGCoarseIterative<LevelMatrixType, number> mg_coarse;
mg_coarse.initialize(mg_matrices[0]);
- typedef PreconditionJacobi<LevelMatrixType> SMOOTHER;
+ using SMOOTHER = PreconditionJacobi<LevelMatrixType>;
MGSmootherPrecondition<LevelMatrixType,
SMOOTHER,
LinearAlgebra::distributed::BlockVector<number>>
MGCoarseIterative<LevelMatrixType, number> mg_coarse;
mg_coarse.initialize(mg_matrices[0]);
- typedef PreconditionChebyshev<LevelMatrixType,
- LinearAlgebra::distributed::Vector<number>>
- SMOOTHER;
+ using SMOOTHER =
+ PreconditionChebyshev<LevelMatrixType,
+ LinearAlgebra::distributed::Vector<number>>;
MGSmootherPrecondition<LevelMatrixType,
SMOOTHER,
LinearAlgebra::distributed::Vector<number>>
class LaplaceOperator : public Subscriptor
{
public:
- typedef number value_type;
+ using value_type = number;
LaplaceOperator(){};
in = 1.;
// set up multigrid in analogy to step-37
- typedef LaplaceOperator<dim, fe_degree, n_q_points_1d, number>
- LevelMatrixType;
+ using LevelMatrixType =
+ LaplaceOperator<dim, fe_degree, n_q_points_1d, number>;
MGLevelObject<LevelMatrixType> mg_matrices;
mg_matrices.resize(0, dof.get_triangulation().n_global_levels() - 1);
MGCoarseIterative<LevelMatrixType, number> mg_coarse;
mg_coarse.initialize(mg_matrices[0]);
- typedef PreconditionChebyshev<LevelMatrixType,
- LinearAlgebra::distributed::Vector<number>>
- SMOOTHER;
+ using SMOOTHER =
+ PreconditionChebyshev<LevelMatrixType,
+ LinearAlgebra::distributed::Vector<number>>;
MGSmootherPrecondition<LevelMatrixType,
SMOOTHER,
LinearAlgebra::distributed::Vector<number>>
class LaplaceOperator : public Subscriptor
{
public:
- typedef number value_type;
+ using value_type = number;
LaplaceOperator(){};
in = 1.;
// set up multigrid in analogy to step-37
- typedef LaplaceOperator<dim, fe_degree, n_q_points_1d, number>
- LevelMatrixType;
+ using LevelMatrixType =
+ LaplaceOperator<dim, fe_degree, n_q_points_1d, number>;
MGLevelObject<LevelMatrixType> mg_matrices;
mg_matrices.resize(0, dof.get_triangulation().n_global_levels() - 1);
MGCoarseIterative<LevelMatrixType, number> mg_coarse;
mg_coarse.initialize(mg_matrices[0]);
- typedef PreconditionChebyshev<LevelMatrixType,
- LinearAlgebra::distributed::Vector<number>>
- SMOOTHER;
+ using SMOOTHER =
+ PreconditionChebyshev<LevelMatrixType,
+ LinearAlgebra::distributed::Vector<number>>;
MGSmootherPrecondition<LevelMatrixType,
SMOOTHER,
LinearAlgebra::distributed::Vector<number>>
mg_constrained_dofs.initialize(dof);
mg_constrained_dofs.make_zero_boundary_constraints(dof, {0});
- typedef MatrixFreeOperators::LaplaceOperator<
+ using LevelMatrixType = MatrixFreeOperators::LaplaceOperator<
dim,
fe_degree,
n_q_points_1d,
1,
- LinearAlgebra::distributed::Vector<number>>
- LevelMatrixType;
+ LinearAlgebra::distributed::Vector<number>>;
MGLevelObject<LevelMatrixType> mg_matrices;
MGLevelObject<std::shared_ptr<MatrixFree<dim, number>>> mg_level_data;
MGCoarseIterative<LevelMatrixType, number> mg_coarse;
mg_coarse.initialize(mg_matrices[0]);
- typedef PreconditionChebyshev<LevelMatrixType,
- LinearAlgebra::distributed::Vector<number>>
- SMOOTHER;
+ using SMOOTHER =
+ PreconditionChebyshev<LevelMatrixType,
+ LinearAlgebra::distributed::Vector<number>>;
MGSmootherPrecondition<LevelMatrixType,
SMOOTHER,
LinearAlgebra::distributed::Vector<number>>
void
test()
{
- typedef double number;
+ using number = double;
const SphericalManifold<dim> manifold;
Triangulation<dim> tria;
GridGenerator::hyper_ball(tria);
mf_data.get_quadrature(),
update_quadrature_points);
- typedef VectorizedArray<double> vector_t;
+ using vector_t = VectorizedArray<double>;
for (unsigned int cell = 0; cell < n_cells; ++cell)
{
fe_eval.reinit(cell);
void
output_results(const unsigned int cycle) const;
- typedef LaplaceOperator<dim, degree_finite_element, double>
- SystemMatrixType;
- typedef LaplaceOperator<dim, degree_finite_element, float> LevelMatrixType;
+ using SystemMatrixType =
+ LaplaceOperator<dim, degree_finite_element, double>;
+ using LevelMatrixType = LaplaceOperator<dim, degree_finite_element, float>;
Triangulation<dim> triangulation;
FE_Q<dim> fe;
MGCoarseGridHouseholder<float, Vector<double>> mg_coarse;
mg_coarse.initialize(coarse_matrix);
- typedef PreconditionChebyshev<LevelMatrixType, Vector<double>> SMOOTHER;
+ using SMOOTHER = PreconditionChebyshev<LevelMatrixType, Vector<double>>;
MGSmootherPrecondition<LevelMatrixType, SMOOTHER, Vector<double>>
mg_smoother;
const LinearAlgebra::distributed::BlockVector<number> &src,
const std::pair<unsigned int, unsigned int> & cell_range) const
{
- typedef VectorizedArray<number> vector_t;
+ using vector_t = VectorizedArray<number>;
FEEvaluation<dim, degree_v, degree_v + 1, dim, number> velocity(data, 0);
FEEvaluation<dim, degree_v - 1, degree_v + 1, 1, number> pressure(data, 1);
void
solve();
- typedef LinearAlgebra::distributed::Vector<double> vector_t;
- typedef LinearAlgebra::distributed::BlockVector<double> block_vector_t;
+ using vector_t = LinearAlgebra::distributed::Vector<double>;
+ using block_vector_t = LinearAlgebra::distributed::BlockVector<double>;
- typedef StokesOperator<dim, velocity_degree, double> StokesMatrixType;
- typedef MassMatrixOperator<dim, velocity_degree - 1, double> MassMatrixType;
- typedef ABlockOperator<dim, velocity_degree, double> LevelMatrixType;
+ using StokesMatrixType = StokesOperator<dim, velocity_degree, double>;
+ using MassMatrixType = MassMatrixOperator<dim, velocity_degree - 1, double>;
+ using LevelMatrixType = ABlockOperator<dim, velocity_degree, double>;
unsigned int degree_u;
false,
false);
- typedef MGTransferMatrixFree<dim, double> Transfer;
+ using Transfer = MGTransferMatrixFree<dim, double>;
Transfer mg_transfer(mg_constrained_dofs);
mg_transfer.initialize_constraints(mg_constrained_dofs);
mg_coarse;
mg_coarse.initialize(coarse_solver, coarse_matrix, coarse_prec_identity);
- typedef PreconditionChebyshev<LevelMatrixType, vector_t> SmootherType;
- mg::SmootherRelaxation<SmootherType, vector_t> mg_smoother;
- MGLevelObject<typename SmootherType::AdditionalData> smoother_data;
+ using SmootherType = PreconditionChebyshev<LevelMatrixType, vector_t>;
+ mg::SmootherRelaxation<SmootherType, vector_t> mg_smoother;
+ MGLevelObject<typename SmootherType::AdditionalData> smoother_data;
smoother_data.resize(0, triangulation.n_global_levels() - 1);
for (unsigned int level = 0; level < triangulation.n_global_levels();
++level)
mg,
mg_transfer);
- typedef PreconditionChebyshev<MassMatrixType, vector_t> MassPrec;
- MassPrec prec_S;
- typename MassPrec::AdditionalData prec_S_data;
+ using MassPrec = PreconditionChebyshev<MassMatrixType, vector_t>;
+ MassPrec prec_S;
+ typename MassPrec::AdditionalData prec_S_data;
prec_S_data.smoothing_range = 1e-3;
prec_S_data.degree = numbers::invalid_unsigned_int;
prec_S_data.eig_cg_n_iterations = mass_matrix.m();
prec_S_data.preconditioner = mass_matrix.get_matrix_diagonal_inverse();
prec_S.initialize(mass_matrix, prec_S_data);
- typedef PreconditionMG<dim, vector_t, Transfer> A_prec_type;
+ using A_prec_type = PreconditionMG<dim, vector_t, Transfer>;
// create a cheap preconditioner that consists of only a single V-cycle
const StokesSolver::BlockSchurPreconditioner<StokesMatrixType,
auto cell = tria.begin_active();
auto endc = tria.end();
- typedef decltype(cell) Iterator;
+ using Iterator = decltype(cell);
auto cell = tria.begin_active();
auto endc = tria.end();
- typedef decltype(cell) Iterator;
+ using Iterator = decltype(cell);
auto cell = tria.begin_active();
auto endc = tria.end();
- typedef decltype(cell) Iterator;
+ using Iterator = decltype(cell);
auto cell = dofh.begin_mg();
auto endc = dofh.end_mg();
- typedef decltype(cell) Iterator;
+ using Iterator = decltype(cell);
auto cell_worker = [](const Iterator &cell, ScratchData &s, CopyData &c) {
deallog << "Cell worker on : " << cell->id()
auto cell = tria.begin_active();
auto endc = tria.end();
- typedef decltype(cell) Iterator;
+ using Iterator = decltype(cell);
auto cell_worker = [](const Iterator &cell, ScratchData &s, CopyData &c) {
deallog << "Cell worker on : " << cell << " ghost? " << cell->is_ghost()
auto cell = dh.begin_active();
auto endc = dh.end();
- typedef decltype(cell) Iterator;
+ using Iterator = decltype(cell);
auto measures = std::make_tuple(0.0, 0.0, 0.0);
auto cell = dh.begin_active();
auto endc = dh.end();
- typedef decltype(cell) Iterator;
+ using Iterator = decltype(cell);
auto cell_worker =
[&rhs_function](const Iterator &cell, ScratchData &s, CopyData &c) {
auto cell = dh.begin_active();
auto endc = dh.end();
- typedef decltype(cell) Iterator;
+ using Iterator = decltype(cell);
auto cell_worker =
[&rhs_function](const Iterator &cell, ScratchData &s, CopyData &c) {
auto cell = dh.begin_active();
auto endc = dh.end();
- typedef decltype(cell) Iterator;
+ using Iterator = decltype(cell);
auto cell_integrator = [&H1_norm, &solution, &scalar](const Iterator &cell,
using namespace MeshWorker;
-typedef Sacado::Fad::DFad<double> Sdouble;
-typedef Sacado::Fad::DFad<Sdouble> SSdouble;
+using Sdouble = Sacado::Fad::DFad<double>;
+using SSdouble = Sacado::Fad::DFad<Sdouble>;
template <int dim, int spacedim>
void
auto cell = dh.begin_active();
auto endc = dh.end();
- typedef decltype(cell) Iterator;
+ using Iterator = decltype(cell);
FEValuesExtractors::Scalar scalar(0);
using namespace MeshWorker;
-typedef Sacado::Fad::DFad<double> Sdouble;
-typedef Sacado::Fad::DFad<Sdouble> SSdouble;
+using Sdouble = Sacado::Fad::DFad<double>;
+using SSdouble = Sacado::Fad::DFad<Sdouble>;
template <int dim, int spacedim>
void
auto cell = dh.begin_active();
auto endc = dh.end();
- typedef decltype(cell) Iterator;
+ using Iterator = decltype(cell);
FEValuesExtractors::Scalar scalar(0);
using namespace MeshWorker;
-typedef Sacado::Fad::DFad<double> Sdouble;
-typedef Sacado::Fad::DFad<Sdouble> SSdouble;
-typedef Sacado::Rad::ADvar<Sdouble> RSdouble;
+using Sdouble = Sacado::Fad::DFad<double>;
+using SSdouble = Sacado::Fad::DFad<Sdouble>;
+using RSdouble = Sacado::Rad::ADvar<Sdouble>;
template <int dim, int spacedim>
void
auto cell = dh.begin_active();
auto endc = dh.end();
- typedef decltype(cell) Iterator;
+ using Iterator = decltype(cell);
FEValuesExtractors::Scalar scalar(0);
auto cell = dh.begin_active();
auto endc = dh.end();
- typedef decltype(cell) Iterator;
+ using Iterator = decltype(cell);
struct CopyDataFace
{
void
LaplaceProblem<dim>::assemble_and_solve()
{
- typedef decltype(dof_handler.begin_active()) Iterator;
+ using Iterator = decltype(dof_handler.begin_active());
auto cell_worker = [](const Iterator & cell,
ScratchData<dim> &scratch_data,
FE_Q<dim> fe;
DoFHandler<dim> mg_dof_handler;
- typedef LA::MPI::SparseMatrix matrix_t;
- typedef LA::MPI::Vector vector_t;
+ using matrix_t = LA::MPI::SparseMatrix;
+ using vector_t = LA::MPI::Vector;
matrix_t system_matrix;
PreconditionIdentity>
coarse_grid_solver(coarse_solver, coarse_matrix, id);
- typedef LA::MPI::PreconditionJacobi Smoother;
+ using Smoother = LA::MPI::PreconditionJacobi;
MGSmootherPrecondition<matrix_t, Smoother, vector_t> mg_smoother;
mg_smoother.initialize(mg_matrices, Smoother::AdditionalData(0.5));
mg_smoother.set_steps(2);
class InteriorPenaltyProblem
{
public:
- typedef MeshWorker::IntegrationInfo<dim> CellInfo;
+ using CellInfo = MeshWorker::IntegrationInfo<dim>;
InteriorPenaltyProblem(const FiniteElement<dim> &fe);
class myIntegrator : public dealii::MeshWorker::LocalIntegrator<dim>
{
public:
- typedef MeshWorker::IntegrationInfo<dim> CellInfo;
+ using CellInfo = MeshWorker::IntegrationInfo<dim>;
void
cell(MeshWorker::DoFInfo<dim> &dinfo, CellInfo &info) const;
class myIntegrator : public dealii::MeshWorker::LocalIntegrator<dim>
{
public:
- typedef MeshWorker::IntegrationInfo<dim> CellInfo;
+ using CellInfo = MeshWorker::IntegrationInfo<dim>;
void
cell(MeshWorker::DoFInfo<dim> &dinfo, CellInfo &info) const;
class myIntegrator : public dealii::MeshWorker::LocalIntegrator<dim>
{
public:
- typedef MeshWorker::IntegrationInfo<dim> CellInfo;
+ using CellInfo = MeshWorker::IntegrationInfo<dim>;
void
cell(MeshWorker::DoFInfo<dim> &dinfo, CellInfo &info) const;
class myIntegrator : public dealii::MeshWorker::LocalIntegrator<dim>
{
public:
- typedef MeshWorker::IntegrationInfo<dim> CellInfo;
+ using CellInfo = MeshWorker::IntegrationInfo<dim>;
void
cell(MeshWorker::DoFInfo<dim> &dinfo, CellInfo &info) const;
class myIntegrator : public dealii::MeshWorker::LocalIntegrator<dim>
{
public:
- typedef MeshWorker::IntegrationInfo<dim> CellInfo;
+ using CellInfo = MeshWorker::IntegrationInfo<dim>;
void
cell(MeshWorker::DoFInfo<dim> &dinfo, CellInfo &info) const;
class Local : public Subscriptor
{
public:
- typedef MeshWorker::IntegrationInfo<dim> CellInfo;
+ using CellInfo = MeshWorker::IntegrationInfo<dim>;
void
cell(MeshWorker::DoFInfo<dim> &dinfo, CellInfo &info) const;
FE_Q<dim> fe;
DoFHandler<dim> mg_dof_handler;
- typedef TrilinosWrappers::SparseMatrix matrix_t;
- typedef TrilinosWrappers::MPI::Vector vector_t;
+ using matrix_t = TrilinosWrappers::SparseMatrix;
+ using vector_t = TrilinosWrappers::MPI::Vector;
matrix_t system_matrix;
PreconditionIdentity>
coarse_grid_solver(coarse_solver, coarse_matrix, id);
- typedef TrilinosWrappers::PreconditionJacobi Smoother;
+ using Smoother = TrilinosWrappers::PreconditionJacobi;
MGSmootherPrecondition<matrix_t, Smoother, vector_t> mg_smoother;
mg_smoother.initialize(mg_matrices);
mg_smoother.set_steps(2);
FE_Q<dim> fe;
DoFHandler<dim> mg_dof_handler;
- typedef TrilinosWrappers::SparseMatrix matrix_t;
- typedef TrilinosWrappers::MPI::Vector vector_t;
+ using matrix_t = TrilinosWrappers::SparseMatrix;
+ using vector_t = TrilinosWrappers::MPI::Vector;
matrix_t system_matrix;
PreconditionIdentity>
coarse_grid_solver(coarse_solver, coarse_matrix, id);
- typedef TrilinosWrappers::PreconditionJacobi Smoother;
+ using Smoother = TrilinosWrappers::PreconditionJacobi;
MGSmootherPrecondition<matrix_t, Smoother, vector_t> mg_smoother;
mg_smoother.initialize(mg_matrices);
mg_smoother.set_steps(2);
void
test(const unsigned int n_blocks = 5)
{
- typedef double number;
+ using number = double;
parallel::distributed::Triangulation<dim> tria(MPI_COMM_WORLD);
GridGenerator::hyper_cube(tria);
void
test(const unsigned int n_blocks = 5)
{
- typedef double number;
+ using number = double;
parallel::distributed::Triangulation<dim> tria(MPI_COMM_WORLD);
GridGenerator::hyper_cube(tria);
void
test(const unsigned int n_blocks = 5)
{
- typedef double number;
+ using number = double;
parallel::distributed::Triangulation<dim> tria(MPI_COMM_WORLD);
GridGenerator::hyper_cube(tria);
void
test(const unsigned int n_blocks = 5)
{
- typedef double number;
+ using number = double;
parallel::distributed::Triangulation<dim> tria(MPI_COMM_WORLD);
GridGenerator::hyper_cube(tria);
void
test(const unsigned int n_blocks = 5)
{
- typedef double number;
+ using number = double;
parallel::distributed::Triangulation<dim> tria(MPI_COMM_WORLD);
GridGenerator::hyper_cube(tria);
void
test(const unsigned int n_blocks = 5)
{
- typedef double number;
+ using number = double;
parallel::distributed::Triangulation<dim> tria(MPI_COMM_WORLD);
GridGenerator::hyper_cube(tria);
void
test(const unsigned int n_blocks = 5)
{
- typedef double number;
+ using number = double;
parallel::distributed::Triangulation<dim> tria(MPI_COMM_WORLD);
GridGenerator::hyper_cube(tria);
void
test(const unsigned int n = 5, const unsigned int m = 3)
{
- typedef double number;
+ using number = double;
parallel::distributed::Triangulation<dim> tria(MPI_COMM_WORLD);
GridGenerator::hyper_cube(tria);
template <int dim>
struct periodicity_tests
{
- typedef TriaIterator<CellAccessor<dim>> cell_iterator;
- typedef
- typename Triangulation<dim>::active_cell_iterator active_cell_iterator;
+ using cell_iterator = TriaIterator<CellAccessor<dim>>;
+ using active_cell_iterator =
+ typename Triangulation<dim>::active_cell_iterator;
periodicity_tests();
unsigned refn_cycle;
void
periodicity_tests<dim>::check_periodicity()
{
- typedef std::pair<cell_iterator, unsigned> cell_face_pair;
- typedef typename std::map<cell_face_pair, cell_face_pair>::iterator
- cell_face_map_it;
+ using cell_face_pair = std::pair<cell_iterator, unsigned>;
+ using cell_face_map_it =
+ typename std::map<cell_face_pair, cell_face_pair>::iterator;
for (int rank_i = 0; rank_i < comm_size; ++rank_i)
{
triangulation.execute_coarsening_and_refinement();
- typedef std::pair<typename Triangulation<dim>::cell_iterator, unsigned int>
- CellFace;
+ using CellFace =
+ std::pair<typename Triangulation<dim>::cell_iterator, unsigned int>;
const typename std::map<CellFace, std::pair<CellFace, std::bitset<3>>>
&face_map = triangulation.get_periodic_face_map();
typename std::map<CellFace,
AffineConstraints<double> constraints;
AffineConstraints<double> non_homogeneous_constraints;
- typedef MatrixFreeOperators::LaplaceOperator<
+ using SystemMatrixType = MatrixFreeOperators::LaplaceOperator<
dim,
degree_finite_element,
degree_finite_element + 1,
1,
- LinearAlgebra::distributed::Vector<double>>
- SystemMatrixType;
+ LinearAlgebra::distributed::Vector<double>>;
SystemMatrixType system_matrix;
MGConstrainedDoFs mg_constrained_dofs;
- typedef MatrixFreeOperators::LaplaceOperator<
+ using LevelMatrixType = MatrixFreeOperators::LaplaceOperator<
dim,
degree_finite_element,
degree_finite_element + 1,
1,
- LinearAlgebra::distributed::Vector<float>>
- LevelMatrixType;
+ LinearAlgebra::distributed::Vector<float>>;
MGLevelObject<LevelMatrixType> mg_matrices;
LinearAlgebra::distributed::Vector<double> solution;
MGTransferMatrixFree<dim, float> mg_transfer(mg_constrained_dofs);
mg_transfer.build(dof_handler);
- typedef PreconditionChebyshev<LevelMatrixType,
- LinearAlgebra::distributed::Vector<float>>
- SmootherType;
+ using SmootherType =
+ PreconditionChebyshev<LevelMatrixType,
+ LinearAlgebra::distributed::Vector<float>>;
mg::SmootherRelaxation<SmootherType,
LinearAlgebra::distributed::Vector<float>>
mg_smoother;
class InteriorPenaltyProblem
{
public:
- typedef MeshWorker::IntegrationInfo<dim> CellInfo;
+ using CellInfo = MeshWorker::IntegrationInfo<dim>;
InteriorPenaltyProblem(const FiniteElement<dim> &fe);
PreconditionIdentity>
coarse_grid_solver(coarse_solver, coarse_matrix, identity);
- typedef RelaxationBlockJacobi<TrilinosWrappers::SparseMatrix,
- double,
- TrilinosWrappers::MPI::Vector>
- Smoother;
+ using Smoother = RelaxationBlockJacobi<TrilinosWrappers::SparseMatrix,
+ double,
+ TrilinosWrappers::MPI::Vector>;
MGLevelObject<typename Smoother::AdditionalData> smoother_data;
smoother_data.resize(0, triangulation.n_levels() - 1);
class InteriorPenaltyProblem
{
public:
- typedef MeshWorker::IntegrationInfo<dim> CellInfo;
+ using CellInfo = MeshWorker::IntegrationInfo<dim>;
InteriorPenaltyProblem(const FiniteElement<dim> &fe);
PreconditionIdentity>
coarse_grid_solver(coarse_solver, coarse_matrix, identity);
- typedef TrilinosWrappers::PreconditionJacobi Smoother;
+ using Smoother = TrilinosWrappers::PreconditionJacobi;
MGSmootherPrecondition<TrilinosWrappers::SparseMatrix,
Smoother,
TrilinosWrappers::MPI::Vector>
#include "../tests.h"
-typedef parallel::distributed::Triangulation<2, 3>::cell_iterator cell_iterator;
+using cell_iterator = parallel::distributed::Triangulation<2, 3>::cell_iterator;
DeclException1(ExcMissingCell,
cell_iterator,
<< "Trying to find cell " << arg1
signal_counter_clear = 0;
signal_counter_any_change = 0;
- typedef parallel::distributed::Triangulation<dim, spacedim> TriaType;
+ using TriaType = parallel::distributed::Triangulation<dim, spacedim>;
{
const std::string prefix = Utilities::int_to_string(dim, 1) + "d-" +
void
test()
{
- typedef parallel::distributed::Triangulation<dim, spacedim> TriaType;
+ using TriaType = parallel::distributed::Triangulation<dim, spacedim>;
{
const std::string prefix = Utilities::int_to_string(dim, 1) + "d-" +
void
test()
{
- typedef parallel::distributed::Triangulation<dim, spacedim> TriaType;
+ using TriaType = parallel::distributed::Triangulation<dim, spacedim>;
{
const std::string prefix = Utilities::int_to_string(dim, 1) + "d-" +
void
test()
{
- typedef parallel::distributed::Triangulation<dim, spacedim> TriaType;
+ using TriaType = parallel::distributed::Triangulation<dim, spacedim>;
{
const std::string prefix = Utilities::int_to_string(dim, 1) + "d-" +
void
test()
{
- typedef parallel::distributed::Triangulation<dim, spacedim> TriaType;
+ using TriaType = parallel::distributed::Triangulation<dim, spacedim>;
{
const std::string prefix = Utilities::int_to_string(dim, 1) + "d-" +
void
test()
{
- typedef parallel::distributed::Triangulation<dim, spacedim> TriaType;
+ using TriaType = parallel::distributed::Triangulation<dim, spacedim>;
{
const std::string prefix = Utilities::int_to_string(dim, 1) + "d-" +
#define N 3
-typedef Vector<double> VectorType;
+using VectorType = Vector<double>;
class MGAll : public MGSmootherBase<VectorType>,
public MGTransferBase<VectorType>,
run();
private:
- typedef LA::MPI::SparseMatrix matrix_t;
- typedef LA::MPI::Vector vector_t;
+ using matrix_t = LA::MPI::SparseMatrix;
+ using vector_t = LA::MPI::Vector;
void
setup_system();
MGTransferPrebuilt<vector_t> mg_transfer(mg_constrained_dofs);
mg_transfer.build(mg_dof_handler);
- typedef LA::MPI::PreconditionJacobi Smoother;
+ using Smoother = LA::MPI::PreconditionJacobi;
MGSmootherPrecondition<matrix_t, Smoother, vector_t> mg_smoother;
mg_smoother.initialize(mg_matrices, Smoother::AdditionalData(0.5));
mg_smoother.set_steps(2);
run();
private:
- typedef LA::MPI::SparseMatrix matrix_t;
- typedef LA::MPI::Vector vector_t;
+ using matrix_t = LA::MPI::SparseMatrix;
+ using vector_t = LA::MPI::Vector;
void
setup_system();
MGTransferPrebuilt<vector_t> mg_transfer(mg_constrained_dofs);
mg_transfer.build(mg_dof_handler);
- typedef LA::MPI::PreconditionJacobi Smoother;
+ using Smoother = LA::MPI::PreconditionJacobi;
MGSmootherPrecondition<matrix_t, Smoother, vector_t> mg_smoother;
mg_smoother.initialize(mg_matrices, Smoother::AdditionalData(0.5));
mg_smoother.set_steps(2);
MGCoarseGridHouseholder<double, Vector<double>> mg_coarse_renumbered;
mg_coarse_renumbered.initialize(coarse_matrix_renumbered);
- typedef PreconditionIdentity RELAXATION;
+ using RELAXATION = PreconditionIdentity;
MGSmootherPrecondition<SparseMatrix<double>, RELAXATION, Vector<double>>
mg_smoother;
class LaplaceProblem
{
public:
- typedef MeshWorker::IntegrationInfo<dim> CellInfo;
+ using CellInfo = MeshWorker::IntegrationInfo<dim>;
LaplaceProblem(const unsigned int deg);
void
class LaplaceProblem
{
public:
- typedef MeshWorker::IntegrationInfo<dim> CellInfo;
+ using CellInfo = MeshWorker::IntegrationInfo<dim>;
LaplaceProblem(const unsigned int deg);
void
MGCoarseGridHouseholder<> coarse_grid_solver;
coarse_grid_solver.initialize(coarse_matrix);
- typedef PreconditionSOR<SparseMatrix<double>> Smoother;
+ using Smoother = PreconditionSOR<SparseMatrix<double>>;
MGSmootherRelaxation<SparseMatrix<double>, Smoother, Vector<double>>
mg_smoother;
mg_smoother.initialize(mg_matrices);
MGCoarseGridHouseholder<> coarse_grid_solver;
coarse_grid_solver.initialize(coarse_matrix);
- typedef PreconditionSOR<SparseMatrix<double>> Smoother;
- GrowingVectorMemory<> vector_memory;
+ using Smoother = PreconditionSOR<SparseMatrix<double>>;
+ GrowingVectorMemory<> vector_memory;
MGSmootherRelaxation<SparseMatrix<double>, Smoother, Vector<double>>
mg_smoother;
mg_smoother.initialize(mg_matrices);
deallog << " Size of coarse grid matrix: " << mg_matrices[min_level].m()
<< std::endl;
- typedef PreconditionChebyshev<SparseMatrix<double>,
- LinearAlgebra::distributed::Vector<double>>
- Smoother;
+ using Smoother =
+ PreconditionChebyshev<SparseMatrix<double>,
+ LinearAlgebra::distributed::Vector<double>>;
GrowingVectorMemory<LinearAlgebra::distributed::Vector<double>> vector_memory;
MGSmootherPrecondition<SparseMatrix<double>,
Smoother,
deallog << " Size of coarse grid matrix: " << mg_matrices[min_level].m()
<< std::endl;
- typedef PreconditionChebyshev<SparseMatrix<double>,
- LinearAlgebra::distributed::Vector<double>>
- Smoother;
+ using Smoother =
+ PreconditionChebyshev<SparseMatrix<double>,
+ LinearAlgebra::distributed::Vector<double>>;
GrowingVectorMemory<LinearAlgebra::distributed::Vector<double>> vector_memory;
MGSmootherPrecondition<SparseMatrix<double>,
Smoother,
deallog << " Size of coarse grid matrix: " << mg_matrices[min_level].m()
<< std::endl;
- typedef PreconditionChebyshev<SparseMatrix<double>,
- LinearAlgebra::distributed::Vector<double>>
- Smoother;
+ using Smoother =
+ PreconditionChebyshev<SparseMatrix<double>,
+ LinearAlgebra::distributed::Vector<double>>;
GrowingVectorMemory<LinearAlgebra::distributed::Vector<double>> vector_memory;
MGSmootherPrecondition<SparseMatrix<double>,
Smoother,
MGCoarseGridHouseholder<> coarse_grid_solver;
coarse_grid_solver.initialize(coarse_matrix);
- typedef PreconditionJacobi<SparseMatrix<double>> Smoother;
+ using Smoother = PreconditionJacobi<SparseMatrix<double>>;
MGSmootherPrecondition<SparseMatrix<double>, Smoother, Vector<double>>
mg_smoother;
mg_smoother.initialize(mg_matrices, typename Smoother::AdditionalData(0.678));
MGCoarseGridHouseholder<> coarse_grid_solver;
coarse_grid_solver.initialize(coarse_matrix);
- typedef PreconditionSOR<SparseMatrix<double>> Smoother;
- GrowingVectorMemory<> vector_memory;
+ using Smoother = PreconditionSOR<SparseMatrix<double>>;
+ GrowingVectorMemory<> vector_memory;
MGSmootherRelaxation<SparseMatrix<double>, Smoother, Vector<double>>
mg_smoother;
mg_smoother.initialize(mg_matrices);
FE_Q<dim> fe;
DoFHandler<dim> mg_dof_handler;
- typedef LA::MPI::SparseMatrix matrix_t;
- typedef LA::MPI::Vector vector_t;
+ using matrix_t = LA::MPI::SparseMatrix;
+ using vector_t = LA::MPI::Vector;
matrix_t system_matrix;
PreconditionIdentity>
coarse_grid_solver(coarse_solver, coarse_matrix, id);
- typedef LA::MPI::PreconditionJacobi Smoother;
+ using Smoother = LA::MPI::PreconditionJacobi;
MGSmootherPrecondition<matrix_t, Smoother, vector_t> mg_smoother;
mg_smoother.initialize(mg_matrices, Smoother::AdditionalData(0.5));
mg_smoother.set_steps(2);
FE_Q<dim> fe;
DoFHandler<dim> mg_dof_handler;
- typedef LA::MPI::SparseMatrix matrix_t;
- typedef LA::MPI::Vector vector_t;
+ using matrix_t = LA::MPI::SparseMatrix;
+ using vector_t = LA::MPI::Vector;
matrix_t system_matrix;
mg_transfer.build(mg_dof_handler);
// pre and post smoothers:
- typedef LA::MPI::PreconditionJacobi Smoother;
+ using Smoother = LA::MPI::PreconditionJacobi;
MGSmootherPrecondition<matrix_t, Smoother, vector_t> mg_smoother;
mg_smoother.initialize(mg_matrices, Smoother::AdditionalData(0.5));
mg_smoother.set_steps(2);
FE_Q<dim> fe;
DoFHandler<dim> mg_dof_handler;
- typedef LA::MPI::SparseMatrix matrix_t;
- typedef LA::MPI::Vector vector_t;
+ using matrix_t = LA::MPI::SparseMatrix;
+ using vector_t = LA::MPI::Vector;
matrix_t system_matrix;
PreconditionIdentity>
coarse_grid_solver(coarse_solver, coarse_matrix, id);
- typedef LA::MPI::PreconditionJacobi Smoother;
+ using Smoother = LA::MPI::PreconditionJacobi;
MGSmootherPrecondition<matrix_t, Smoother, vector_t> mg_smoother;
mg_smoother.initialize(mg_matrices, Smoother::AdditionalData(0.5));
mg_smoother.set_steps(2);
void
LaplaceProblem<dim>::solve()
{
- typedef SparseMatrix<double> matrix_t;
- typedef Vector<double> vector_t;
+ using matrix_t = SparseMatrix<double>;
+ using vector_t = Vector<double>;
MGTransferPrebuilt<vector_t> mg_transfer(mg_constrained_dofs);
mg_transfer.build(mg_dof_handler);
PreconditionIdentity>
coarse_grid_solver(coarse_solver, coarse_matrix, id);
- typedef PreconditionJacobi<matrix_t> Smoother;
+ using Smoother = PreconditionJacobi<matrix_t>;
MGSmootherPrecondition<matrix_t, Smoother, vector_t> mg_smoother;
mg_smoother.initialize(mg_matrices, Smoother::AdditionalData(0.5));
mg_smoother.set_steps(2);
MGCoarseGridHouseholder<> coarse_grid_solver;
coarse_grid_solver.initialize(coarse_matrix);
- typedef PreconditionSOR<SparseMatrix<double>> Smoother;
+ using Smoother = PreconditionSOR<SparseMatrix<double>>;
MGSmootherRelaxation<SparseMatrix<double>, Smoother, Vector<double>>
mg_smoother;
mg_smoother.initialize(mg_matrices);
MGCoarseGridHouseholder<> coarse_grid_solver;
coarse_grid_solver.initialize(coarse_matrix);
- typedef PreconditionSOR<SparseMatrix<double>> Smoother;
- GrowingVectorMemory<> vector_memory;
+ using Smoother = PreconditionSOR<SparseMatrix<double>>;
+ GrowingVectorMemory<> vector_memory;
MGSmootherRelaxation<SparseMatrix<double>, Smoother, Vector<double>>
mg_smoother;
mg_smoother.initialize(mg_matrices);
class InteriorPenaltyProblem
{
public:
- typedef MeshWorker::IntegrationInfo<dim> CellInfo;
+ using CellInfo = MeshWorker::IntegrationInfo<dim>;
InteriorPenaltyProblem(const FiniteElement<dim> &fe);
MGCoarseGridHouseholder<double, Vector<double>> mg_coarse;
mg_coarse.initialize(coarse_matrix);
- GrowingVectorMemory<Vector<double>> mem;
- typedef PreconditionSOR<SparseMatrix<double>> RELAXATION;
+ GrowingVectorMemory<Vector<double>> mem;
+ using RELAXATION = PreconditionSOR<SparseMatrix<double>>;
mg::SmootherRelaxation<RELAXATION, Vector<double>> mg_smoother;
RELAXATION::AdditionalData smoother_data(1.);
mg_smoother.initialize(mg_matrix, smoother_data);
class InteriorPenaltyProblem
{
public:
- typedef MeshWorker::IntegrationInfo<dim> CellInfo;
+ using CellInfo = MeshWorker::IntegrationInfo<dim>;
InteriorPenaltyProblem(const FiniteElement<dim> &fe);
MGCoarseGridHouseholder<double, Vector<double>> mg_coarse;
mg_coarse.initialize(coarse_matrix);
- GrowingVectorMemory<Vector<double>> mem;
- typedef PreconditionSOR<SparseMatrix<double>> RELAXATION;
+ GrowingVectorMemory<Vector<double>> mem;
+ using RELAXATION = PreconditionSOR<SparseMatrix<double>>;
mg::SmootherRelaxation<RELAXATION, Vector<double>> mg_smoother;
RELAXATION::AdditionalData smoother_data(1.);
mg_smoother.initialize(mg_matrix, smoother_data);
class InteriorPenaltyProblem
{
public:
- typedef MeshWorker::IntegrationInfo<dim> CellInfo;
+ using CellInfo = MeshWorker::IntegrationInfo<dim>;
InteriorPenaltyProblem(const FiniteElement<dim> &fe);
MGCoarseGridHouseholder<double, Vector<double>> mg_coarse;
mg_coarse.initialize(coarse_matrix);
- GrowingVectorMemory<Vector<double>> mem;
- typedef PreconditionSOR<SparseMatrix<double>> RELAXATION;
+ GrowingVectorMemory<Vector<double>> mem;
+ using RELAXATION = PreconditionSOR<SparseMatrix<double>>;
mg::SmootherRelaxation<RELAXATION, Vector<double>> mg_smoother;
RELAXATION::AdditionalData smoother_data(1.);
mg_smoother.initialize(mg_matrix, smoother_data);
class InteriorPenaltyProblem
{
public:
- typedef MeshWorker::IntegrationInfo<dim> CellInfo;
+ using CellInfo = MeshWorker::IntegrationInfo<dim>;
InteriorPenaltyProblem(const FiniteElement<dim> &fe);
MGCoarseGridHouseholder<double, Vector<double>> mg_coarse;
mg_coarse.initialize(coarse_matrix);
- GrowingVectorMemory<Vector<double>> mem;
- typedef PreconditionSOR<SparseMatrix<double>> RELAXATION;
+ GrowingVectorMemory<Vector<double>> mem;
+ using RELAXATION = PreconditionSOR<SparseMatrix<double>>;
mg::SmootherRelaxation<RELAXATION, Vector<double>> mg_smoother;
RELAXATION::AdditionalData smoother_data(1.);
mg_smoother.initialize(mg_matrix, smoother_data);
FE_Q<dim> fe;
DoFHandler<dim> mg_dof_handler;
- typedef LA::MPI::SparseMatrix matrix_t;
- typedef LA::MPI::Vector vector_t;
+ using matrix_t = LA::MPI::SparseMatrix;
+ using vector_t = LA::MPI::Vector;
matrix_t system_matrix;
PreconditionIdentity>
coarse_grid_solver(coarse_solver, coarse_matrix, id);
- typedef LA::MPI::PreconditionJacobi Smoother;
+ using Smoother = LA::MPI::PreconditionJacobi;
MGSmootherPrecondition<matrix_t, Smoother, vector_t> mg_smoother;
mg_smoother.initialize(mg_matrices, Smoother::AdditionalData(0.5));
mg_smoother.set_steps(2);
FE_Q<dim> fe;
DoFHandler<dim> mg_dof_handler;
- typedef LA::MPI::SparseMatrix matrix_t;
- typedef LA::MPI::Vector vector_t;
+ using matrix_t = LA::MPI::SparseMatrix;
+ using vector_t = LA::MPI::Vector;
matrix_t system_matrix;
PreconditionIdentity>
coarse_grid_solver(coarse_solver, coarse_matrix, id);
- typedef LA::MPI::PreconditionJacobi Smoother;
+ using Smoother = LA::MPI::PreconditionJacobi;
MGSmootherPrecondition<matrix_t, Smoother, vector_t> mg_smoother;
mg_smoother.initialize(mg_matrices, Smoother::AdditionalData(0.5));
mg_smoother.set_steps(2);
DoFHandler<dim> dofh(tr);
dofh.distribute_dofs(fe);
dofh.distribute_mg_dofs();
- typedef TrilinosWrappers::MPI::Vector vector_t;
+ using vector_t = TrilinosWrappers::MPI::Vector;
MGConstrainedDoFs mg_constrained_dofs;
mg_constrained_dofs.initialize(dofh);
DoFHandler<dim> dofh(tr);
dofh.distribute_dofs(fe);
dofh.distribute_mg_dofs();
- typedef TrilinosWrappers::MPI::Vector vector_t;
+ using vector_t = TrilinosWrappers::MPI::Vector;
{}
MGTransferPrebuilt<vector_t> transfer;
transfer.build(dofh);
DoFHandler<dim> dofh(tr);
dofh.distribute_dofs(fe);
dofh.distribute_mg_dofs();
- typedef PETScWrappers::MPI::Vector vector_t;
+ using vector_t = PETScWrappers::MPI::Vector;
{}
MGTransferPrebuilt<vector_t> transfer;
transfer.build(dofh);
void
test()
{
- typedef Vector<number> VectorType;
+ using VectorType = Vector<number>;
// size of the problem
const unsigned int N = 10;
auto &out = deallog.get_file_stream();
out << std::setprecision(5) << std::fixed << std::right;
- typedef Vector<number> VectorType;
+ using VectorType = Vector<number>;
// size of the problem
const unsigned int N = 20;
auto &out = deallog.get_file_stream();
out << std::setprecision(5) << std::fixed << std::right;
- typedef Vector<number> VectorType;
+ using VectorType = Vector<number>;
// size of the problem
const unsigned int N = 21;
auto &out = deallog.get_file_stream();
out << std::setprecision(5) << std::fixed << std::right;
- typedef Vector<number> VectorType;
+ using VectorType = Vector<number>;
// size of the problem
const unsigned int N = 21;
{
initlog();
- typedef std::tuple<std::string, Point<3>, unsigned int> T;
+ using T = std::tuple<std::string, Point<3>, unsigned int>;
T a;
a = Convert<T>::to_value("Ciao : 1.0, 2.0, 3.0 : 33");
{
initlog();
- typedef std::unique_ptr<FunctionParser<3>> T;
+ using T = std::unique_ptr<FunctionParser<3>>;
T a;
a = Convert<T>::to_value("x*y,y-t");
{
initlog();
- typedef ComponentMask T;
+ using T = ComponentMask;
T a;
a = Convert<T>::to_value("true,false,true");
{
initlog();
- typedef std::map<types::boundary_id, std::unique_ptr<FunctionParser<3>>> T;
+ using T = std::map<types::boundary_id, std::unique_ptr<FunctionParser<3>>>;
T a;
a = Convert<T>::to_value("0:x,y,z*t");
{
Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1);
{
- typedef PETScWrappers::SparseMatrix::size_type size_type;
+ using size_type = PETScWrappers::SparseMatrix::size_type;
std::vector<size_type> row_lengths(5, 3U);
row_lengths.back() = 2;
void
test(PETScWrappers::MatrixBase &m)
{
- typedef PETScWrappers::MatrixBase::size_type size_type;
+ using size_type = PETScWrappers::MatrixBase::size_type;
Assert(m.m() != 0, ExcInternalError());
Assert(m.n() != 0, ExcInternalError());
Assert(m.m() != 0, ExcInternalError());
Assert(m.n() != 0, ExcInternalError());
- typedef PETScWrappers::MatrixBase::size_type size_type;
+ using size_type = PETScWrappers::MatrixBase::size_type;
// build a tri-diagonal pattern
double norm_sqr = 0;
void
test()
{
- typedef PETScWrappers::MPI::SparseMatrix::size_type size_type;
+ using size_type = PETScWrappers::MPI::SparseMatrix::size_type;
// create a parallel matrix where the first
// process has 10 rows, the second one 20,
const Vector<double> vA = Notation::Kelvin::to_vector(A);
const FullMatrix<double> mA = Notation::Kelvin::to_matrix(A);
- typedef typename std::decay<decltype(A)>::type InpType;
+ using InpType = typename std::decay<decltype(A)>::type;
const auto vA_conv = Notation::Kelvin::to_tensor<InpType>(vA);
const auto mA_conv = Notation::Kelvin::to_tensor<InpType>(mA);
const Vector<double> vA = Notation::Kelvin::to_vector(A);
const FullMatrix<double> mA = Notation::Kelvin::to_matrix(A);
- typedef typename std::decay<decltype(A)>::type InpType;
+ using InpType = typename std::decay<decltype(A)>::type;
const auto vA_conv = Notation::Kelvin::to_tensor<InpType>(vA);
const auto mA_conv = Notation::Kelvin::to_tensor<InpType>(mA);
const Vector<double> vA = Notation::Kelvin::to_vector(A);
- typedef typename std::decay<decltype(A)>::type InpType;
+ using InpType = typename std::decay<decltype(A)>::type;
const auto vA_conv = Notation::Kelvin::to_tensor<InpType>(vA);
Assert((vA_conv - A).norm() < 1e-12,
const Vector<double> vA = Notation::Kelvin::to_vector(A);
const FullMatrix<double> mA = Notation::Kelvin::to_matrix(A);
- typedef typename std::decay<decltype(A)>::type InpType;
+ using InpType = typename std::decay<decltype(A)>::type;
const auto vA_conv = Notation::Kelvin::to_tensor<InpType>(vA);
const auto mA_conv = Notation::Kelvin::to_tensor<InpType>(mA);
const Vector<double> vA = Notation::Kelvin::to_vector(A);
const FullMatrix<double> mA = Notation::Kelvin::to_matrix(A);
- typedef typename std::decay<decltype(A)>::type InpType;
+ using InpType = typename std::decay<decltype(A)>::type;
const auto vA_conv = Notation::Kelvin::to_tensor<InpType>(vA);
const auto mA_conv = Notation::Kelvin::to_tensor<InpType>(mA);
const FullMatrix<double> mA =
Notation::Kelvin::to_matrix<dim, Tensor<1, dim>, Tensor<2, dim>>(A);
- typedef typename std::decay<decltype(A)>::type InpType;
+ using InpType = typename std::decay<decltype(A)>::type;
const auto mA_conv = Notation::Kelvin::to_tensor<InpType>(mA);
Assert((mA_conv - A).norm() < 1e-12,
const FullMatrix<double> mA =
Notation::Kelvin::to_matrix<dim, Tensor<2, dim>, Tensor<1, dim>>(A);
- typedef typename std::decay<decltype(A)>::type InpType;
+ using InpType = typename std::decay<decltype(A)>::type;
const auto mA_conv = Notation::Kelvin::to_tensor<InpType>(mA);
Assert((mA_conv - A).norm() < 1e-12,
Notation::Kelvin::to_matrix<dim, SymmetricTensor<2, dim>, Tensor<1, dim>>(
A);
- typedef typename std::decay<decltype(A)>::type InpType;
+ using InpType = typename std::decay<decltype(A)>::type;
const auto mA_conv = Notation::Kelvin::to_tensor<InpType>(mA);
Assert((mA_conv - A).norm() < 1e-12,
Notation::Kelvin::to_matrix<dim, Tensor<1, dim>, SymmetricTensor<2, dim>>(
A);
- typedef typename std::decay<decltype(A)>::type InpType;
+ using InpType = typename std::decay<decltype(A)>::type;
const auto mA_conv = Notation::Kelvin::to_tensor<InpType>(mA);
Assert((mA_conv - A).norm() < 1e-12,
const FullMatrix<double> mA = Notation::Kelvin::to_matrix(A);
- typedef typename std::decay<decltype(A)>::type InpType;
+ using InpType = typename std::decay<decltype(A)>::type;
const auto mA_conv = Notation::Kelvin::to_tensor<InpType>(mA);
Assert((mA_conv - A).norm() < 1e-12,
const FullMatrix<double> mA = Notation::Kelvin::to_matrix(A);
- typedef typename std::decay<decltype(A)>::type InpType;
+ using InpType = typename std::decay<decltype(A)>::type;
const auto mA_conv = Notation::Kelvin::to_tensor<InpType>(mA);
Assert((mA_conv - A).norm() < 1e-12,
Vector<double> vB(mC.m());
mC.vmult(vB, vA);
- typedef typename std::decay<decltype(A)>::type InpVecType;
- typedef typename std::decay<decltype(B)>::type ResVecType;
- typedef typename std::decay<decltype(C)>::type InpMatType;
+ using InpVecType = typename std::decay<decltype(A)>::type;
+ using ResVecType = typename std::decay<decltype(B)>::type;
+ using InpMatType = typename std::decay<decltype(C)>::type;
const auto A_conv = Notation::Kelvin::to_tensor<InpVecType>(vA);
const auto B_conv = Notation::Kelvin::to_tensor<ResVecType>(vB);
const auto C_conv = Notation::Kelvin::to_tensor<InpMatType>(mC);
Vector<double> vB(mC.m());
mC.vmult(vB, vA);
- typedef typename std::decay<decltype(A)>::type InpVecType;
- typedef typename std::decay<decltype(B)>::type ResVecType;
- typedef typename std::decay<decltype(C)>::type InpMatType;
+ using InpVecType = typename std::decay<decltype(A)>::type;
+ using ResVecType = typename std::decay<decltype(B)>::type;
+ using InpMatType = typename std::decay<decltype(C)>::type;
const auto A_conv = Notation::Kelvin::to_tensor<InpVecType>(vA);
const auto B_conv = Notation::Kelvin::to_tensor<ResVecType>(vB);
const auto C_conv = Notation::Kelvin::to_tensor<InpMatType>(mC);
Vector<double> vB(mC.m());
mC.vmult(vB, vA);
- typedef typename std::decay<decltype(A)>::type InpVecType;
- typedef typename std::decay<decltype(B)>::type ResVecType;
- typedef typename std::decay<decltype(C)>::type InpMatType;
+ using InpVecType = typename std::decay<decltype(A)>::type;
+ using ResVecType = typename std::decay<decltype(B)>::type;
+ using InpMatType = typename std::decay<decltype(C)>::type;
const auto A_conv = Notation::Kelvin::to_tensor<InpVecType>(vA);
const auto B_conv = Notation::Kelvin::to_tensor<ResVecType>(vB);
const auto C_conv = Notation::Kelvin::to_tensor<InpMatType>(mC);
Vector<double> vB(mC.m());
mC.vmult(vB, vA);
- typedef typename std::decay<decltype(A)>::type InpVecType;
- typedef typename std::decay<decltype(B)>::type ResVecType;
- typedef typename std::decay<decltype(C)>::type InpMatType;
+ using InpVecType = typename std::decay<decltype(A)>::type;
+ using ResVecType = typename std::decay<decltype(B)>::type;
+ using InpMatType = typename std::decay<decltype(C)>::type;
const auto A_conv = Notation::Kelvin::to_tensor<InpVecType>(vA);
const auto B_conv = Notation::Kelvin::to_tensor<ResVecType>(vB);
const auto C_conv = Notation::Kelvin::to_tensor<InpMatType>(mC);
Vector<double> vB(mC.m());
mC.vmult(vB, vA);
- typedef typename std::decay<decltype(A)>::type InpVecType;
- typedef typename std::decay<decltype(B)>::type ResVecType;
- typedef typename std::decay<decltype(C)>::type InpMatType;
+ using InpVecType = typename std::decay<decltype(A)>::type;
+ using ResVecType = typename std::decay<decltype(B)>::type;
+ using InpMatType = typename std::decay<decltype(C)>::type;
const auto A_conv = Notation::Kelvin::to_tensor<InpVecType>(vA);
const auto B_conv = Notation::Kelvin::to_tensor<ResVecType>(vB);
const auto C_conv = Notation::Kelvin::to_tensor<InpMatType>(mC);
Vector<double> vB(mC.m());
mC.vmult(vB, vA);
- typedef typename std::decay<decltype(A)>::type InpVecType;
- typedef typename std::decay<decltype(B)>::type ResVecType;
- typedef typename std::decay<decltype(C)>::type InpMatType;
+ using InpVecType = typename std::decay<decltype(A)>::type;
+ using ResVecType = typename std::decay<decltype(B)>::type;
+ using InpMatType = typename std::decay<decltype(C)>::type;
const auto A_conv = Notation::Kelvin::to_tensor<InpVecType>(vA);
const auto B_conv = Notation::Kelvin::to_tensor<ResVecType>(vB);
const auto C_conv = Notation::Kelvin::to_tensor<InpMatType>(mC);
Vector<double> vB(mC.m());
mC.vmult(vB, vA);
- typedef typename std::decay<decltype(A)>::type InpVecType;
- typedef typename std::decay<decltype(B)>::type ResVecType;
- typedef typename std::decay<decltype(C)>::type InpMatType;
+ using InpVecType = typename std::decay<decltype(A)>::type;
+ using ResVecType = typename std::decay<decltype(B)>::type;
+ using InpMatType = typename std::decay<decltype(C)>::type;
const auto A_conv = Notation::Kelvin::to_tensor<InpVecType>(vA);
const auto B_conv = Notation::Kelvin::to_tensor<ResVecType>(vB);
const auto C_conv = Notation::Kelvin::to_tensor<InpMatType>(mC);
Vector<double> vB(mC.n()); // Note result size
mC.Tvmult(vB, vA); // Note transpose vmult
- typedef typename std::decay<decltype(A)>::type InpVecType;
- typedef typename std::decay<decltype(B)>::type ResVecType;
- typedef typename std::decay<decltype(C)>::type InpMatType;
+ using InpVecType = typename std::decay<decltype(A)>::type;
+ using ResVecType = typename std::decay<decltype(B)>::type;
+ using InpMatType = typename std::decay<decltype(C)>::type;
const auto A_conv = Notation::Kelvin::to_tensor<InpVecType>(vA);
const auto B_conv = Notation::Kelvin::to_tensor<ResVecType>(vB);
const auto C_conv = Notation::Kelvin::to_tensor<InpMatType>(mC);
Vector<double> vB(mC.m()); // Note result size
mC.vmult(vB, vA); // Note transpose vmult
- typedef typename std::decay<decltype(A)>::type InpVecType;
- typedef typename std::decay<decltype(B)>::type ResVecType;
- typedef typename std::decay<decltype(C)>::type InpMatType;
+ using InpVecType = typename std::decay<decltype(A)>::type;
+ using ResVecType = typename std::decay<decltype(B)>::type;
+ using InpMatType = typename std::decay<decltype(C)>::type;
const auto A_conv = Notation::Kelvin::to_tensor<InpVecType>(vA);
const auto B_conv = Notation::Kelvin::to_tensor<ResVecType>(vB);
const auto C_conv = Notation::Kelvin::to_tensor<InpMatType>(mC);
Vector<double> vB(mC.n()); // Note result size
mC.Tvmult(vB, vA); // Note transpose vmult
- typedef typename std::decay<decltype(A)>::type InpVecType;
- typedef typename std::decay<decltype(B)>::type ResVecType;
- typedef typename std::decay<decltype(C)>::type InpMatType;
+ using InpVecType = typename std::decay<decltype(A)>::type;
+ using ResVecType = typename std::decay<decltype(B)>::type;
+ using InpMatType = typename std::decay<decltype(C)>::type;
const auto A_conv = Notation::Kelvin::to_tensor<InpVecType>(vA);
const auto B_conv = Notation::Kelvin::to_tensor<ResVecType>(vB);
const auto C_conv = Notation::Kelvin::to_tensor<InpMatType>(mC);
Vector<double> vB(mC.m()); // Note result size
mC.vmult(vB, vA); // Note transpose vmult
- typedef typename std::decay<decltype(A)>::type InpVecType;
- typedef typename std::decay<decltype(B)>::type ResVecType;
- typedef typename std::decay<decltype(C)>::type InpMatType;
+ using InpVecType = typename std::decay<decltype(A)>::type;
+ using ResVecType = typename std::decay<decltype(B)>::type;
+ using InpMatType = typename std::decay<decltype(C)>::type;
const auto A_conv = Notation::Kelvin::to_tensor<InpVecType>(vA);
const auto B_conv = Notation::Kelvin::to_tensor<ResVecType>(vB);
const auto C_conv = Notation::Kelvin::to_tensor<InpMatType>(mC);
void
test(const double x, const double y)
{
- typedef double RealT;
+ using RealT = double;
QuadraticObjective<RealT> quad_objective;
bfad.val() = Sacado::Fad::DFad<double>(num_deriv, 1, b);
// AD typedefs
- typedef Sacado::Fad::DFad<Sacado::Fad::DFad<double>> ADNumberType;
- typedef typename ADNumberType::value_type ADDerivativeType;
- typedef typename ADNumberType::scalar_type ADScalarType; // == double
+ using ADNumberType = Sacado::Fad::DFad<Sacado::Fad::DFad<double>>;
+ using ADDerivativeType = typename ADNumberType::value_type;
+ using ADScalarType = typename ADNumberType::scalar_type; // == double
// Compute function and derivative with AD
const ADNumberType rfad = func(afad, bfad, cfad);
int
main()
{
- typedef Sacado::Fad::DFad<double> Sdouble;
+ using Sdouble = Sacado::Fad::DFad<double>;
initlog();
int
main()
{
- typedef Sacado::Fad::DFad<double> Sdouble;
- typedef Sacado::Fad::DFad<Sdouble> SSdouble;
+ using Sdouble = Sacado::Fad::DFad<double>;
+ using SSdouble = Sacado::Fad::DFad<Sdouble>;
initlog();
int
main()
{
- typedef Sacado::Fad::DFad<double> Sdouble;
- typedef Sacado::Fad::DFad<Sdouble> SSdouble;
+ using Sdouble = Sacado::Fad::DFad<double>;
+ using SSdouble = Sacado::Fad::DFad<Sdouble>;
initlog();
int
main()
{
- typedef Sacado::Fad::DFad<double> Sdouble;
- typedef Sacado::Fad::DFad<Sdouble> SSdouble;
+ using Sdouble = Sacado::Fad::DFad<double>;
+ using SSdouble = Sacado::Fad::DFad<Sdouble>;
initlog();
int
main()
{
- typedef Sacado::Fad::DFad<double> Sdouble;
- typedef Sacado::Fad::DFad<Sdouble> SSdouble;
+ using Sdouble = Sacado::Fad::DFad<double>;
+ using SSdouble = Sacado::Fad::DFad<Sdouble>;
initlog();
int
main()
{
- typedef Sacado::Fad::DFad<double> Sdouble;
+ using Sdouble = Sacado::Fad::DFad<double>;
initlog();
int
main()
{
- typedef Sacado::Fad::DFad<double> Sdouble;
- typedef Sacado::Fad::DFad<Sdouble> SSdouble;
+ using Sdouble = Sacado::Fad::DFad<double>;
+ using SSdouble = Sacado::Fad::DFad<Sdouble>;
initlog();
int
main()
{
- typedef Sacado::Fad::DFad<double> Sdouble;
+ using Sdouble = Sacado::Fad::DFad<double>;
initlog();
int
main()
{
- typedef Sacado::Fad::DFad<double> Sdouble;
- typedef Sacado::Fad::DFad<Sdouble> SSdouble;
+ using Sdouble = Sacado::Fad::DFad<double>;
+ using SSdouble = Sacado::Fad::DFad<Sdouble>;
initlog();
const FEValuesExtractors::Scalar extractor_sclr(0);
- typedef Sacado::Fad::DFad<double> ad_type;
+ using ad_type = Sacado::Fad::DFad<double>;
DoFHandler<dim>::active_cell_iterator cell = dof_handler.begin_active();
DoFHandler<dim>::active_cell_iterator endc = dof_handler.end();
for (; cell != endc; ++cell)
Utilities::MPI::MPI_InitFinalize mpi_initialization(
argc, argv, numbers::invalid_unsigned_int);
- typedef Vector<double> VectorType;
+ using VectorType = Vector<double>;
ParameterHandler prm;
SUNDIALS::ARKode<VectorType>::AdditionalData data;
Utilities::MPI::MPI_InitFinalize mpi_initialization(
argc, argv, numbers::invalid_unsigned_int);
- typedef Vector<double> VectorType;
+ using VectorType = Vector<double>;
ParameterHandler prm;
SUNDIALS::ARKode<VectorType>::AdditionalData data;
Utilities::MPI::MPI_InitFinalize mpi_initialization(
argc, argv, numbers::invalid_unsigned_int);
- typedef Vector<double> VectorType;
+ using VectorType = Vector<double>;
ParameterHandler prm;
SUNDIALS::ARKode<VectorType>::AdditionalData data;
Utilities::MPI::MPI_InitFinalize mpi_initialization(
argc, argv, numbers::invalid_unsigned_int);
- typedef Vector<double> VectorType;
+ using VectorType = Vector<double>;
ParameterHandler prm;
SUNDIALS::ARKode<VectorType>::AdditionalData data;
Utilities::MPI::MPI_InitFinalize mpi_initialization(
argc, argv, numbers::invalid_unsigned_int);
- typedef Vector<double> VectorType;
+ using VectorType = Vector<double>;
ParameterHandler prm;
SUNDIALS::ARKode<VectorType>::AdditionalData data;
Utilities::MPI::MPI_InitFinalize mpi_initialization(
argc, argv, numbers::invalid_unsigned_int);
- typedef Vector<double> VectorType;
+ using VectorType = Vector<double>;
ParameterHandler prm;
SUNDIALS::ARKode<VectorType>::AdditionalData data;
{
initlog();
- typedef Vector<double> VectorType;
+ using VectorType = Vector<double>;
ParameterHandler prm;
SUNDIALS::ARKode<VectorType>::AdditionalData data;
, kappa(_kappa)
, out("output")
{
- typedef Vector<double> VectorType;
+ using VectorType = Vector<double>;
time_stepper.reinit_vector = [&](VectorType &v) { v.reinit(2); };
Utilities::MPI::MPI_InitFinalize mpi_initialization(
argc, argv, numbers::invalid_unsigned_int);
- typedef Vector<double> VectorType;
+ using VectorType = Vector<double>;
SUNDIALS::KINSOL<VectorType>::AdditionalData data;
ParameterHandler prm;
FullMatrix<number_t> D2psi_sd_sd(n_independent_variables,
n_independent_variables);
{
- typedef SD::Expression SDNumberType;
+ using SDNumberType = SD::Expression;
// Function and its derivatives
- typedef FunctionStruct<SDNumberType> func_sd;
+ using func_sd = FunctionStruct<SDNumberType>;
deallog.push("Symbolic computation: Function initialisation");
const SDNumberType symb_s0("s1");
std::cout << std::string(80, '-') << std::endl;
std::cout << "Scalar" << std::endl;
- typedef SD::Expression SD_number_t;
+ using SD_number_t = SD::Expression;
const NumberType a = NumberType(1.5);
const SD_number_t x("x");
void
test_serialization()
{
- namespace SD = Differentiation::SD;
- typedef SD::Expression SD_number_t;
+ namespace SD = Differentiation::SD;
+ using SD_number_t = SD::Expression;
// Serialization
// Note: We scope all symbolic variables to make sure that they are
const Tensor<1, dim> &v,
const double & s)
{
- typedef SD::Expression SDNumberType;
+ using SDNumberType = SD::Expression;
// Compute the symbolic (derivative) tensors once off
// ahead of time, and store them for each run of the function
if (symbols_initialised == false)
{
// Function and its derivatives
- typedef CoupledFunction<dim, SDNumberType> func_sd;
+ using func_sd = CoupledFunction<dim, SDNumberType>;
symb_psi = func_sd::psi(symb_t, symb_v, symb_s);
#if DEBUG_EXTRA
const double d2psi_ds_ds = optimizer.evaluate(symb_d2psi_ds_ds);
// Verify the result
- typedef CoupledFunction<dim, double> func;
- static const double tol = 1e-12;
+ using func = CoupledFunction<dim, double>;
+ static const double tol = 1e-12;
Assert(std::abs(psi - func::psi(t, v, s)) < tol,
ExcMessage("No match for function value."));
Assert(std::abs((dpsi_dt - func::dpsi_dt(t, v, s)).norm()) < tol,
void
test_number_functions()
{
- typedef SD::Expression SD_number_t;
- typedef SE::RCP<const SE::RealDouble> SE_double_t;
- // typedef SD_number_t result_t;
- typedef NumberType result_t;
- typedef double float_result_t;
+ using SD_number_t = SD::Expression;
+ using SE_double_t = SE::RCP<const SE::RealDouble>;
+ // using result_t = SD_number_t;
+ using result_t = NumberType;
+ using float_result_t = double;
// Primitive numbers
const NumberType x_(NumberType(2.2));
void
test_tensor()
{
- typedef SD::Expression SD_number_t;
- typedef Tensor<2, dim, SD_number_t> SD_tensor_t;
- typedef SymmetricTensor<2, dim, SD_number_t> SD_symm_tensor_t;
+ using SD_number_t = SD::Expression;
+ using SD_tensor_t = Tensor<2, dim, SD_number_t>;
+ using SD_symm_tensor_t = SymmetricTensor<2, dim, SD_number_t>;
// --- Values ---
deallog.push("Initialize");
void
check()
{
- typedef SymmetricTensor<2, dim> S;
+ using S = SymmetricTensor<2, dim>;
for (unsigned int i = 0; i < S::n_independent_components; ++i)
{
deallog << i << " -- " << S::unrolled_to_component_indices(i)
void
check()
{
- typedef Tensor<2, dim> S;
+ using S = Tensor<2, dim>;
for (unsigned int i = 0; i < S::n_independent_components; ++i)
{
deallog << i << " -- " << S::unrolled_to_component_indices(i)
void
check()
{
- typedef Tensor<3, dim> T;
- T t;
+ using T = Tensor<3, dim>;
+ T t;
for (unsigned int i = 0; i < T::n_independent_components; ++i)
t[T::unrolled_to_component_indices(i)] = (i + 1) * (i + 2);
{
constexpr int dim = 3;
- typedef std::complex<double> rank0_complex;
+ using rank0_complex = std::complex<double>;
dealii::Tensor<1, dim, rank0_complex> curl_complex;
dealii::SymmetricTensor<2, dim, rank0_complex> permeability_complex;
- typedef std::complex<float> rank0_complex_float;
+ using rank0_complex_float = std::complex<float>;
dealii::Tensor<1, dim, rank0_complex_float> curl_complex_float;
dealii::Tensor<2, dim, rank0_complex_float> permeability_complex_float;
- typedef double rank0;
+ using rank0 = double;
dealii::Tensor<1, dim, rank0> curl;
dealii::Tensor<2, dim, rank0> permeability;
- typedef double rank0_float;
+ using rank0_float = double;
dealii::Tensor<1, dim, rank0_float> curl_float;
dealii::Tensor<2, dim, rank0_float> permeability_float;
void
test()
{
- typedef std::complex<double> rank0_complex;
+ using rank0_complex = std::complex<double>;
dealii::Tensor<1, dim == 2 ? 1 : dim, rank0_complex> curl_complex;
dealii::Tensor<dim == 2 ? 0 : 2, dim, rank0_complex> permeability_complex;
- typedef std::complex<float> rank0_complex_float;
+ using rank0_complex_float = std::complex<float>;
dealii::Tensor<1, dim == 2 ? 1 : dim, rank0_complex_float> curl_complex_float;
dealii::Tensor<dim == 2 ? 0 : 2, dim, rank0_complex_float>
permeability_complex_float;
- typedef double rank0;
+ using rank0 = double;
dealii::Tensor<1, dim == 2 ? 1 : dim, rank0> curl;
dealii::Tensor<dim == 2 ? 0 : 2, dim, rank0> permeability;
- typedef double rank0_float;
+ using rank0_float = double;
dealii::Tensor<1, dim == 2 ? 1 : dim, rank0_float> curl_float;
dealii::Tensor<dim == 2 ? 0 : 2, dim, rank0_float> permeability_float;
constraints);
constraints.close();
- typedef FilteredIterator<typename DoFHandler<dim>::active_cell_iterator>
- CellFilter;
+ using CellFilter =
+ FilteredIterator<typename DoFHandler<dim>::active_cell_iterator>;
CellFilter begin(IteratorFilters::LocallyOwnedCell(),
dof_handler.begin_active());
CellFilter end(IteratorFilters::LocallyOwnedCell(), dof_handler.end());
constraints);
constraints.close();
- typedef FilteredIterator<typename DoFHandler<dim>::active_cell_iterator>
- CellFilter;
+ using CellFilter =
+ FilteredIterator<typename DoFHandler<dim>::active_cell_iterator>;
CellFilter begin(IteratorFilters::LocallyOwnedCell(),
dof_handler.begin_active());
CellFilter end(IteratorFilters::LocallyOwnedCell(), dof_handler.end());
constraints);
constraints.close();
- typedef FilteredIterator<typename DoFHandler<dim>::active_cell_iterator>
- CellFilter;
+ using CellFilter =
+ FilteredIterator<typename DoFHandler<dim>::active_cell_iterator>;
CellFilter begin(IteratorFilters::LocallyOwnedCell(),
dof_handler.begin_active());
CellFilter end(IteratorFilters::LocallyOwnedCell(), dof_handler.end());
constraints);
constraints.close();
- typedef FilteredIterator<typename DoFHandler<dim>::active_cell_iterator>
- CellFilter;
+ using CellFilter =
+ FilteredIterator<typename DoFHandler<dim>::active_cell_iterator>;
CellFilter begin(IteratorFilters::LocallyOwnedCell(),
dof_handler.begin_active());
CellFilter end(IteratorFilters::LocallyOwnedCell(), dof_handler.end());
constraints);
constraints.close();
- typedef FilteredIterator<typename DoFHandler<dim>::active_cell_iterator>
- CellFilter;
+ using CellFilter =
+ FilteredIterator<typename DoFHandler<dim>::active_cell_iterator>;
CellFilter begin(IteratorFilters::LocallyOwnedCell(),
dof_handler.begin_active());
CellFilter end(IteratorFilters::LocallyOwnedCell(), dof_handler.end());
constraints);
constraints.close();
- typedef FilteredIterator<typename DoFHandler<dim>::active_cell_iterator>
- CellFilter;
+ using CellFilter =
+ FilteredIterator<typename DoFHandler<dim>::active_cell_iterator>;
CellFilter begin(IteratorFilters::LocallyOwnedCell(),
dof_handler.begin_active());
CellFilter end(IteratorFilters::LocallyOwnedCell(), dof_handler.end());
int
main(int argc, char **argv)
{
- typedef BlockVector<double> BlockVectorLocal;
- typedef TrilinosWrappers::MPI::BlockVector BlockVector;
+ using BlockVectorLocal = BlockVector<double>;
+ using BlockVector = TrilinosWrappers::MPI::BlockVector;
Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1);
MPILogInitAll log;
namespace PhaseField
{
- typedef Vector<double> vectorType;
+ using vectorType = Vector<double>;
///////////////////////////////////////////////////////////////