41 euler_vector(euler_vector),
42 curvature_vector(curvature_vector),
75 vector<Point<3> > ref_support_points(
dh.
n_dofs());
79 dh, ref_support_points);
83 for (
unsigned int i=0; i<dh.n_dofs(); ++i)
86 std::vector< bool > comp_sel(3,
true);
111 for (
unsigned int i=0; i<
dh.
n_dofs(); ++i)
141 std::vector<unsigned int> local_dof_indices (dofs_per_cell);
142 std::vector<Vector<double> > local_curvature (n_q_points,
Vector<double>(3));
152 for (; cell!=endc; ++cell)
156 local_mass_matrix = 0;
161 unsigned int comp_i, comp_j;
163 for (
unsigned int i=0; i<dofs_per_cell; ++i)
166 for (
unsigned int j=0; j<dofs_per_cell; ++j)
169 if (comp_i == comp_j)
171 for (
unsigned int q=0; q<n_q_points; ++q)
182 for (
unsigned int q=0; q<n_q_points; ++q)
185 local_curvature[q](comp_i)*
190 cell->get_dof_indices (local_dof_indices);
193 (local_matrix, local_rhs, local_dof_indices,
matrix,
rhs);
196 (local_mass_matrix, local_dof_indices,
mass_matrix);
217 for (
unsigned int i=0; i<
dh.
n_dofs(); ++i)
225 inverse_mass.
solve(curvatures);
230 const vector<bool> &boundary_dofs)
238 for (
unsigned int i=0; i<
dh.
n_dofs(); ++i)
239 if (boundary_dofs[i] ==
true)
void get_function_values(const InputVector &fe_function, std::vector< typename InputVector::value_type > &values) const
const Tensor< 1, spacedim > & shape_grad(const unsigned int function_no, const unsigned int quadrature_point) const
void update_reference()
Whenever the underlying dh.
void vmult(OutVector &dst, const InVector &src) const
active_cell_iterator begin_active(const unsigned int level=0) const
void sadd(const doubles, const Vector< double > &V)
SparseMatrix< double > matrix
Vector< double > & curvature_vector
const unsigned int degree
void distribute(VectorType &vec) const
#define AssertThrow(cond, exc)
virtual void reinit(const SparsityPattern &sparsity)
void assemble_system()
Assemble the Laplace.
void solve_system()
Solve the system.
void make_hanging_node_constraints(const DoFHandlerType &dof_handler, ConstraintMatrix &constraints)
void distribute_local_to_global(const InVector &local_vector, const std::vector< size_type > &local_dof_indices, OutVector &global_vector) const
void fix_boundary_values()
All boundaries are fixed to.
#define Assert(cond, exc)
types::global_dof_index n_dofs() const
static::ExceptionBase & ExcDimensionMismatch(std::size_t arg1, std::size_t arg2)
void solve(Vector< double > &rhs_and_solution, bool transpose=false) const
SparseMatrix< double > mass_matrix
ConstraintMatrix constraints
const DoFHandler< 2, 3 > & dh
void apply_curvatures(const Vector< double > &curvatures, const std::vector< bool > &boundary_dofs)
Apply curvatures at the.
void copy_from(const size_type n_rows, const size_type n_cols, const ForwardIterator begin, const ForwardIterator end)
cell_iterator end() const
const unsigned int dofs_per_cell
const unsigned int n_quadrature_points
const Mapping< 2, 3 > & mapping
const double & shape_value(const unsigned int function_no, const unsigned int point_no) const
SurfaceSmoothing(Vector< double > &euler_vector, Vector< double > &curvature_vector, const DoFHandler< 2, 3 > &dh, const Mapping< 2, 3 > &mapping)
Smooth all dofs in.
Vector< double > & euler_vector
void make_sparsity_pattern(const DoFHandlerType &dof_handler, SparsityPatternType &sparsity_pattern, const ConstraintMatrix &constraints=ConstraintMatrix(), const bool keep_constrained_dofs=true, const types::subdomain_id subdomain_id=numbers::invalid_subdomain_id)
void initialize(const SparsityPattern &sparsity_pattern)
std::pair< unsigned int, unsigned int > system_to_component_index(const unsigned int index) const
void smooth()
Perform the full smoothing.
virtual void reinit(const size_type N, const bool omit_zeroing_entries=false)
void compute_curvatures(Vector< double > &curvatures)
Compute curvatures at the.
std::vector< bool > boundary_dofs
We collect in this namespace all utilities which operate on OpenCascade entities which don't need cla...
Vector< double > reference_identity
Vector< double > solution
void reinit(const TriaIterator< DoFCellAccessor< DoFHandlerType< dim, spacedim >, level_dof_access > > &cell)
std::map< unsigned int, double > boundary_values
double JxW(const unsigned int quadrature_point) const
const FiniteElement< dim, spacedim > & get_fe() const
void vmult(Vector< double > &dst, const Vector< double > &src) const