feec.polar.examples.polar_model_2d#

Module providing a base class for analytical models on mapped 2D polar domains.

This is subclassed in the 2D Poisson and Maxwell examples.

Classes#

Inheritance diagram of psydac.feec.polar.examples.polar_model_2d

PolarModel2D(domain_log, analytical_mapping)

Base class for analytical models on mapped 2D polar domains.

Details#

Module providing a base class for analytical models on mapped 2D polar domains.

This is subclassed in the 2D Poisson and Maxwell examples.

class PolarModel2D(domain_log, analytical_mapping)[source]#

Bases: object

Base class for analytical models on mapped 2D polar domains.

Parameters:
domain_logsympde.topology.Domain

Logical domain on which the analytical mapping is defined.

analytical_mappingsympde.topology.mapping.Mapping

Analytical mapping from the logical domain to the physical domain.

Attributes:
logical_boundstuple[tuple[float, …], …]

Bounds of the logical domain.

mappingMapping or BasicCallableMapping (from sympde.topology.mapping)

Mapping used by the solver. It is either the analytical mapping or its spline approximation. Initialized by calling build_geometry.

analytical_mappingsympde.topology.mapping.Mapping

Original analytical mapping from the logical to the physical domain.

domainsympde.topology.Domain

Physical domain associated with mapping. Initialized by calling build_geometry.

domain_logsympde.topology.Domain

Logical domain.

geometry_export_timefloat

Time spent exporting the discrete geometry, in seconds. It is zero when the analytical mapping is used directly.

build_geometry(ncells, degree, periodic, mpi_comm, use_spline_mapping, filename='geo.h5', verbose=False)[source]#

Build the physical domain and the mapping used by the solver.

Parameters:
ncellssequence of int

Number of cells in each logical coordinate direction.

degreesequence of int

Polynomial degree of the spline space in each logical coordinate direction.

periodicsequence of bool

Periodicity of the spline space in each logical coordinate direction.

mpi_commmpi4py.MPI.Comm

MPI communicator used to construct and export the discrete geometry.

use_spline_mappingbool

If True, approximate the analytical mapping by a spline mapping. If False, use the analytical mapping directly.

filenamestr, default=”geo.h5”

Name of the HDF5 file used to export the spline geometry.

verbosebool, default=False

If True, print additional information when checking the regularity of the spline mapping in serial.

property logical_bounds#
property mapping#
property analytical_mapping#
property domain#
property domain_log#
property geometry_export_time#