[P]arallel [Hi]gh-order [Li]brary for [P]DEs  Latest
Parallel High-Order Library for PDEs through hp-adaptive Discontinuous Galerkin methods
PHiLiP::MeshMover::LinearElasticity< dim, real > Class Template Reference

#include <meshmover_linear_elasticity.hpp>

Collaboration diagram for PHiLiP::MeshMover::LinearElasticity< dim, real >:

Public Member Functions

 LinearElasticity (const Triangulation &_triangulation, const std::shared_ptr< dealii::MappingFEField< dim, dim, VectorType, DoFHandlerType >> mapping_fe_field, const DoFHandlerType &_dof_handler, const dealii::LinearAlgebra::distributed::Vector< int > &_boundary_ids_vector, const dealii::LinearAlgebra::distributed::Vector< double > &_boundary_displacements_vector)
 Constructor.
 
 LinearElasticity (const HighOrderGrid< dim, real > &high_order_grid, const dealii::LinearAlgebra::distributed::Vector< double > &boundary_displacements_vector)
 Constructor that uses information from HighOrderGrid and uses current volume_nodes from HighOrderGrid.
 
VectorType get_volume_displacements ()
 
void evaluate_dXvdXs ()
 
void apply_dXvdXvs (std::vector< dealii::LinearAlgebra::distributed::Vector< double >> &list_of_vectors, dealii::TrilinosWrappers::SparseMatrix &output_matrix)
 
void apply_dXvdXvs (const dealii::LinearAlgebra::distributed::Vector< double > &input_vector, dealii::LinearAlgebra::distributed::Vector< double > &output_vector)
 
void apply_dXvdXvs_transpose (const dealii::LinearAlgebra::distributed::Vector< double > &input_vector, dealii::LinearAlgebra::distributed::Vector< double > &output_vector)
 

Public Attributes

VectorType displacement_solution
 
dealii::AffineConstraints< double > hanging_node_constraints
 
std::vector< dealii::LinearAlgebra::distributed::Vector< double > > dXvdXs
 

Private Types

using VectorType = dealii::LinearAlgebra::distributed::Vector< real >
 Distributed vector of double.
 
using DoFHandlerType = dealii::DoFHandler< dim >
 DoFHandler.
 
using Triangulation = dealii::parallel::distributed::Triangulation< dim >
 

Private Member Functions

void setup_system ()
 Allocation and boundary condition setup. More...
 
void assemble_system ()
 Assemble the system and its right-hand side.
 
void solve_timestep ()
 
unsigned int solve_linear_problem ()
 
dealii::LinearAlgebra::distributed::Vector< double > tensor_to_vector (const std::vector< dealii::Tensor< 1, dim, real >> &boundary_displacements_tensors) const
 

Private Attributes

const Triangulationtriangulation
 
const std::shared_ptr< dealii::MappingFEField< dim, dim, VectorType, DoFHandlerType > > mapping_fe_field
 MappingFEField corresponding to curved mesh.
 
const DoFHandlerTypedof_handler
 Same DoFHandler as the HighOrderGrid.
 
const dealii::QGauss< dim > quadrature_formula
 Integration strength of the mesh order plus one.
 
dealii::TrilinosWrappers::SparseMatrix system_matrix_unconstrained
 
dealii::LinearAlgebra::distributed::Vector< double > system_rhs_unconstrained
 
dealii::TrilinosWrappers::SparseMatrix system_matrix
 System matrix corresponding to linearized elasticity problem.
 
dealii::LinearAlgebra::distributed::Vector< double > system_rhs
 
dealii::AffineConstraints< double > all_constraints
 
dealii::AffineConstraints< double > dirichlet_boundary_constraints
 
MPI_Comm mpi_communicator
 MPI communicator.
 
const unsigned int n_mpi_processes
 Number of MPI processes.
 
const unsigned int this_mpi_process
 MPI rank.
 
dealii::ConditionalOStream pcout
 ConditionalOStream for output.
 
std::vector< dealii::types::global_dof_index > local_dofs_per_process
 List of number of DoFs per process.
 
dealii::IndexSet locally_owned_dofs
 Locally owned DoFs.
 
dealii::IndexSet locally_relevant_dofs
 Locally relevant DoFs.
 
const dealii::LinearAlgebra::distributed::Vector< int > & boundary_ids_vector
 
const dealii::LinearAlgebra::distributed::Vector< double > & boundary_displacements_vector
 

Detailed Description

template<int dim = PHILIP_DIM, typename real = double>
class PHiLiP::MeshMover::LinearElasticity< dim, real >

Linear elasticity mesh movement based on the deal.II example step-8 and step-42.

