<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[What is the proper workflow for generating unstructured&#x2F;multidomain meshes?]]></title><description><![CDATA[<p dir="auto">Hello! I've been working with the Python API for a while now primarily using voxelling and grid settings for structured solvers. Does the Python API support unstructured, multidomain meshing and unstructured solvers? If so, assuming I already have a model object that I want to mesh, what is the proper workflow to do so?</p>
<p dir="auto">Thanks!</p>
]]></description><link>https://forum.zmt.swiss/topic/478/what-is-the-proper-workflow-for-generating-unstructured-multidomain-meshes</link><generator>RSS for Node</generator><lastBuildDate>Wed, 11 Mar 2026 04:06:23 GMT</lastBuildDate><atom:link href="https://forum.zmt.swiss/topic/478.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 28 Jul 2022 18:12:19 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to What is the proper workflow for generating unstructured&#x2F;multidomain meshes? on Thu, 28 Jul 2022 18:21:22 GMT]]></title><description><![CDATA[<p dir="auto">Nevermind, I found example code in the "tutorial_emlf_unstructured_neuron_electroceuticals.py" example file, see below:</p>
<pre><code>def CreateMesh():
	""" Creates a Multidomain Mesh with predefined priorities between domains
        and specified global and local options                        	"""

	sel=.05  # Suface Edge Length
	mel=.002 # Min Edge Length
	
	#create multi-domain mesh
	global_opt = xcm.GlobalUnstructuredMeshingOptions()
	global_opt.SurfaceEdgeLength = sel
	global_opt.MinEdgeLength = mel

	# Gets all the entities in the folder 'Nerve_Model'	
	entities=s4l.model.AllEntities()['Nerve_Model'].Entities
	
	local_opt_dict={}
	for ent in entities:
		local_opt = xcm.LocalUnstructuredMeshingOptions()
		print((ent, ent.Name))
		if 'Saline' in ent.Name :
			local_opt.Priority=0
		elif 'Silicone' in ent.Name :
			local_opt.Priority=1
		elif 'Electrode' in ent.Name :
			local_opt.Priority=2
		elif 'Nerve' in ent.Name :
			local_opt.Priority=3
		elif 'Interstitial' in ent.Name :
			local_opt.Priority=4
		elif 'Connective' == ent.Name :
			local_opt.Priority=5
		elif 'Connective_' in ent.Name :
			local_opt.Priority=5
		elif 'Blood' in ent.Name :
			local_opt.Priority=6	
		elif 'Fascicle' in ent.Name :
			local_opt.Priority=7
		local_opt_dict[ent]=local_opt	
		print((local_opt.Priority))
		
	# Creates an unstructured mesh on the domains using the defined options
	mesh = xcm.GenerateUnstructuredMesh(entities, global_opt, local_opt_dict)
	
	return
</code></pre>
<p dir="auto">I did have a followup, how do we optimize the surface edge length and minimum edge lengths?</p>
]]></description><link>https://forum.zmt.swiss/post/1447</link><guid isPermaLink="true">https://forum.zmt.swiss/post/1447</guid><dc:creator><![CDATA[david_lloyd]]></dc:creator><pubDate>Thu, 28 Jul 2022 18:21:22 GMT</pubDate></item></channel></rss>