Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bindings for dune-gdt #1381

Closed
wants to merge 29 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
dc8d717
[config] HAVE_DUNEXT, HAVE_DUNEGDT
ftschindler Jun 22, 2020
a2cc8cf
[discretizers.dunegdt] add discretize_domain_default
ftschindler Jun 22, 2020
051f642
[analyticalproblems] add CubeDomain
ftschindler Jun 22, 2020
31d6ce3
[bindings.dunext] bring up to date
ftschindler Jun 24, 2020
eb22aee
[bindings.dunegdt] bring up to date and add notebook visualizer
ftschindler Jun 24, 2020
8107b1c
[discretizers.dunegdt...] default to cubes as YaspGrid is always avai…
ftschindler Jun 24, 2020
33e211e
[discretizers.dunegdt.cg] add discretize_stationary_cg
ftschindler Jun 24, 2020
0d0bccf
[discretizers.dunegdt] use GridFunction to simplify integrand constru…
ftschindler Jul 2, 2020
dfd3a9f
[bindings] merge dunext into dunegdt
ftschindler Jul 8, 2020
85a0a23
[bindings.dunegdt] fix 1d vtk filename
ftschindler Jul 10, 2020
d16f3da
[bindings.dunegdt] add 1d P1 matplotlib visualizer
ftschindler Jul 10, 2020
ac08054
[...dunegdt.cg] some fixes
ftschindler Jul 10, 2020
d400ebc
[...dunegdt.ipdg] add NIPDG, IIPDG, SIPDG and SWIPDG discretizer
ftschindler Jul 10, 2020
e8a5754
[discretizers.dunegdt] update integrand use
ftschindler Jul 13, 2020
018c5df
[bindings.dunegdt] update to match VectorArray API
ftschindler Feb 22, 2021
fe71646
[discretizer.dunegdt] update CG variant, not fully generic yet
ftschindler Feb 22, 2021
4ee7cba
[bindings.dunegdt] add wrapped OnedVisualizer
ftschindler Feb 22, 2021
830b592
[discretizers.dunegdt] add discretize_instationary_cg, docs not good yet
ftschindler Feb 22, 2021
f7a5644
[bindings.dunegdt] do not tro to complexify
ftschindler Feb 22, 2021
2a95a41
[discretizers.dunegdt.cg] fix total flux BC for arbitrary advec/Neumann
ftschindler Feb 23, 2021
411a2dd
[discretizers.dunegdt] fix non-0 Neumann data handling
ftschindler Apr 21, 2021
219971f
fix typo
ftschindler May 7, 2021
166edd1
[bindings.dunegdt] add to_numpy() to DuneXTVector
ftschindler Jun 24, 2021
19d0836
[discretizers.dunegdt] improve CG
ftschindler Jun 24, 2021
2b8fad3
[bindings.dunegdt] fix vector_from_numpy()
ftschindler Aug 30, 2021
b8d92ac
[discretizers.dunegdt] update product assembly
ftschindler Aug 30, 2021
3eaa78c
[discretizers.dunegdt] fix assembly of trivial RHS
ftschindler Aug 30, 2021
4cc45bd
[discretizers.dunegdt] guard by correct indentation
ftschindler Aug 30, 2021
248d0e1
[discretizers.dunegdt] take care of shifting initial values
ftschindler Sep 1, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 78 additions & 0 deletions src/pymor/analyticalproblems/domaindescriptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,84 @@ def diameter(self):
return np.sqrt(self.width ** 2 + self.height ** 2)


class CubeDomain(DomainDescription):
"""Describes a cubic domain.

Boundary types can be associated with each face.

Parameters
----------
domain
List of two points defining the lower-left and upper-right corner
of the domain (per dimension).
left
The boundary type of the left side.
right
The boundary type of the right side.
top
The boundary type of the top side.
bottom
The boundary type of the bottom side.
front
The boundary type of the front side.
back
The boundary type of the back side.

Attributes
----------
domain
left
right
top
bottom
front
back
"""

dim = 3

def __init__(self, domain=([0, 0, 0], [1, 1, 1]), left='dirichlet',
right='dirichlet', top='dirichlet', bottom='dirichlet',
front='dirichlet', back='dirichlet'):
assert domain[0][0] <= domain[1][0]
assert domain[0][1] <= domain[1][1]
assert domain[0][2] <= domain[1][2]
for bt in (front, back, left, right, top, bottom):
if bt is not None and bt not in KNOWN_BOUNDARY_TYPES:
self.logger.warning(f'Unknown boundary type: {bt}')
domain = np.array(domain)
self.__auto_init(locals())
self.boundary_types = frozenset({left, right, top, bottom, front, back})

@property
def lower_left(self):
return self.domain[0]

@property
def upper_right(self):
return self.domain[1]

@property
def width(self):
return self.domain[1, 0] - self.domain[0, 0]

@property
def height(self):
return self.domain[1, 2] - self.domain[0, 2]

@property
def depth(self):
return self.domain[1, 1] - self.domain[0, 1]

@property
def volume(self):
return self.width * self.height * self.depth

@property
def diameter(self):
return np.sqrt(self.width ** 2 + self.height ** 2 + self.depth ** 2)


class CylindricalDomain(DomainDescription):
"""Describes a cylindrical domain.

Expand Down
Loading