CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > Siemens > STAR-CCM+

Cannot be resolved to a type error in eclipse

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 23, 2018, 21:53
Default Cannot be resolved to a type error in eclipse
  #1
New Member
 
SSSSS
Join Date: Jun 2011
Posts: 29
Rep Power: 15
doctorWho is on a distinguished road
Hi,

I am trying to write a macro with eclipse.

my macro code has the following statements at the begining.
Code:
package macro;

import java.util.*;

import star.common.*;
import star.base.neo.*;
//when jar importing in eclipse, don't add star.meshing.jar cause star.base.jar will take care of it
//for report object
import star.base.report.*;

// turbulence
import star.turbulence.*;
import star.kwturb.*;

// flow
import star.flow.*;
import star.segregatedflow.*;

// material properties
import star.material.*;

// mesh
import star.resurfacer.*;
import star.trimmer.*;
import star.prismmesher.*;
import star.metrics.*;
import star.meshing.*;
also, *.jar required is specified in properties>Libraries>Modulepath as follows:
flow.jar
keturb.jar
kwturb.jar
lesturb.jar
material.jar
metrics.jar
prismmesher.jar
resurfacer.jar
rsturb.jar
saturb.jar
segregatedflow.jar
starbase.jar
trimmer.jar
turbulence.jar

However, code assist of the eclipse make the error, cannot be resolved t a type, for the following statements
Code:
        meshContinuum.getReferenceValues().get(BaseSize.class).setValue(10.0);

        MaximumCellSize maximumCellSize = meshContinuum.getReferenceValues().get(MaximumCellSize.class);
        GenericRelativeSize genericRelativeSize = ((GenericRelativeSize) maximumCellSize.getRelativeSize());
I found the MaximumCellSize, BaseSize is defined in meshing.jar and imported star.meshing.*. I don't have a cluse why it make the error.

Any comment will be helpful.

Thanks in advance.
doctorWho is offline   Reply With Quote

Old   March 26, 2018, 03:56
Default
  #2
Member
 
Join Date: Dec 2017
Posts: 44
Rep Power: 8
tisa is on a distinguished road
First of all: You need to tell us which Version you're using. Because looking in my v12.06, I can't find a Maximum Cell Size option.
Second: You should import the jar files as described in the Users Guide. So you don't need to load every lib separately.
tisa is offline   Reply With Quote

Old   March 26, 2018, 19:13
Default
  #3
New Member
 
SSSSS
Join Date: Jun 2011
Posts: 29
Rep Power: 15
doctorWho is on a distinguished road
AFAI, the above macro is independant on which StarCCM+ version. but FYI, I have tested it in 11.06 and 12.06.
Once you have created mesh continuum with trimmer mesh, you can see Maximum Cell Size node.

In User guide (pp 6231), it advices to get every jar file in the ext directory and so did I.

FYI, without eclipse, I could succefully compile the above macro code with Makefile and javac and the same jar files. So what I wondering is why eclipse is complaining while there is nothing wrong.
doctorWho is offline   Reply With Quote

Old   March 27, 2018, 03:44
Default
  #4
Member
 
Join Date: Dec 2017
Posts: 44
Rep Power: 8
tisa is on a distinguished road
Quote:
Originally Posted by doctorWho View Post
AFAI, the above macro is independant on which StarCCM+ version. but FYI, I have tested it in 11.06 and 12.06.
Once you have created mesh continuum with trimmer mesh, you can see Maximum Cell Size node.

In User guide (pp 6231), it advices to get every jar file in the ext directory and so did I.

FYI, without eclipse, I could succefully compile the above macro code with Makefile and javac and the same jar files. So what I wondering is why eclipse is complaining while there is nothing wrong.
Then maybe here isn't the right place to ask. I get no error using netbeans and your code from above.

And btw: 11.06 and 12.06 using different Java versions. Have you successfully integrated the libraries into your eclipse project?
tisa is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
second order schemes marine OpenFOAM 67 April 11, 2022 19:19
[Other] simulation of closing the gate using moving mesh simin_ds OpenFOAM Meshing & Mesh Conversion 8 April 12, 2019 06:49
Floating point exception error lpz_michele OpenFOAM Running, Solving & CFD 53 October 19, 2015 03:50
singularity? mihaipruna OpenFOAM Running, Solving & CFD 5 April 24, 2012 18:18
Problem with compile the setParabolicInlet ivanyao OpenFOAM Running, Solving & CFD 6 September 5, 2008 21:50


All times are GMT -4. The time now is 02:39.