#include <deal.II/grid/grid_in.h>
#include <deal.II/grid/tria.h>
#include <deal.II/grid/tria_boundary_lib.h>
-#include <deal.II/grid/grid_out.h> // TEMP
#include <deal.II/fe/fe_dgp_monomial.h>
#include <deal.II/fe/fe_q.h>
#include <deal.II/fe/fe_tools.h>
#include <deal.II/fe/fe_values.h>
#include <deal.II/fe/mapping_q_eulerian.h>
+#include <deal.II/fe/mapping_q.h>
#include <deal.II/lac/block_sparse_matrix.h>
#include <deal.II/lac/block_vector.h>
for (unsigned int v=0; v<GeometryInfo<dim>::vertices_per_cell; ++v)
if (cell->vertex(v).distance(soln_pt) < 1e-6)
{
- // Create some object to help us extract the solution value at
- // the desired point
- const Quadrature<dim> soln_qrule (soln_pt);
+ // Extract y-component of solution at the given point
+ // This point is coindicent with a vertex, so we can
+ // extract it directly as we're using FE_Q finite elements
+ // that have support at the vertices
+ vertical_tip_displacement = solution_n(cell->vertex_dof_index(v,u_dof+1));
+
+ // Sanity check using alternate method to extract the solution
+ // at the given point. To do this, we must create an FEValues instance
+ // to help us extract the solution value at the desired point
+ const MappingQ<dim> mapping (parameters.poly_degree);
+ const Point<dim> qp_unit = mapping.transform_real_to_unit_cell(cell,soln_pt);
+ const Quadrature<dim> soln_qrule (qp_unit);
AssertThrow(soln_qrule.size() == 1, ExcInternalError());
FEValues<dim> fe_values_soln (fe, soln_qrule, update_values);
fe_values_soln.reinit(cell);
std::vector< Tensor<1,dim> > soln_values (soln_qrule.size());
fe_values_soln[u_fe].get_function_values(solution_n,
soln_values);
- vertical_tip_displacement = soln_values[0][u_dof+1];
-
- // Sanity Check
- for (unsigned int v=0; v<GeometryInfo<dim>::vertices_per_cell; ++v)
- if (cell->vertex(v).distance(soln_pt) < 1e-6)
- vertical_tip_displacement_check = solution_n(cell->vertex_dof_index(v,u_dof+1));
+ vertical_tip_displacement_check = soln_values[0][u_dof+1];
break;
}
--- /dev/null
+# Listing of Parameters
+# ---------------------
+subsection Finite element system
+ # Displacement system polynomial order
+ set Polynomial degree = 1
+
+ # Gauss quadrature order
+ set Quadrature order = 2
+end
+
+
+subsection Geometry
+ # Number of elements per long edge of the beam
+ set Elements per edge = 32
+
+ # Global grid scaling factor
+ set Grid scale = 1e-3
+end
+
+
+subsection Linear solver
+ # Linear solver iterations (multiples of the system matrix size)
+ set Max iteration multiplier = 1
+
+ # Linear solver residual (scaled by residual norm)
+ set Residual = 1e-6
+
+ # Preconditioner type
+ set Preconditioner type = ssor
+
+ # Preconditioner relaxation value
+ set Preconditioner relaxation = 0.65
+
+ # Type of solver used to solve the linear system
+ set Solver type = Direct
+end
+
+
+subsection Material properties
+ # Poisson's ratio
+ set Poisson's ratio = 0.3
+
+ # Shear modulus
+ set Shear modulus = 0.4225e6
+end
+
+
+subsection Nonlinear solver
+ # Number of Newton-Raphson iterations allowed
+ set Max iterations Newton-Raphson = 10
+
+ # Displacement error tolerance
+ set Tolerance displacement = 1.0e-6
+
+ # Force residual tolerance
+ set Tolerance force = 1.0e-9
+end
+
+
+subsection Time
+ # End time
+ set End time = 1
+
+ # Time step size
+ set Time step size = 0.1
+end
+
+