Quantcast
Channel: Latest Discussions - COMSOL Forums
Viewing all articles
Browse latest Browse all 5773

COMSOL with matlab how to express "if An object with the given name already exists" in Matlab

$
0
0

Dear somebody who concern, I use COMSOL with matlab to change some parameters to achieve optimization and simulation, but some parameters will make an object(in fact, it is formmesh) disappear, and some parameters will not. Therefore, I need to know how to express "if An object with the given name already exists" in Matlab, to control my optimization and simulation. The error it told me was bellow:

Java exception occurred: 
Exception:
com.comsol.util.exceptions.FlException: An object with the given name already exists
Messages: 已存在指定名称的对象。
- 标记: deform1

Stack trace:
at com.comsol.model.method.ModelEntityListMethod.checkContains(SourceFile:291)
at com.comsol.model.dbmodel.ModelEntityListDb.checkContains(SourceFile:379)
at com.comsol.model.dbmodel.GeomListDb.doCreate(SourceFile:71)
at com.comsol.model.util.DeformedConfigUtil.createDeformedGeom(SourceFile:44)
at com.comsol.post.dataset.bd.a(SourceFile:531)
at com.comsol.post.dataset.ap.createDeformedConfig(SourceFile:591)
at com.comsol.model.method.DatasetFeatureMethod.createDeformedConfig(SourceFile:215)
at com.comsol.model.dbmodel.DatasetFeatureDb.createDeformedConfig(SourceFile:147)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.comsol.bridge.command.b.a(SourceFile:145)
at com.comsol.bridge.command.b.run(SourceFile:90)
at com.comsol.bridge.command.i.execute(SourceFile:45)
at com.comsol.bridge.command.j.d(SourceFile:711)
at com.comsol.bridge.command.j.a(SourceFile:699)
at com.comsol.bridge.command.j$3.a(SourceFile:600)
at com.comsol.bridge.command.j$3.call(SourceFile:1)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

Thank you very much!


Viewing all articles
Browse latest Browse all 5773

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>