Definition at line 17 of file meshmover_linear_elasticity.hpp.

Member Typedef Documentation

◆ Triangulation

template<int dim = PHILIP_DIM, typename real = double>
using PHiLiP::MeshMover::LinearElasticity< dim, real >::Triangulation = dealii::parallel::distributed::Triangulation<dim>
private

Triangulation to store the grid. In 1D, dealii::Triangulation<dim> is used. In 2D, 3D, dealii::parallel::distributed::Triangulation<dim> is used.

Definition at line 34 of file meshmover_linear_elasticity.hpp.

Member Function Documentation

◆ apply_dXvdXvs() [1/2]

template<int dim, typename real >
void PHiLiP::MeshMover::LinearElasticity< dim, real >::apply_dXvdXvs ( std::vector< dealii::LinearAlgebra::distributed::Vector< double >> &  list_of_vectors,
dealii::TrilinosWrappers::SparseMatrix &  output_matrix 
)

Apply the analytical derivatives of volume displacements with respect to surface displacements onto a set of various right-hand sides. Note that the right-hand-side is of size n_volume_nodes. If the right-hand-side are the surface node displacements indexed in a volume node vector, the result is a displacement vector of the volume volume_nodes (which include the prescribed surface nodes).

Definition at line 445 of file meshmover_linear_elasticity.cpp.

◆ apply_dXvdXvs() [2/2]

template<int dim, typename real >
void PHiLiP::MeshMover::LinearElasticity< dim, real >::apply_dXvdXvs ( const dealii::LinearAlgebra::distributed::Vector< double > &  input_vector,
dealii::LinearAlgebra::distributed::Vector< double > &  output_vector 
)

Apply the analytical derivatives of volume displacements with respect to surface displacements onto a set of various right-hand sides. Note that the right-hand-side is of size n_volume_nodes. If the right-hand-side are the surface node displacements indexed in a volume node vector, the result is a displacement vector of the volume volume_nodes (which include the prescribed surface nodes).

Definition at line 361 of file meshmover_linear_elasticity.cpp.

◆ apply_dXvdXvs_transpose()

template<int dim, typename real >
void PHiLiP::MeshMover::LinearElasticity< dim, real >::apply_dXvdXvs_transpose ( const dealii::LinearAlgebra::distributed::Vector< double > &  input_vector,
dealii::LinearAlgebra::distributed::Vector< double > &  output_vector 
)

Apply the transposed analytical derivatives of volume displacements with respect to surface displacements onto a right-hand sides. Note that the right-hand side and solution is of size n_volume_nodes. If the right-hand-side are the surface node displacements indexed in a volume node vector, the result is a displacement vector of the volume volume_nodes (which include the prescribed surface nodes).

Definition at line 559 of file meshmover_linear_elasticity.cpp.

◆ evaluate_dXvdXs()

template<int dim, typename real >
void PHiLiP::MeshMover::LinearElasticity< dim, real >::evaluate_dXvdXs ( )

Evaluates the analytical derivatives of volume displacements with respect to surface displacements.

Definition at line 881 of file meshmover_linear_elasticity.cpp.

◆ get_volume_displacements()

template<int dim, typename real >
dealii::LinearAlgebra::distributed::Vector< real > PHiLiP::MeshMover::LinearElasticity< dim, real >::get_volume_displacements ( )

Evaluate and return volume displacements given boundary displacements.

Definition at line 99 of file meshmover_linear_elasticity.cpp.

◆ setup_system()

template<int dim, typename real >
void PHiLiP::MeshMover::LinearElasticity< dim, real >::setup_system ( )
private

Allocation and boundary condition setup.

Sparse matrix containing the dXvdXs sensititivies.

Definition at line 109 of file meshmover_linear_elasticity.cpp.

◆ solve_linear_problem()

template<int dim = PHILIP_DIM, typename real = double>
unsigned int PHiLiP::MeshMover::LinearElasticity< dim, real >::solve_linear_problem ( )
private

Linear solver for the mesh mover. Currently uses CG with a Jacobi preconditioner.

◆ solve_timestep()

template<int dim, typename real >
void PHiLiP::MeshMover::LinearElasticity< dim, real >::solve_timestep ( )
private

Solve the current time step. Currently only 1 time step since it is a linear mesh mover. However, future changes will allow this to be done iteratively to obtain a nonlinear mesh mover.

Definition at line 350 of file meshmover_linear_elasticity.cpp.

◆ tensor_to_vector()

template<int dim, typename real >
dealii::LinearAlgebra::distributed::Vector< double > PHiLiP::MeshMover::LinearElasticity< dim, real >::tensor_to_vector ( const std::vector< dealii::Tensor< 1, dim, real >> &  boundary_displacements_tensors) const
private

