Releases: Morpho-lang/morpho
v0.6.3
We're pleased to announce Morpho 0.6.3, which contains a number of improvements and represents the first steps towards cross-platform compatibility.
Additional finite elements
Morpho now provides finite element types beyond the linear Lagrangian elements (CG1) used previously. Quadratic Lagrangian elements (CG2) are implemented for fields on 1, 2 and 3D elements, and we will provide additional elements in future releases. Interpolated gradients are available for all element types.
Preliminary Windows build
The Morpho library and terminal app now can be natively built on Windows using Clang. To enable this, Morpho has been significantly refactored to isolate platform-specific code in a single location.
We will provide a Windows installer and binaries in future releases once morphoview has also been ported.
Self is not longer necessary for invocations
It is no longer required to use the self keyword to invoke a method call, i.e.
self.foo()
can be replaced with:
foo()
Local variables take precedence over method labels, so that
var foo = "hi"
foo()
raises an error even if foo is a method in the same class.
Minor fixes
- Improvements to the adaptive quadrature routines, which now use better rules by default and report clearer error messages.
- Many improvements to the test suite, with tests more clearly structured.
- String parsing now unicode aware.
- AreaIntegral now supports an experimental option weightByReference, which weights the integral by a reference mesh, rather than the target mesh (this is useful for some elasticity problems).
v0.6.2
We're pleased to announce Morpho 0.6.2, which is primarily a maintenance release and incorporates a number of bugfixes and improvements.
Morphopm package manager
Alongside this release, we are pleased to announce a new package manager for morpho called morphopm, which makes installation of morpho packages significantly easier for users. Morphopm is available on github and can also be installed via homebrew:
brew tap morpho-lang/morpho
brew install morpho-morphopm
Benchmarks
The benchmarks folder, which used to contain a number of basic benchmarks for morpho, has been moved to a new repository with several new benchmarks added. We will be using these to continue to improve morpho's performance.
Ternary operator
Morpho now provides the ternary operator similar to other C-family languages:
var a = (b < c ? b : c)
Minor fixes
- Keywords can now be used as method and property labels.
- The povray module now produces silent output on linux if the quiet option is set.
- apply() now works properly with metafunctions.
- Bugfixes in the Sparse class.
- Improvements to resource locator.
- Fixes to multiple dispatch with variadic parameters.
- Fixes to Range class.
- Morpho running the test suite now passes valgrind memory checker.
- meshtools now explicitly checks that the Mesh generated isn't too large.
v0.6.2
Release notes for 0.6.2
We're pleased to announce Morpho 0.6.2, which is primarily a maintenance release and incorporates a number of bugfixes and improvements.
Morphopm package manager
Alongside this release, we are pleased to announce a new package manager for morpho called morphopm, which makes installation of morpho packages significantly easier for users. Morphopm is available on github and can also be installed via homebrew:
brew tap morpho-lang/morpho
brew install morpho-morphopm
Benchmarks
The benchmarks folder, which used to contain a number of basic benchmarks for morpho, has been moved to a new repository with several new benchmarks added. We will be using these to continue to improve morpho's performance.
Ternary operator
Morpho now provides the ternary operator similar to other C-family languages:
var a = (b < c ? b : c)
Minor fixes
- Keywords can now be used as method and property labels.
- The povray module now produces silent output on linux if the quiet option is set.
- apply() now works properly with metafunctions.
- Bugfixes in the Sparse class.
- Improvements to resource locator.
- Fixes to multiple dispatch with variadic parameters.
- Fixes to Range class.
- Morpho running the test suite now passes valgrind memory checker.
- meshtools now explicitly checks that the Mesh generated isn't too large.
v0.6.1
Release notes for 0.6.1
We're pleased to announce Morpho 0.6.1, which incorporates very important new language features and sets morpho up for future improvements.
Types
Morpho now supports types. Variables can be declared with a specified type like so
String s = "Hello"
and the type of function parameters can be specified like
fn f(String s, List l) { }
Multiple dispatch
Morpho now supports multiple dispatch, whereby you can define multiple implementations of a function that accept different parameter types. The correct implementation to use is selected at runtime:
fn f(String x) { }
fn f(List x) { }
Methods defined on classes also support this mechanism. You can still specify parameters that without a type, in which case all types are accepted. Multiple dispatch is implemented efficiently (it incurs only a small overhead relative to a traditional function call) and is very useful to remove complex type checking. We are using this feature to improve how morpho works internally, as well as to implement new morpho packages.
Additional hessians
LineCurvatureSq and LineTorsionSq now provide the hessian() method.
Preliminary support for finite element discretizations
We have begun to include support for additional discretizations beyond the linear elements supported by prior versions of Morpho in the codebase. This feature is a work in progress and not yet completely ready for use; we expect to complete it in forthcoming releases.
Minor fixes
- Bugfixes to parallelization.
- Bugfixes to sparse linear algebra.
- Error messages now refer to the module in which the error was found.
- Can now call throw() and warning() directly on the Error class.
v0.6.1
Release notes for 0.6.1
We're pleased to announce Morpho 0.6.1, which incorporates very important new language features and sets morpho up for future improvements.
Types
Morpho now supports types. Variables can be declared with a specified type like so
String s = "Hello"
and the type of function parameters can be specified like
fn f(String s, List l) { }
Multiple dispatch
Morpho now supports multiple dispatch, whereby you can define multiple implementations of a function that accept different parameter types. The correct implementation to use is selected at runtime:
fn f(String x) { }
fn f(List x) { }
Methods defined on classes also support this mechanism. You can still specify parameters that without a type, in which case all types are accepted. Multiple dispatch is implemented efficiently (it incurs only a small overhead relative to a traditional function call) and is very useful to remove complex type checking. We are using this feature to improve how morpho works internally, as well as to implement new morpho packages.
Additional hessians
LineCurvatureSq and LineTorsionSq now provide the hessian() method.
Preliminary support for finite element discretizations
We have begun to include support for additional discretizations beyond the linear elements supported by prior versions of Morpho in the codebase. This feature is a work in progress and not yet completely ready for use; we expect to complete it in forthcoming releases.
Minor fixes
- Bugfixes to parallelization.
- Error messages now refer to the module in which the error was found.
- Can now call throw() and warning() directly on the Error class.
v0.6.0
Release notes for 0.6.0
We're pleased to announce Morpho 0.6.0, which represents a great deal of behind-the-scenes work to ready the Morpho codebase for future developments. See our Roadmap document for more details.
Morpho now built as a shared library
Rather than the previous monolithic strucutre, the Morpho codebase has been divided into a shared library ("libmorpho") and a terminal application ("morpho-cli"). This means that Morpho can easily be embedded in other applications, and improves maintainability as these components can be updated separately. Morphoview has been migrated to a separate repository.
Internal improvements
- Major code reorganization to improve the logical structure and maintainability of the morpho codebase.
- Transitioned to Cmake build system to improve cross-platform compilation.
- Rewritten parser to improve error reporting and enable reuse across Morpho.
Improved quadrature
Functionals like LineIntegral, AreaIntegral and VolumeIntegral can now make use of a greatly improved quadrature routine. This will become the default in future versions of Morpho. Particularly in 3D, the new routine offers significantly improved performance, and can be extended in future. To use the new quadrature routine simply set the method optional argument:
var a = AreaIntegral(integrandfn, method = {})
The method Dictionary can specifically request particular quadrature rules or orders; more information will be in the dev guide.
Namespaces
You can now use the import keyword with a new keyword, as, to import the contents of a module into a given namespace:
import color as col
print col.Red
This helps Morpho programs avoid library conflicts and improves modularization.
Tuple data type
Morpho now supports Tuples, an ordered immutable collection. The syntax is similar to Python:
var t = (0,1,2,3)
Tuples act much like Lists, but can be used as keys in a Dictionary.
JSON import and export
Morpho now provides a JSON class which supports import and output using the JavaScript Object Notation (JSON) format, widely used for data interchange.
var a = JSON.parse("[1,2,3]")
print a
Minor new features
- Formatted output for numbers is now available using the
formatmethod on theIntandFloatclasses. - Errors can now be raised as "warnings", which are alerts to the user that do not interrupt execution.
Improved documentation
Many previously un- or under-documented features have now been added to the interactive help. If you notice something that isn't well documented, please alert us via the issue tracker in Github.
Minor fixes
- Many improvements to the debugger, including better support for printing object properties.
- Improved calculation of derivatives.
- Bugfixes to closures, string interpolation, parallel force and energy calculations and many others.
v0.6.0 prerelease
Prerelease for v0.6.0.
v0.5.7
0.5.7 is the final release in the 0.5 series. This release contains a number of improvements and bugfixes:
Windows install instructions fixed
We have updated the installation instructions for Windows with this release to work with either WSL1 or WSL2.
Gradients in AreaIntegral and VolumeIntegral
You can now compute the local gradient of a field using the grad() function within the integrand supplied to AreaIntegral and VolumeIntegral. This significantly enhances the number of models morpho can handle.
Improved System class
-
System.print(), System.readline() and System.sleep() methods added.
-
System.clock() now reports wall time (useful for testing the effect of parallelization)
-
System.arguments() provides access to the command line options morpho was run with.
Minor improvements
-
New Matrix.roll() and List.roll() methods shift the contents of a List or Matrix respectively.
-
Field.linearize() provides access to the underlying Matrix store.
-
IdentityMatrix() constructor function.
-
Debugger now supports printing of global variables and object properties.
-
Fix issues with compilation on some platforms.
-
Experimental support for accessing integrand values for individual elements on some functionals.
-
Numerous minor bugfixes.
v0.5.6
- Parallelized force and energy calculations
- New ways to extend morpho
- New manual chapter on visualization
- Many improvements and bugfixes
Parallelized Force and Energy calculations
Morpho now supports parallelized force and energy calculations, which can lead to significant speedups for some programs. To use these, run morpho with -w flag and supply the number of worker threads to use:
morpho5 -w4 program.morpho
Further features for parallel programming will appear in future releases.
Resources and Packages
The morpho runtime can now look for resource files---help files, morpho files, etc.---in multiple places. The default location is now configurable at installation, and also via a .morphopackages file stored in the user home directory. This enables morpho modules to live in their own git repository, together with resource files, and should make it easier for users to contribute to morpho. More details are in the dev guide.
Extensions
It's now possible to extend morpho through dynamic libraries written in C and linked at runtime. From the user's perspective, these work just like modules using the import keyword.
New manual chapter on visualization
We continue to improve the manual, and now include a chapter on visualization. The developer guide has also been updated.
Other improvements
- Improvements to morpho's object model. New Function, Closures and Invocation classes provided that respond to standard methods.
- Fixes to some functionals to work correctly with 2D meshes.
- You can now supply anonymous functions in the arguments to a function.
- You can set the minimum and maximum values for plotfield using the optional cmin and cmax and arguments.
- Manual contains additional information on installation
Morpho 0.5.6 Release candidate 1
Morpho 0.5.6 includes:
Parallelized Force and Energy calculations
Morpho now supports parallelized force and energy calculations, which can lead to significant speedups for some programs. To use these, run morpho with -w flag and supply the number of worker threads to use:
morpho5 -w4 program.morpho
Further features for parallel programming will appear in future releases.
Resources and Packages
The morpho runtime can now look for resource files---help files, morpho files, etc.---in multiple places. The default location is now configurable at installation, and also via a .morphopackages file stored in the user home directory. This enables morpho modules to live in their own git repository, together with resource files, and should make it easier for users to contribute to morpho. More details are in the dev guide.
Extensions
It's now possible to extend morpho through dynamic libraries written in C and linked at runtime. From the user's perspective, these work just like modules using the import keyword.
Other improvements
- Improvements to morpho's object model. New Function, Closures and Invocation classes provided that respond to standard methods.
- Fixes to some functionals to work correctly with 2D meshes.
- You can now supply anonymous functions in the arguments to a function.
- You can set the minimum and maximum values for plotfield using the optional cmin and cmax and arguments.
- Manual contains additional information on installation