Template Class Domain

Class Documentation

template<int dim, int spacedim = dim>
class Domain

An MPI-aware computational domain with an owned or observed triangulation.

Public Types

using ImportedFields = ImportedFiniteElementFields<dim, spacedim>
using DistributedTriangulation = dealii::parallel::distributed::Triangulation<dim, spacedim>
using FullyDistributedTriangulation = dealii::parallel::fullydistributed::Triangulation<dim, spacedim>
using TriangulationType = dealii::parallel::TriangulationBase<dim, spacedim>

Public Functions

explicit Domain(const DomainParameters<dim, spacedim> &parameters, MPI_Comm communicator = MPI_COMM_WORLD)
Domain(const DomainParameters<dim, spacedim> &parameters, TriangulationType &triangulation)

Observe a triangulation owned by another object.

The triangulation and parameters must outlive this Domain. The MPI communicator is taken from the triangulation. A populated mesh is kept unchanged and any requested VTK fields are imported onto that mesh; the input mesh must match it. An empty mesh can instead be initialized with make_grid() or prepare_grid()/finalize_grid().

~Domain()
Domain(const Domain&) = delete
Domain &operator=(const Domain&) = delete
void make_grid()

Prepare and finalize a mesh without coupled local refinement.

void prepare_grid(bool serial = false)

Read the mesh and initial fields before coupled refinement.

A fullydistributed domain is prepared on a replicated serial mesh. Set serial=true to do the same for an embedded distributed domain. Call finalize_grid() only after all mesh adjustments. This must happen before attaching application DoFHandlers or requesting field views. Preparing an already populated domain throws rather than discarding it.

void prepare_grid(const dealii::Triangulation<dim, spacedim> &coarse_mesh)

Prepare an existing coarse mesh with its material and boundary ids.

Imported VTK fields are read before refinement and transferred with it. The final triangulation must still be empty. Call finalize_grid() after all mesh changes, as for prepare_grid(true).

void finalize_grid()

Partition the prepared mesh and transfer its refined input fields.

void finalize_grid(const dealii::RepartitioningPolicyTools::Base<dim, spacedim> &policy)

Finalize a fullydistributed mesh with a one-time ownership policy.

Apply the policy before transferring retained input fields. The policy is evaluated collectively and is not retained by the Domain.

bool grid_is_prepared() const
dealii::Triangulation<dim, spacedim> &refinement_triangulation()

Mesh used during preparation; serial or parallel::distributed.

TriangulationType &triangulation()
const TriangulationType &triangulation() const
bool uses_fully_distributed_triangulation() const
MPI_Comm communicator() const
inline IntegrationSupport<dim, spacedim> support() const

Integrate over all active cells owned by this domain.

inline IntegrationSupport<dim, spacedim> support(const dealii::types::material_id material_id) const

Integrate over active cells with the selected material id.

template<int surface_dim, int n_components>
LiftedIntegrationSupport<dim, surface_dim, spacedim, n_components> lift(const TensorProductLift<dim, surface_dim, spacedim, n_components> &descriptor) const

Build a geometric integration support from a tensor-product lift.

template<int surface_dim, int n_components>
LiftedIntegrationSupport<dim, surface_dim, spacedim, n_components> lift(const TensorProductLift<dim, surface_dim, spacedim, n_components> &descriptor, FixedThicknessEvaluator<spacedim> thickness_evaluator) const
inline BoundaryIntegrationSupport<dim, spacedim> boundary_support() const

Integrate over every boundary face of this domain.

inline BoundaryIntegrationSupport<dim, spacedim> boundary_support(const dealii::types::boundary_id boundary_id) const

Integrate over boundary faces with the selected boundary id.

bool has_vtk_fields() const

Whether VTK data fields have been imported for this domain.

const ImportedFields &vtk_fields() const

Access the imported VTK fields, if enabled in the parameters.

ImportedFields::FieldView field(const std::string &name, unsigned int component = 0) const

Return one scalar component of a named imported VTK field.