Transforms a std::vector<Tensor> into the corresponding distributed vector.

Definition at line 87 of file meshmover_linear_elasticity.cpp.

Member Data Documentation

◆ all_constraints

template<int dim = PHILIP_DIM, typename real = double>
dealii::AffineConstraints<double> PHiLiP::MeshMover::LinearElasticity< dim, real >::all_constraints
private

AffineConstraints containing boundary and hanging node constraints.

Definition at line 156 of file meshmover_linear_elasticity.hpp.

◆ boundary_displacements_vector

template<int dim = PHILIP_DIM, typename real = double>
const dealii::LinearAlgebra::distributed::Vector<double>& PHiLiP::MeshMover::LinearElasticity< dim, real >::boundary_displacements_vector
private

Displacement of boundary volume_nodes corresponding to boundary_ids_vector.

Definition at line 175 of file meshmover_linear_elasticity.hpp.

◆ boundary_ids_vector

template<int dim = PHILIP_DIM, typename real = double>
const dealii::LinearAlgebra::distributed::Vector<int>& PHiLiP::MeshMover::LinearElasticity< dim, real >::boundary_ids_vector
private

Global index of boundary volume_nodes that need to be constrained. Note that typically all surface boundaries "need" to be constrained.

Definition at line 172 of file meshmover_linear_elasticity.hpp.

◆ dirichlet_boundary_constraints

template<int dim = PHILIP_DIM, typename real = double>
dealii::AffineConstraints<double> PHiLiP::MeshMover::LinearElasticity< dim, real >::dirichlet_boundary_constraints
private

AffineConstraints containing Dirichlet boundary conditions.

Definition at line 159 of file meshmover_linear_elasticity.hpp.

◆ displacement_solution

template<int dim = PHILIP_DIM, typename real = double>
VectorType PHiLiP::MeshMover::LinearElasticity< dim, real >::displacement_solution

Current displacement solution

Definition at line 93 of file meshmover_linear_elasticity.hpp.

◆ dXvdXs

template<int dim = PHILIP_DIM, typename real = double>
std::vector<dealii::LinearAlgebra::distributed::Vector<double> > PHiLiP::MeshMover::LinearElasticity< dim, real >::dXvdXs

Vector of vectors containing the dXvdXs sensititivies. The outer vector represents the current surface index, while the inner vectors is the size of the volume mesh. Those sensitivities are distributed among the processors the same way the volume mesh volume_nodes are distributed among the processors.

Definition at line 104 of file meshmover_linear_elasticity.hpp.

◆ hanging_node_constraints

template<int dim = PHILIP_DIM, typename real = double>
dealii::AffineConstraints<double> PHiLiP::MeshMover::LinearElasticity< dim, real >::hanging_node_constraints

Hanging node constraints

Definition at line 96 of file meshmover_linear_elasticity.hpp.

◆ system_matrix_unconstrained

template<int dim = PHILIP_DIM, typename real = double>
dealii::TrilinosWrappers::SparseMatrix PHiLiP::MeshMover::LinearElasticity< dim, real >::system_matrix_unconstrained
private

System matrix corresponding to the unconstrained linearized elasticity problem.

Definition at line 139 of file meshmover_linear_elasticity.hpp.

◆ system_rhs

template<int dim = PHILIP_DIM, typename real = double>
dealii::LinearAlgebra::distributed::Vector<double> PHiLiP::MeshMover::LinearElasticity< dim, real >::system_rhs
private

System right-hand side corresponding to linearized elasticity problem. Note that no body forces are present and the right-hand side is therefore zero. However, Dirichlet boundary conditions may make some RHS entries non-zero, depending on the method used to impose them.

Definition at line 152 of file meshmover_linear_elasticity.hpp.

◆ system_rhs_unconstrained

template<int dim = PHILIP_DIM, typename real = double>
dealii::LinearAlgebra::distributed::Vector<double> PHiLiP::MeshMover::LinearElasticity< dim, real >::system_rhs_unconstrained
private

System right-hand side corresponding to the unconstrained linearized elasticity problem. Note that no body forces are present and the right-hand side is therefore zero.

Definition at line 143 of file meshmover_linear_elasticity.hpp.

◆ triangulation

template<int dim = PHILIP_DIM, typename real = double>
const Triangulation& PHiLiP::MeshMover::LinearElasticity< dim, real >::triangulation
private

Triangulation on which this acts.

Definition at line 129 of file meshmover_linear_elasticity.hpp.


The documentation for this class was generated from the following files: