Changelog¶
New in version 2.2 (2024-07-08)¶
Major changes¶
New feature: lid-based irregular frequencies removal. Add
lid_mesh
argument toFloatingBody
for irregular frequencies removal (PR 521). Addgenerate_lid()
method to generate lids (PR 477) andextract_lid()
method to extract lids from exernally defined meshes (PR 559). Add a warning to the user if irregular frequencies can be expected (PR 564).The compiled Fortran extension is not split into a
Delhommeau
and aXieDelhommeau
version anymore. The same effect is now achieved by the run-time parametergf_singularities
of the classDelhommeau
(PR 475). (The classXieDelhommeau
is kept for backward compatibility.). The new default method in infinite depth isgf_singularities="low_freq"
(formerlyXieDelhommeau
) instead ofgf_singularities="high_freq"
. The new one is expected to be more accurate near the surface and at low frequency (PR 566) The finite depth Green function is always computed using thelow_freq
variant, so thegf_singularities
parameter has no effect in finite depth. (PR 507). The tabulation stores the data of both variants and is thus slightly longer to initialize and slightly larger to store in memory (PR 543).Experimental support for panels on the free surface, when using
gf_singularities="low_freq"
. (PR 419)
Minor changes¶
Remove mesh resolution warning when the frequency is infinite (or the wavelength is zero) (PR 511).
When computing without a tabulation (
tabulation_nr=0
ortabulation_nz=0
), the value oftabulation_nb_integration_points
is actually used to compute Guével-Delhommeau exact formulation of the Green function. Previously, it was only used when precomputing a tabulation (PR 514).Add a new variant of the Green function integration
gf_singularities="low_freq_with_rankine_part"
as an experimental more accurate version of thelow_freq
variant (PR 510).Add a
tabulation_cache_dir
parameter toDelhommeau
to choose the directory in which the tabulation is saved on disk. IfNone
is provided instead, the tabulation is not saved on disk and is recomputed at each initialization of the class. Also, if this parameter is not set, look for theCAPYTAINE_CACHE_DIR
environment variable and use it to save the tabulation if it exists. (PR 516).Meshio objects can be directly passed to
load_mesh()
to get a Capytaine mesh (PR 555).Load gmsh v4 format .msh file using
cpt.load_mesh()
(when meshio is installed) (PR 556)
Bug fixes¶
Always use an odd number of points for integration with Simpson rule (PR 515). This bug was partly responsible for some high-frequency inaccuracy (GH 298).
mesh_vertical_cylinder()
used to return only half of the mesh when called withreflection_symmetry=True
(GH 529 and PR 530).Providing the frequency as a scalar coordinate in the test matrix does not result in the value being ignored anymore (GH 547 and PR 548).
Improve exception message when giving an unknown
radiating_dof
to aRadiationProblem
(PR 549).Fix issue due to breaking change in linear solver broadcasting in Numpy 2.0 (GH 550).
Remove warning mentioning missing divergence for rigid body dofs when computing hydrostatics (PR 487 and PR 570)
Internals¶
Update test environments used in noxfile and add
editable_install_requirements.txt
. (PR 498)Rename
tabulation_method
parameter ofDelhommeau
as the more descriptivetabulation_grid_shape
, and similarly for internal variables. (PR 503)Add
connected_components()
andconnected_components_of_waterline()
to split a mesh into connected components. (PR 554)
New in version 2.1 (2024-04-08)¶
Major changes¶
New feature: Approximate forward speed for single rigid body. A
forward_speed
parameter can now be provided toLinearPotentialFlowProblem
(or to the test matrix when usingfill_dataset()
) to compute the excitation force, added mass and radiation damping with forward speed of the body in the \(x\) direction. Note that theRadiationProblem
now accept awave_direction
parameter, which is only used whenforward_speed
is non zero to compute the encounter frequency. See the theory manual for references. (PR 376)Add rich as a dependency and improve formatting of the console output. Add
set_logging()
function to quickly set up logging with rich.solve_all()
andfill_dataset()
now display a progress bar (unless turn off by theprogress_bar
argument). (PR 382)Reimplement computation of added mass and radiation damping in infinite depth with zero or infinite frequency. (PR 385 and PR 485) When using forward speed, the added mass and radiation damping are undefined, but the forces can still be computed. (PR 483)
Implement direct method (source-and-dipole formulation) in obtaining velocity potential solutions. The direct method can be used instead of the default indirect method by setting the
method
argument ofsolve()
,solve_all()
orfill_dataset()
(PR 420)Add new shape for the grid used for the tabulation, based on the one used in Nemoh version 3. User can choose to use the Nemoh 3 grid shape (by default) or the former one by setting the
tabulation_method
parameter ofDelhommeau
. The new grid shape allows to set both the number of points (withtabulation_nr
andtabulation_nz
) and the extent of the tabulation (withtabulation_rmax
andtabulation_zmin
). The new default tabulation might lead to slightly different results, which are likely more accurate in the new version. (PR 439)
Minor changes¶
Support passing
FloatingBody
orFreeSurface
objects to post-processing methods such ascompute_potential()
andcompute_free_surface_elevation()
. (PR 379)Add
top_light_intensity
optional arguments torun()
andsave()
to illuminate the scene from top. (PR 380)Clean up
__str__
and__repr__
representation of many objects. Alsorich.print
now return even nicer representations. (PR 384)Always automatically compute and store the
excitation_force
next to theFroude_Krylov_force
anddiffraction_force
in the dataset (PR 406).Computing the RAO with
rao()
is not restricted to a single wave direction (or a single value of any other extra parameter) at the time anymore. (GH 405 and PR 406)New computation of quadrature schemes without relying on Quadpy. (PR 416)
Add a new function
run_cal_file()
to solve the problems defined by a Nemoh.cal file, exactly as the command-line interface is doing (PR 422).Rephrase mesh resolution warnings and group several of them together in a single warning. (PR 423)
Add block-Jacobi/coarse-correction preconditioner for large arrays of bodies. (PR 436)
The tabulation is saved on disk in a cache directory instead of being recomputed at each initialization of the solver. (PR 454)
Add a
faces_max_radius
argument to the predefined geometries frompredefined
to set up the resolution by giving a length scale for the panels (PR 459).Automatically clip the mesh (and display a warning) when a problem is initialized with a mesh above the free surface or below the sea bottom (PR 486).
Bug fixes¶
When initializing a body with a mesh having degenerate panels, the initialization of the dofs used to happen before the degenerate panels were removed, leading to an inconsistency between the number of panels in the mesh and in the dof definition. (GH 367 and PR 375)
Fix the single precision Green function (
cpt.Delhommeau(floating_point_precision="float32")
) that was broken in v2.0. (GH 377 and PR 378)Update the BEMIO import feature to work with Pandas 2.0 and output periods as now done in Capytaine 2.0. A version of BEMIO that works in recent version of Python and Numpy can be found at https://github.com/mancellin/bemio. (PR 381)
Fix
compute_pressure()
that was broken. (PR 394)Fix error message when computing hydrostatic stiffness of non-neutrally-buoyant body that is not a single rigid body. (GH 413 and PR 414)
Fix bug causing the quadrature method of a mesh to be forgotten when the mesh was put in a body.
quadrature_method
can now be passed as argument when initializing a new mesh. (PR 417)The function
load_mesh()
more robustly detects filetype using file extension even when the file extension is not lowercase. (PR 441)Fix bug with bodies translation or rotation when the rotation center or the center of mass had been defined as list or tuples instead of array (PR 472).
Internals¶
Add tentative build file for the Guix package manager (PR 339).
Fix badly named variables
VSP2_SYM
andVSP2_ANTISYM
in libDelhommeau (PR 391)Remove dependency to
hypothesis
for testing (PR 391).Change how forces are stored in result objects. Added mass and radiation damping can now be queried with
added_mass
andradiation_damping
and not only the plural forms that were used nowhere else in the code. (PR 393)Use nox to test the code in isolated virtual environments. (PR 401)
Fortran source files are not included in wheel anymore (PR 360).
The
delete_first_lru_cache
decorator has been renamedlru_cache_with_strict_maxsize()
and now supports keyword arguments in the memoized function (PR 442).Fix Xarray future warning about Dataset.dims (GH 450 and PR 451).
Improve some warnings and error messages.
New in version 2.0 (2023-06-21)¶
Major changes¶
User can specify a period, a wavelength or a wavenumber instead of an angular frequency
omega
when setting up a problem or a test matrix. If several types of frequency data are provided, an error is raised (PR 283).Breaking The normalization of radiation problems has been changed to use the same normalization as diffraction problems. Added mass and radiation dampings are unchanged, but other outputs of radiation problem (free surface elevation, kochin functions, etc.) may differ from previous version by a factor \(-j \omega\). (GH 173 and PR 348)
Breaking The above two points interfered with the handling of \(\omega = 0\) and \(\omega = \infty\) cases. They have been temporarily disabled and will return in a future release.
Add methods
compute_potential()
,compute_velocity()
andcompute_free_surface_elevation()
andcompute_pressure()
to compute the value of some fields in the domain in post-processing. Their signature has been uniformized with theairy_waves_potential()
andairy_waves_velocity()
functions (PR 288, PR 326). New functionsairy_waves_free_surface_elevation()
andairy_waves_pressure()
have also been added (PR 293).Breaking The problems can now be initialized by setting a
water_depth
instead of thesea_bottom
(which is still available for user-facing functions). This change is meant to uniformize notations in the code and usewater_depth
wherever possible (PR 340). Besides thesea_bottom
argument of many internal routines has been completely replaced bywater_depth
. Migrating then requires changing the sign of the float (PR 347).Add Github Actions workflow to build wheels. Precompiled packages will now be available with
pip
and not only withconda
.
Minor changes¶
Support the new format of Nemoh.cal file from Nemoh v3 (GH 278 and PR 280).
Breaking Remove the
convention
parameter to compute excitation force with WAMIT conventions (GH 133 and PR 281). Changing the convention to compare the outputs of different codes is better done by a dedicated software such as BEMRosetta or BEMIO.Add nicer display for Capytaine objects in IPython shell (GH 227 and PR 287).
Support exporting hydrostatics data in original Nemoh-format files -
Hydrostatics.dat
andKH.dat
(PR 285).Add nicer display for Capytaine objects in IPython shell (GH 227 and PR 287)
Add functions
load_PNL()
andwrite_PNL()
to load and write meshes in HAMS.pnl
format (PR 289).Breaking Remove
cpt.Nemoh()
class that was replaced byBEMSolver
in version 1.1 (PR 291)Breaking Remove
full_body
attribute fromFloatingBody
that used to keep a copy of the body before clipping in-place (PR 302).Breaking Remove
dimensionless_wavenumber
anddimensionless_omega
attributes fromLinearPotentialFlowProblem
as they are not used in the code and can be easily recomputed by users if necessary (PR 306).Add
minimal_computable_wavelength()
to estimate the wavelengths computable with the mesh resolution (PR 341).Slightly increase default tabulation size to avoid some high-frequency issues such as GH 157 (PR 353).
Bug fixes¶
Fix
immersed_part()
(PR 307).compute_hydrostatics()
used to fail for non-rigid bodies because it could not compute the rigid-body inertia. The rigid-body inertia is now just skipped for bodies with no rigid-body dofs (PR 308).Reduce the default tolerance of the mesh clipper for points just above the free surface (GH 320 and PR 322).
Convert
center_of_mass
androtation_center
to arrays inFloatingBody
constructor to avoid a few issues (GH 319 and PR 325).Fix bug (leading to either
RuntimeError
or wrong output) when clipping with plane that does not contain the origin. (PR 344)Instances of
BEMSolver
initialized with default parameters do not share the same engine, hence they do not share the same cache. This minor issue was causing minor interferences in some benchmarks (GH 295 and PR 350).
Internals¶
Major update of the compilation toolchain because of the upcoming deprecation of
numpy.distutils
. Capytaine is now built withmeson-python
.The method
evaluate()
(and its counterparts for other Green functions) now accepts a list of points as first argument instead of a mesh. It has now an optional boolean argumentearly_dot_product
to return the integrals of the gradient of the Green function and not only the normal derivative (PR 288).Remove warnings due to 0/0 divisions in
compute_faces_properties()
(PR 310)Breaking Remove unused and undocumented code about meshes, including
mesh.min_edge_length
,mesh.mean_edge_length
,mesh.max_edge_length
,mesh.get_surface_integrals
,mesh.volume
,mesh.vv
,mesh.vf
,mesh.ff
,mesh.boundaries
,mesh.nb_boundaries
,compute_faces_integrals
,SingleFace
. (PR 334)Add analytics to the documentation using `https://plausible.io`_ (PR 290).
New in version 1.5 (2022-12-13)¶
Major changes¶
The
XieDelhommeau
implementation of the Green function has been improved. The implementation used to be almost the same as the defaultDelhommeau
method. A missing key element has been added and theXieDelhommeau
is now actually more accurate near the free surface. (PR 180 and PR 216)New default linear solver
LUSolverWithCache
: the LU decomposition of the matrix is now cached to be reused for other similar problems, diminishing the total computation time up to 40%. (PR 235)New functions to generate simple geometric meshes have been implemented in
capytaine.meshes.predefined
. They are similar to the former geometric bodies (Sphere
,HorizontalCylinder
, etc.), except that they return a mesh and do not create aFloatingBody
. The geometric body classes are considered deprecated, although they should still work as expected. (PR 233)Changed the behavior of
compute_hydrostatics()
. The mesh is not silently modified anymore. The stiffness and inertia matrices are stored in the body for inclusion in the output dataset. The inertia matrix is now computed on the full mesh (GH 197, GH 249, GH 258 and PR 262).
Minor changes¶
Add
floating_point_precision
argument toDelhommeau()
andXieDelhommeau()
that accepts either"float32"
for single precision computations or"float64"
for double precision computations (the latter is the default). (PR 224).Passing the argument
tabulation_nr=0
ortabulation_nz=0
toDelhommeau
orXieDelhommeau
now allows to run the code without interpolating the Green function from a precomputed tabulation. This is meant as a tools for benchmarks and validation, since it decreases the performance of the code for often no accuracy gain. (PR 229)load_mesh()
is now exported by the main namespace:from capytaine import load_mesh
. The documentation has been changed to recommend the use of this function instead offrom_file()
. (PR 231)When initializing a
FloatingBody
, one can now pass directly a mesh object frommeshio
. The documentation has been changed to recommend this approach instead offrom_meshio()
. (GH 259 and PR 261)When joining two bodies as e.g.
body1 + body2
, some hydrostatic properties are passed to the resulting body: if all the bodies have hydrostatic stiffness matrices or inertia matrices defined, then they are assigned to the joined body as a larger block diagonal matrix (PR 243).Add
immersed_part()
method to clip the body without modifying it in place (PR 244).Add
rigid_body_dofs()
method returning a placeholder that can be given at the creation ofFloatingBody
to initialize the six rigid body dofs (PR 245).Custom classes from the
capytaine.matrices
module storing block matrices or data-sparse matrices can be transformed into full Numpy arrays withnp.array(...)
(PR 99)Add
Dockerfile
and instructions to install with Docker (PR 137)Add optional arguments to
write_GDF()
to write parametersulen, grav, isx, isy
to the mesh file (PR 241)Several surface integrals properties of
FloatingBodies
are also defined on meshes, such asvolume
orcenter_of_buoyancy
(pull:263).
Internals¶
The integration of the pressure on the mesh of the body was implemented twice independently. It has been factored out in
integrate_pressure()
(PR 218)__rmatmul__ has been implemented for low rank matrices (PR 222).
New implementation of the GDF mesh file reader
load_GDF()
(PR 241)
New in version 1.4.2 (2022-10-03)¶
Bug fixes¶
Raise error message when calling
compute_hydrostatics()
without a center of mass defined (PR 207).Fix bug when cropping body with a dof defined manually as a list of tuples (GH 204 and PR 206).
Documentation¶
Internals¶
Replace the Fortran core by a git submodule pointing to libDelhommeau (PR 208). Future developments of the Green function will take place there.
Move from Travis CI to Github Actions for continuous integration (PR 209)
New in version 1.4.1 (2022-09-05)¶
Bug fixes¶
Fix bug in hydrostatics of rigid bodies: the hydrostatic matrices were always assuming that the rotation dofs were defined around the \((0, 0, 0)\) point. The stiffness and inertia matrix are now invariant by horizontal translation of the body, as they should be. (GH 178 and PR 196).
Removed outdated volume/area methods from pre-defined bodies (PR 183).
Added symmetric realization and reflection to gdf mesh import (GH 186 and PR 187).
Fix some automatic mesh names (PR 195)
Fix ordering of the dofs when using
assemble_regular_array()
(GH 198 and PR 199)Return more explicit error message when the center of mass is missing for the computation of rigid-body hydrostatics (PR 201).
Return error message when trying to animate a body with a dof that has not been defined. Previously, undefined dofs were silently ignored. (PR 202)
New in version 1.4 (2022-07-07)¶
Major changes¶
The function that used to be called
impedance
is now namedrao_transfer_function()
. The new functionimpedance()
is the actual impedance matrix (PR 142, GH 147, PR 149).The mass matrix of a floating body used to be denoted
mass
. It is now denoteinertia_matrix
. The attributebody.mass
is now used instead for the (scalar) mass of the body. (PR 165)Implementation of
Sphere
has changed. The use of symmetry is now controlled by theaxial_symmetry
keyword argument. Theclever
keyword argument is deprecated forSphere
and should be replaced by the more explicit keyword argumentsaxial_symmetry
. Meanwhile, a bug has been fixed with itsgeometric_center
(PR 150).The default linear solver is the direct solver and not the iterative solver GMRES, because it is more robust and more predictable. Nothing changes when users explicitly choose a linear solver. (PR 171)
Bug fixes¶
Fix major bug in impedance matrix and RAO computation: the sign of the dissipation matrix was wrong in previous versions (GH 102 and PR 140).
Fix major inaccuracy for deep panels or high frequencies, that is panels deeper than \(1.2\lambda\) below the free surface where \(\lambda\) is the wavelength (GH 38 and PR 156)
Wave directions in
Nemoh.cal
are interpreted as degrees as they should be (and then converted to radians to be handled by the rest of the code). (PR 141)Fix bug in rotations around axis that does not pass by (0, 0, 0) (GH 151 and PR 152).
New implementation of the mesh importer for
hst
files. (PR 90) It should be more robust and support more variants of thehst
mesh file format.Support for quadratures from quadpy has been updated to support the version 0.16.16 of quadpy (PR 164).
New features¶
Add method to compute some of the hydrostatic parameters such as volume, buoyancy center, wet surface area, hydrostatic stiffness, inertia matrix etc.
compute_hydrostatics
method is created to return all hydrostatic parameters similar tomeshmagick.hydrostatics.compute_hydrostatics
(PR 106). By default, the hydrostatics are computed assuming a neutrally buoyant body (its mass is the displaced mass of water). Non-neutrally buoyant are partially supported, by setting themass
attribute of the body (PR 166)Add new parallelization using the joblib library as a new optional dependency. The optional keyword-argument
n_jobs
in thesolve_all()
andfill_dataset()
controls the number of processes running in parallel (PR 136). By default, this parallelisation is disabled (PR 172).Refactor Delhommeau’s method for the Green function evaluation. The size of the tabulation is not hard-coded anymore and can be changed by users. (GH 20 and PR 157)
Method
show_matplotlib
can now colour mesh faces based on a specified scalar field (e.g. pressure) (PR 122).The functions
problems_from_dataset()
andfill_dataset()
accept a body alone as input. That is, one can usefill_dataset(test_matrix, body)
and not onlyfill_dataset(test_matrix, [body])
(PR 144).
Documentation and error handling¶
- Improve feedback to users:
Print a warning if the user provides a
wave_direction
that is not in the range [-2π, 2π]. (PR 141)Raise an error when the Green function evaluation returns a
NaN
(PR 143).Improve message when the GMRES did not converge (PR 143).
Raise an error when a body with an empty mesh is given to
LinearPotentialFlowProblem
(GH 128 and PR 145).Print a warning when a key is unknown in the test matrix provided to
fill_dataset()
(PR 155).Raise an error if neither
radiating_dof
(for radiation problems) norwave_direction
(for diffraction problems) is provided in the test matrix infill_dataset()
(PR 155).
A new example using Haskind’s relation has been added to the cookbook (PR 129).
Miscellaneous improvements of the documentation.
New in version 1.3 (2021-10-07)¶
Major changes¶
The mesh are always “healed” when a new
FloatingBody
is initialised (i.e. unused vertices are removed, degenerate triangles are removed, etc.). See for instance GH 46.Implementation of symmetries for
HorizontalCylinder
has changed. The cylinder is now a reflection of two halves containing translational repetition of half rings, instead of a translational repetition of symmetric ring. By default, only reflection symmetry is used. (PR 91) The use of symmetries can be controlled withtranslation_symmetry
andreflection_symmetry
optional keyword arguments. Theclever
keyword argument is deprecated forHorizontalCylinder
and should be replaced by the new more explicit keyword arguments above.
New features¶
Add method
FloatingBody.from_meshio
to import meshio and pygmsh mesh objects (PR 62)Add method
FloatingBody.assemble_arbitrary_array
to make an array of bodies with arbitrary layout (PR 71).Break out impedance from RAO to separate function (GH 61 and PR 63).
Method problems_from_dataset can now use a list of gravitational acceleration g values in the test matrix (PR 86).
Add example in cookbook for computing hydrostatics and mass properties with Meshmagick 2 (PR 70).
Bug fixes¶
Fix bug in free surface elevation computation when the number of faces in the free surface mesh is not a multiple of the chunk size, that is by default a multiple of 50 (PR 82).
The function
assemble_dataset
did not support well the problems without a free surface. In the new version, such problems are explicitly ignored and a warning message is displayed. (GH 88 and PR 89).Fix bug in some of the mesh readers/writers when using pathlib path objects (PR 87).
Function
load_GDF
has been rewritten to accept any GDF file format (PR 97).
Internal and development¶
New in version 1.2.1 (2021-04-14)¶
New in version 1.2 (2020-04-24)¶
Experimental implementation of higher order quadratures for the integration of the Green function on the mesh. Default behavior is still the first order integration as in Nemoh.
Add method
FloatingBody.animate
to quickly visualize the motion of a body and add methodAnimation.embed_in_notebook
to embed animations in Jupyter notebooks.Keep the order of the dofs in xarray’s Datasets. This patch uses the CategoricalIndex feature of xarray which was buggy before version 0.15.1 of xarray. Thus this minimal version is now required.
Add missing Kochin function for the diffraction. (See GH 22.) In previous version the variable named
kochin
in the dataset was only the Kochin function for the radiated waves. A new variable nameskochin_diffraction
has been added. The existing variablekochin
has not been renamed, for backward compatibility, but might be in a future release of Capytaine.Improvement of caching to limit RAM usage for large problems.
Make optional the dependency to graphical packages (matplotlib and vtk). They were causing issues to some users.
problems_and_results.py
has been rewritten to be slightly more readable and remove the dependency to attrs.
New in version 1.1 (2019-09-24)¶
Major changes¶
Refactoring of the implementation of the solver. The new implementation separates the solver itself from the evaluation of the Green function and the matrix building engine. This more modular structure allows user to choose separately the Green function and the matrix engine that they want to use.
The former API (
Nemoh()
object) has been kept for backward compatibility. In most cases, replacingNemoh()
byBEMSolver()
is sufficient to migrate to the new structure.See Resolution for the full documentation of the new structure and Cookbook for examples.
Add Xie’s variant of Delhommeau’s Green function
XieDelhommeau
[X18].The option cache_rankine_matrices has been removed. It was impeding the performance and modularity of the code for a very low gain. It might be reimplemented in a future version if there is really a need for it.
Minor changes¶
Minor performance improvements.
Fix Github issue #18.
Improve test suite.
New in version 1.0.1 (2019-03-28)¶
Minor changes¶
Fix compilation flags for OpenMP
Minor corrections in the documentation.
New in version 1.0 (2019-03-14)¶
Major changes¶
The
angle
parameter has been renamed to the more accurate namewave_direction
.Most of the modules have been reorganized in several packages. See the Overview of the modules for some details.
Test compatibility of the code with Python 3.7 and numpy 1.16.
Remove a couple of unmaintained or unfinished submodules.
Minor changes¶
General¶
Many improvements of the documentation.
Reorganization of some of the tests.
Various small performance improvement.
Mesh and bodies¶
Rename
center
into eithergeometric_center
orcenter_of_mass
depending of the case.New method for geometric bodies
rotate_around_center_to_align_vectors
replacingrotate_to_align_axes
.Add methods
sliced_by_plane
andminced
for hierarchical decomposition of the mesh.Symmetric meshes classes have been renamed:
ReflectionSymmetry -> ReflectionSymmetricMesh etc.
Plane are now oriented: they are equal only if their normal point in the same direction.
Solver¶
Store solver settings in output dataset.
Rename setting
use_symmetries
intohierarchical_toeplitz_matrices
.Fix bugs and improve implementation of the Adaptive Cross Approximation.
New in version 0.6 (2019-02-11)¶
Major changes¶
Full rewrite of the matrices and linear solvers implementation. All the relevant code is now in the submodule
capytaine.matrices
.Refactored implementation of block Toeplitz matrices, block symmetric Toeplitz matrices and block circulant matrices. Refactoring of the block diagonalization of block circulant matrices through FFT.
Low rank approximation of the matrices with Adaptive Cross Approximation for the use of hierarchical matrices.
Option to solve the linear system with GMRES instead of a direct solver.
Refactoring of the 3D animation module for animation of the body motions, animated colormap of the pressure, free-surface elevation and export as a video. See cookbook for an example of the new API.
Minor changes¶
General¶
Reorganization of the
pytest
directory.Add an experimental
capytaine.tools.rao
module to compute Response Amplitude Operators.Various bug fixes and improvements of the documentation.
Solver¶
More options to set the behavior of the solver at run time
Nemoh
(use of symmetries, use of caching, choice of the linear solver, …). See its docstring for details.Change of default behavior: the solver stores the details in the
Result
container when usingsolve
, not when usingsolve_all
orfill_dataset
.The water density can be specified in the test matrix when using
fill_dataset
.Function
kochin_dataset
to build a xarray of Kochin function.Add the option
chunk_size
to the computation of the free surface elevation in order to limit the RAM consumption.Minor refactoring of the solver and the computation of the Green function.
Meshes and bodies¶
CollectionOfMeshes is not a subclass of Tuple anymore.
New method
assemble_regular_array
to build an array of identical bodies.Harmonize naming of functions that are not in-place:
symmetrize -> symmetrized
,merge -> merged
Refactoring of the internals of the mesh clipper. New
clip
andclipped
methods for meshes and bodies. When a body is clipped withclip
orkeep_immersed_part
, the dofs are updated.Change naming of dof when bodies are joined:
body_name__dof_name
instead ofbody_name_dof_name
.The combination of bodies with
+
is associative with respect to the names of the dofs.Minor improvements of meshes and bodies
repr
.
New in version 0.5.1 (2018-10-17)¶
Minor bugs fixes.
Small performance improvements.
Update documentation.
New in version 0.5 (2018-09-18)¶
Major changes¶
Experimental OpenMP parallelization of the computation of the influence matrices. The parallelization in
solve_all
has been removed.Integration of a refactored subset of Meshmagick into Capytaine as the
mesh
submodule. Meshmagick is not a dependency any more.Reorganization of the submodules:
capytaine.mesh_collection -> capytaine.mesh.meshes_collection
capytaine.symmetries -> capytaine.mesh.symmetries
capytaine.cli -> capytaine.ui.cli
capytaine.tools.vtk -> capytaine.ui.vtk
capytaine.tools.mpl_free_surface_animation -> capytaine.ui.mpl_free_surface_animation
capytaine.tools.import_export -> capytaine.io.legacy
capytaine.tools.bemio -> capytaine.io.bemio
meshmagick.mmio -> capytaine.io.mesh_loaders and capytaine.io.mesh_writers
Minor changes¶
Solver¶
Reorganization of the internals of the solver
Nemoh.py
andNemohCore
. The initialization optionskeep_matrices
andmax_stored_exponential_decompositions
have been removed. The former has been replaced by amatrix_cache_size
optional argument (default value: 1).Support of \(\omega=0\) and \(\omega=\infty\) in the infinite depth case.
The wavenumber is not computed in Fortran anymore.
Outputs¶
Some body properties are stored in xarray dataset if they are available. New functions
add_wavenumber_coords
andkochin_data_array
allow the storage of wavenumbers and Kochin function in the dataset.New functions
separate_complex_values
andmerge_complex_values
incapytaine.io.xarray
to better handle complex values when saving datasets.New function
problems_from_dataset
to generate a list of problems from the coordinates of a xarray dataset. New methodfill_dataset
incapytaine.Nemoh.Nemoh
using the above.New function
write_dataset_as_tecplot_files()
incapytaine.tools
for legacy Tecplot output.
Meshes¶
Refactoring of the transformation methods (
translate
,rotate
,mirror
, …).They are still in place by default, although they now return a reference to the modified object.
They can return a new object by passing the argument
inplace=False
or by using the variantstranslated
,rotated
,mirrored
.rotate
androtated
requires anAxis
object as argument. Old behavior can be found inrotate_angles
androtated_angles
.get_immersed_part
is inplace by default. Useinplace=False
to return a new object.
add_rotation_dof
now requires an Axis object.New method
tree_view()
for meshes to display the structure of hierarchical collections of meshes.CollectionOfMeshes
andSymmetricBodies
are now subclasses fromtuple
. New methodsjoin_meshes
to merge several symmetric bodies with the same symmetries as a single symmetric body.Various improvements in
geometric_bodies
submodule, especially forRectangle
andRectangularParallelepiped
. They can now be generated with reflections symmetries instead of translation symmetries. NewVerticalCylinder
class.Refactored mesh objects can be checked for equality and are hashable. The method is experimental and can be improved.
New in version 0.4 (2018-08-04)¶
New features¶
Documentation and new usage examples.
Computation of Kochin coefficients.
Cleverer helper functions to define degrees of freedom.
Major changes¶
Backward-incompatible change of the way the degrees of freedom are stored.
Minor changes¶
Double precision computations.
Improvement of
assemble_dataset
for parametric studies.Support clipping of collections of meshes.
Fixes in geometrical bodies generation.