Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.
Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.
Is it possible to use several model objects in the Matlab workspace?
Posted 6 mars 2011, 07:42 UTC−5 Interfacing Version 4.1, Version 4.2, Version 4.2a, Version 4.3 3 Replies
Please login with a confirmed email address before reporting spam
Hello,
did somebody already use several Comsol 4.1 model objects in the Matlab Workspace? (I do not want to
add model objects to a parent model object.)
In Comsol 3.5a I could save all my resulting fem structures (from a batch simulation) in a Matlab structure.
dat.fems{1,1} = fem1
dat.fems{1,2} = fem2
...
If I try to work with several Comsol 4.1 model objects, I get the error message attached below. Do I have to somehow trigger/update the "ModelUtil" or the "com.comsol.model.clientserver" if i want to change the current model ?
Here is an example workflow:
- create modelA and save it in the Matlab workspace as dat.modelA
- create modelB and save it in the Matlab workspace as dat.modelB
- try to save dat.modelA with dat.modelA.save('test.mph')
=> error:
??? Java exception occurred:
Exception:
org.eclipse.net4j.util.transaction.TransactionException: java.lang.NullPointerException
(rethrown as com.comsol.util.exceptions.FlException)
Messages:
Error during client transaction
Stack trace:
at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.commit(CDOTransactionImpl.java:642)
at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.commit(CDOTransactionImpl.java:653)
at com.comsol.model.clientserver.ClientManagerImpl.commit(Unknown Source)
at com.comsol.model.clientserver.ClientManagerImpl.a(Unknown Source)
at com.comsol.model.clientserver.ClientManagerImpl.runServerJob(Unknown Source)
at com.comsol.model.impl.SolverSequenceImpl.getSize(Unknown Source)
Caused by: java.lang.NullPointerException
at org.eclipse.emf.internal.cdo.util.FSMUtil.adapt(FSMUtil.java:119)
at org.eclipse.emf.cdo.eresource.impl.CDOResourceImpl.getURIFragment(CDOResourceImpl.java:571)
at org.eclipse.emf.ecore.util.EcoreUtil.getURI(EcoreUtil.java:2899)
at org.eclipse.emf.internal.cdo.view.CDOViewImpl.provideCDOID(CDOViewImpl.java:933)
at org.eclipse.emf.cdo.spi.common.revision.AbstractCDORevision.writeValues(AbstractCDORevision.java:653)
at org.eclipse.emf.cdo.spi.common.revision.AbstractCDORevision.write(AbstractCDORevision.java:168)
at org.eclipse.emf.cdo.internal.common.io.CDODataOutputImpl.writeCDORevision(CDODataOutputImpl.java:160)
at
org.eclipse.emf.internal.cdo.net4j.protocol.CommitTransactionRequest.writeRevisions(CommitTransactionRequest.java:313)
at
org.eclipse.emf.internal.cdo.net4j.protocol.CommitTransactionRequest.requestingCommit(CommitTransactionRequest.java:215)
at org.eclipse.emf.internal.cdo.net4j.protocol.CommitTransactionRequest.requesting(CommitTransactionRequest.java:163)
at org.eclipse.emf.internal.cdo.net4j.protocol.CommitTransactionRequest.requesting(CommitTransactionRequest.java:103)
at org.eclipse.net4j.signal.RequestWithMonitoring.requesting(RequestWithMonitoring.java:163)
at org.eclipse.net4j.signal.RequestWithConfirmation.doExtendedOutput(RequestWithConfirmation.java:117)
at org.eclipse.net4j.signal.Signal.doOutput(Signal.java:281)
at org.eclipse.net4j.signal.RequestWithConfirmation.doExecute(RequestWithConfirmation.java:102)
at org.eclipse.net4j.signal.RequestWithMonitoring.doExecute(RequestWithMonitoring.java:233)
at org.eclipse.net4j.signal.SignalActor.execute(SignalActor.java:66)
at org.eclipse.net4j.signal.Signal.runSync(Signal.java:238)
at org.eclipse.net4j.signal.SignalProtocol.startSignal(SignalProtocol.java:427)
at org.eclipse.net4j.signal.RequestWithConfirmation.doSend(RequestWithConfirmation.java:87)
at org.eclipse.net4j.signal.RequestWithConfirmation.send(RequestWithConfirmation.java:73)
at org.eclipse.net4j.signal.RequestWithMonitoring.send(RequestWithMonitoring.java:108)
at org.eclipse.emf.internal.cdo.net4j.protocol.CDOClientProtocol.send(CDOClientProtocol.java:302)
at org.eclipse.emf.internal.cdo.net4j.protocol.CDOClientProtocol.commitTransaction(CDOClientProtocol.java:220)
at
org.eclipse.emf.internal.cdo.transaction.CDOSingleTransactionStrategyImpl.commit(CDOSingleTransactionStrategyImpl.java:58)
at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.commit(CDOTransactionImpl.java:626)
... 5 more
did somebody already use several Comsol 4.1 model objects in the Matlab Workspace? (I do not want to
add model objects to a parent model object.)
In Comsol 3.5a I could save all my resulting fem structures (from a batch simulation) in a Matlab structure.
dat.fems{1,1} = fem1
dat.fems{1,2} = fem2
...
If I try to work with several Comsol 4.1 model objects, I get the error message attached below. Do I have to somehow trigger/update the "ModelUtil" or the "com.comsol.model.clientserver" if i want to change the current model ?
Here is an example workflow:
- create modelA and save it in the Matlab workspace as dat.modelA
- create modelB and save it in the Matlab workspace as dat.modelB
- try to save dat.modelA with dat.modelA.save('test.mph')
=> error:
??? Java exception occurred:
Exception:
org.eclipse.net4j.util.transaction.TransactionException: java.lang.NullPointerException
(rethrown as com.comsol.util.exceptions.FlException)
Messages:
Error during client transaction
Stack trace:
at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.commit(CDOTransactionImpl.java:642)
at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.commit(CDOTransactionImpl.java:653)
at com.comsol.model.clientserver.ClientManagerImpl.commit(Unknown Source)
at com.comsol.model.clientserver.ClientManagerImpl.a(Unknown Source)
at com.comsol.model.clientserver.ClientManagerImpl.runServerJob(Unknown Source)
at com.comsol.model.impl.SolverSequenceImpl.getSize(Unknown Source)
Caused by: java.lang.NullPointerException
at org.eclipse.emf.internal.cdo.util.FSMUtil.adapt(FSMUtil.java:119)
at org.eclipse.emf.cdo.eresource.impl.CDOResourceImpl.getURIFragment(CDOResourceImpl.java:571)
at org.eclipse.emf.ecore.util.EcoreUtil.getURI(EcoreUtil.java:2899)
at org.eclipse.emf.internal.cdo.view.CDOViewImpl.provideCDOID(CDOViewImpl.java:933)
at org.eclipse.emf.cdo.spi.common.revision.AbstractCDORevision.writeValues(AbstractCDORevision.java:653)
at org.eclipse.emf.cdo.spi.common.revision.AbstractCDORevision.write(AbstractCDORevision.java:168)
at org.eclipse.emf.cdo.internal.common.io.CDODataOutputImpl.writeCDORevision(CDODataOutputImpl.java:160)
at
org.eclipse.emf.internal.cdo.net4j.protocol.CommitTransactionRequest.writeRevisions(CommitTransactionRequest.java:313)
at
org.eclipse.emf.internal.cdo.net4j.protocol.CommitTransactionRequest.requestingCommit(CommitTransactionRequest.java:215)
at org.eclipse.emf.internal.cdo.net4j.protocol.CommitTransactionRequest.requesting(CommitTransactionRequest.java:163)
at org.eclipse.emf.internal.cdo.net4j.protocol.CommitTransactionRequest.requesting(CommitTransactionRequest.java:103)
at org.eclipse.net4j.signal.RequestWithMonitoring.requesting(RequestWithMonitoring.java:163)
at org.eclipse.net4j.signal.RequestWithConfirmation.doExtendedOutput(RequestWithConfirmation.java:117)
at org.eclipse.net4j.signal.Signal.doOutput(Signal.java:281)
at org.eclipse.net4j.signal.RequestWithConfirmation.doExecute(RequestWithConfirmation.java:102)
at org.eclipse.net4j.signal.RequestWithMonitoring.doExecute(RequestWithMonitoring.java:233)
at org.eclipse.net4j.signal.SignalActor.execute(SignalActor.java:66)
at org.eclipse.net4j.signal.Signal.runSync(Signal.java:238)
at org.eclipse.net4j.signal.SignalProtocol.startSignal(SignalProtocol.java:427)
at org.eclipse.net4j.signal.RequestWithConfirmation.doSend(RequestWithConfirmation.java:87)
at org.eclipse.net4j.signal.RequestWithConfirmation.send(RequestWithConfirmation.java:73)
at org.eclipse.net4j.signal.RequestWithMonitoring.send(RequestWithMonitoring.java:108)
at org.eclipse.emf.internal.cdo.net4j.protocol.CDOClientProtocol.send(CDOClientProtocol.java:302)
at org.eclipse.emf.internal.cdo.net4j.protocol.CDOClientProtocol.commitTransaction(CDOClientProtocol.java:220)
at
org.eclipse.emf.internal.cdo.transaction.CDOSingleTransactionStrategyImpl.commit(CDOSingleTransactionStrategyImpl.java:58)
at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.commit(CDOTransactionImpl.java:626)
... 5 more
3 Replies Last Post 29 sept. 2012, 14:09 UTC−4