const FEValues<dim> &fe_v = hp_fe_v.get_present_fe_values ();
// Deaclare my environment
PolarShapeManifold manifold;
PolarManifold<dim> polar;
TransfiniteInterpolationManifold<dim> inner_manifold;
Triangulation<dim> triangulation;
hp::DoFHandler<dim> dof_handler;
hp::FECollection<dim> fe_collection;
hp::MappingCollection<dim> mapping_collection;
PETScWrappers::SparseMatrix system_matrix;
PETScWrappers::MPI::Vector solution;
// Constructor
manifold ( alpha), dof_handler (triangulation),...
// setup_system
typename hp::DoFHandler<dim>::active_cell_iterator
cell = dof_handler.begin_active(),
endc = dof_handler.end();
for (; cell!=endc; ++cell) {
cell->set_active_fe_index ( ... );
}
dof_handler.distribute_dofs (fe_collection);
...
// create_coarse_grid
concentric_disks_inner_shape ( triangulation );
tria.set_manifold ( manifold_label, manifold );
tria.set_manifold ( layer_label, polar );
unsigned int not_curved = 1;
inner_manifold.initialize(triangulation);
tria.set_manifold (not_curved, inner_manifold);
...
// Assembly
hp::FEValues<dim> hp_fe_v ( mapping_collection,
fe_collection,
quadrature_collection,
update_values | update_gradients |
update_quadrature_points | update_JxW_values);
FullMatrix<PetscScalar> cell_system;
Vector<PetscScalar> cell_rhs;
std::vector<types::global_dof_index> local_dof_indices;
typename hp::DoFHandler<dim>::active_cell_iterator
cell = dof_handler.begin_active(),
endc = dof_handler.end();
for (; cell!=endc; ++cell) {
const unsigned int dofs_per_cell = cell->get_fe().dofs_per_cell;
cell_system.reinit (dofs_per_cell, dofs_per_cell);
cell_rhs.reinit (dofs_per_cell);
...
hp_fe_v.reinit (cell);
const FEValues<dim> &fe_v = hp_fe_v.get_present_fe_values ();
for (unsigned int q_point=0; q_point<fe_v.n_quadrature_points; ++q_point) {
Point<dim> x = fe_v.quadrature_point (q_point);
for (unsigned int i=0; i<dofs_per_cell; ++i){
for (unsigned int j=0; j<dofs_per_cell; ++j) {
cell_system (i,j) += (
fe_v.shape_grad(i,q_point) *
fe_v.shape_grad(j,q_point)
-f(x) * // given f
fe_v.shape_value(i,q_point) *
fe_v.shape_value(j,q_point) ) *
fe_v.JxW(q_point);
}
cell_rhs (i) += g(x) * // given g
fe_v.shape_value(i,q_point) *
fe_v.JxW(q_point);
}
} // q
--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dealii+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/92fc053d-ca4e-4830-bca0-2f211a9ba384%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to dea...@googlegroups.com.
If I interpret your mail correctly, your suggestion is using FunctionManifold in
order to create the parametrization of the geometry. If this is the case, I have
already done this step through my own class PolarShapeManifold (no code included).
If you meant differently, can you please clarify?
I perform N independent assembly routines (loop on the cells of each triangulation).
To unsubscribe from this group and stop receiving emails from it, send an email to dealii+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/e1b5d8e7-97cb-4bf8-a562-1d7aa9429536%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/e1b5d8e7-97cb-4bf8-a562-1d7aa9429536%40googlegroups.com.