Difference between revisions of "Comsol mesh.m"

From Spinach Documentation Wiki
Jump to: navigation, search
(Created page with "{{DISPLAYTITLE:comsol_mesh.m}} __NOTOC__ Imports ASCII 2D mesh files produced by COMSOL. ==Syntax== spin_system=comsol_mesh(spin_system,file_name) ==Arguments== s...")
 
(Sync syntax/arguments/outputs with current Spinach source)
Line 1: Line 1:
 
{{DISPLAYTITLE:comsol_mesh.m}} __NOTOC__
 
{{DISPLAYTITLE:comsol_mesh.m}} __NOTOC__
 +
 
Imports ASCII 2D mesh files produced by COMSOL.
 
Imports ASCII 2D mesh files produced by COMSOL.
  
 
==Syntax==
 
==Syntax==
  
−
    spin_system=comsol_mesh(spin_system,file_name)
+
mesh=comsol_mesh(file_name)
  
 
==Arguments==
 
==Arguments==
  
−
    spin_system - Spinach spin system object
+
file_name    - a character string
−
   
+
 
−
    file_name    - a character string
+
  Ouputs:
 +
 
 +
      mesh.x, mesh.y      - column vectors with vertex
 +
                            coordinates
 +
 
 +
      mesh.idx.edges      - two-column array of integers
 +
                            containing edge index
 +
 
 +
      mesh.idx.triangles - three-column array of integers
 +
                            containing triangle index
 +
 
 +
      mesh.idx.rectangles - four-column array of integers
 +
                            containing rectangle index
 +
 
 +
ilya.kuprov@weizmann.ac.il
 +
a.acharya@soton.ac.uk
  
 
==Outputs==
 
==Outputs==
Line 29: Line 45:
  
 
==See also==
 
==See also==
 +
 
[[Import,_export,_and_visualisation#Microfluidic_mesh_import_and_plotting|Microfluidic mesh import and plotting]]
 
[[Import,_export,_and_visualisation#Microfluidic_mesh_import_and_plotting|Microfluidic mesh import and plotting]]
  
  
 
''Version 2.8, authors: [[Anupama Acharya]], [[Ilya Kuprov]]''
 
''Version 2.8, authors: [[Anupama Acharya]], [[Ilya Kuprov]]''

Revision as of 14:01, 5 April 2026


Imports ASCII 2D mesh files produced by COMSOL.

Syntax

mesh=comsol_mesh(file_name)

Arguments

file_name - a character string

Ouputs:
      mesh.x, mesh.y      - column vectors with vertex
                            coordinates
      mesh.idx.edges      - two-column array of integers
                            containing edge index
      mesh.idx.triangles  - three-column array of integers
                            containing triangle index
      mesh.idx.rectangles - four-column array of integers
                            containing rectangle index
ilya.kuprov@weizmann.ac.il
a.acharya@soton.ac.uk

Outputs

The following fields are added to spin_system object

      mesh.x, mesh.y      - column vectors with vertex
                            coordinates

      mesh.idx.edges      - two-column array of integers
                            containing edge index

      mesh.idx.triangles  - three-column array of integers
                            containing triangle index

      mesh.idx.rectangles - four-column array of integers
                            containing rectangle index

See also

Microfluidic mesh import and plotting


Version 2.8, authors: Anupama Acharya, Ilya Kuprov