Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenFOAM module for jCAE #5

Open
wants to merge 52 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
7198641
Remesh refresh
mohittraining Dec 14, 2011
4ccd27a
ViewGroupAction fixed
mohittraining Dec 14, 2011
2c56ab1
ViewGroupAction - Minor change
mohittraining Dec 14, 2011
e93d51b
jCAE linux installer added
Mar 16, 2012
e70adb3
Added installer support for mingw. libgcc_s_sjlj-1.dll and libstdc++-…
mohitgargk Apr 25, 2012
9b1ba88
Installer scripts added
mohitgargk Apr 25, 2012
ff06aae
Windows script renamed
mohitgargk Apr 25, 2012
6bc85b2
Installer scripts moved to folder scripts
Apr 27, 2012
7404733
Unified installer added
Apr 30, 2012
5828ca6
Dependency Check for gcc, mesa-common-dev, libxt-dev, freeglut3-dev u…
May 1, 2012
4eb30af
Make's -J{processors} argument as commandline argument for script
May 1, 2012
1901670
WINEPREFIX for jdk 7 installer on wine
May 1, 2012
9b0c4dc
Netbeans minimal version used
May 1, 2012
3d2b670
oce checked out with stable version 0.9.1
May 1, 2012
8e08185
Bug#216 Restructured script - Components are now reused if already do…
May 1, 2012
398996b
Restructured script - Components are now reused if already downloaded…
May 3, 2012
75a8d20
Windows installer commits issue#216
May 5, 2012
6dfdff8
Single installer script moved to jCAE/scripts
May 5, 2012
dd77166
script/jCAE-auto-installer.sh functional
May 5, 2012
5e42e15
openjdk-7 supported. Issue #217
May 7, 2012
2d40ce0
Patched for 64-bit host and 32 bit cross compiler - g**-mingw-w64-168…
May 7, 2012
8e70e90
Updated prelims notes for dependent packages - g**-mingw-w64-1686. Is…
May 7, 2012
9e3e188
Issue#218 - Compatibility with VTK 5.10 Fixed
May 7, 2012
8e6dad7
Small fix to prevent cloning jCAE again #Issue216
May 7, 2012
090781f
Small fix - Section where zip-distro is copied to ~/jCAE-zipped #Issu…
May 7, 2012
6bacf3d
Xalan link replace, old one is dead now
May 24, 2012
1667af8
vtk and oce build with versionless libraries
May 24, 2012
3cbb3a4
copying libstdc++.so.6 instead of libstdc++.so
May 24, 2012
db6b5db
Version number appended in Zip name
May 24, 2012
a400dd2
Issue #233 - Including LSDyna.dll
May 29, 2012
e856eae
Issue#219 - OracleJDK-7 support tested.
May 29, 2012
58a2f6e
Bug #236 fixed
Jun 2, 2012
0bb3afd
Fetched and merged with Jerome's remote repo
Jun 2, 2012
e4b82ef
Merge branch 'master' of http://github.com/mohitgargk/jCAE
Jun 2, 2012
768514c
If condition corrected
Jun 4, 2012
2011d2d
wine popup avoided
Jun 4, 2012
882f69e
String matching in if conditions fixed
Jun 4, 2012
2815294
checkPackage method fixed
Jun 4, 2012
b3dbfa0
Quilt not required anymore
Jun 4, 2012
9c50dd9
check for gcc prerequisite added
Jun 4, 2012
e8cf9c6
Removed obsolete installer scripts
Jun 4, 2012
330ed77
Check for make as prerequisite
Jun 4, 2012
7701385
VTK-5.10 support
Jun 4, 2012
8a23bb1
Removed unnecessary classes.jsa from JDK
Jun 4, 2012
6417fca
Using ant from netbeans
Jun 8, 2012
5bc5820
[auto-installer] Skipping cloning of jCAE anymore
Jun 12, 2012
a66322b
[auto-installer] JAVA_HOME issue fixed
Jun 12, 2012
57db3a0
[auto-installer] Commented out Java projects(amibe,occjava,vtk-util e…
mohitgargk Jun 15, 2012
1e55c7b
[auto-installer] Jython doc and demo removed
mohitgargk Jun 15, 2012
9c101e1
[auto-installer] Getting jython.bat
mohitgargk Jun 18, 2012
9a61974
[maintenance] Upstream merge
mohitgargk Jun 29, 2012
2066552
[options API] Issue# 235 - Obsolete Options API removed
mohitgargk Jul 24, 2012
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions jcae/core/nbproject/project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -143,14 +143,6 @@
<specification-version>7.12.1.1</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.openide.options</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>6.13.1</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.openide.text</code-name-base>
<build-prerequisite/>
Expand Down
73 changes: 0 additions & 73 deletions jcae/core/src/org/jcae/netbeans/Settings.java

This file was deleted.

9 changes: 0 additions & 9 deletions jcae/core/src/org/jcae/netbeans/Settings.settings

This file was deleted.

10 changes: 0 additions & 10 deletions jcae/core/src/org/jcae/netbeans/layer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -447,16 +447,6 @@
<attr name="SystemFileSystem.localizingBundle" stringvalue="org.jcae.netbeans.Bundle"/>
</file>
</folder>
<file name="org-jcae-netbeans-Settings.settings" url="Settings.settings"/>
</folder>

<folder name="UI">
<folder name="Services">
<folder name="jCAE">
<file name="org-jcae-netbeans-Settings.shadow">
<attr name="originalFile" stringvalue="Services/org-jcae-netbeans-Settings.settings"/>
</file>
</folder>
</folder>
</folder>
</filesystem>
5 changes: 3 additions & 2 deletions jcae/core/src/org/jcae/netbeans/mesh/BuidOEMMAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,15 @@

package org.jcae.netbeans.mesh;

import java.beans.*;
import org.jcae.netbeans.ProcessExecutor;
import org.jcae.netbeans.Utilities;
import org.jcae.netbeans.options.JCAEPanel;
import org.openide.filesystems.FileUtil;
import org.openide.modules.InstalledFileLocator;
import org.openide.nodes.Node;
import org.openide.util.HelpCtx;
import org.openide.util.NbBundle;
import org.openide.util.NbPreferences;
import org.openide.util.actions.CookieAction;

public final class BuidOEMMAction extends CookieAction
Expand All @@ -50,7 +51,7 @@ protected void performAction(Node[] activatedNodes)
getAbsolutePath();

String className="org.jcae.mesh.MeshOEMMIndex";
String[] cmdLinePre=Settings.getDefault().getCommandLineAlgo();
String[] cmdLinePre=NbPreferences.forModule(JCAEPanel.class).get("commandLineAlgo", "").split(" ");
String[] cmdLine=new String[cmdLinePre.length+7];

System.arraycopy(cmdLinePre, 0, cmdLine, 0, cmdLinePre.length);
Expand Down
9 changes: 1 addition & 8 deletions jcae/mesh-algos/nbproject/project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,6 @@
<specification-version>7.12.1.1</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.openide.options</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>6.13.1</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.openide.text</code-name-base>
<build-prerequisite/>
Expand Down Expand Up @@ -180,6 +172,7 @@
<public-packages>
<package>org.jcae.netbeans</package>
<package>org.jcae.netbeans.mesh</package>
<package>org.jcae.netbeans.options</package>
<package>org.jcae.netbeans.viewer3d</package>
<package>org.jcae.netbeans.viewer3d.actions</package>
</public-packages>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import javax.xml.parsers.ParserConfigurationException;
import org.jcae.mesh.xmldata.Group;
import org.jcae.netbeans.viewer3d.ViewManager;
import org.jcae.vtk.AmibeToMesh;
import org.jcae.vtk.View;
import org.openide.explorer.ExplorerManager;
import org.openide.nodes.Node;
Expand All @@ -42,6 +43,8 @@
public abstract class AbstractGroupAction extends CookieAction
{

Node[] temp;

protected int mode()
{
return CookieAction.MODE_ALL;
Expand All @@ -65,6 +68,8 @@ public int compare(Group t, Group t1) {

protected void performAction(Node[] arg0)
{

temp = arg0;
ExplorerManager em = ((ExplorerManager.Provider)
TopComponent.getRegistry().getActivated()).getExplorerManager();
try
Expand All @@ -77,7 +82,9 @@ protected void performAction(Node[] arg0)
{
AmibeDataObject ado = n.getLookup().lookup(AmibeDataObject.class);
if(ado != null && ado.getGroups() != null)
groups2Group.put(n, createTreeSet(ado.getGroups().getGroups()));
{
groups2Group.put(n, createTreeSet(ado.getGroups().getGroups()));
}
}

//GroupNode
Expand Down Expand Up @@ -116,7 +123,68 @@ protected void performAction(Node[] arg0)
}
}

private String[] groupsToID(Collection<Group> groupsToDisplay)
protected void refreshView(Node[] arg0)
{
//ExplorerManager em = ((ExplorerManager.Provider) TopComponent.getRegistry().getActivated()).getExplorerManager();
try
{
HashMap<Node, Collection<Group>> groups2Group = new HashMap<Node, Collection<Group>>();

for(Node n:arg0)
{
AmibeDataObject ado = n.getLookup().lookup(AmibeDataObject.class);
if(ado != null && ado.getGroups() != null)
{
//ado.addListenerFileChange();
groups2Group.put(n, createTreeSet(ado.getGroups().getGroups()));
}
}

//GroupNode
for(Node n:arg0)
{
GroupNode gn = n.getLookup().lookup(GroupNode.class);
if(gn != null)
{
Node amibeNode=n.getParentNode().getParentNode();
Collection<Group> c=groups2Group.get(amibeNode);
if(c==null)
{
c=createTreeSet(gn.getGroup());
groups2Group.put(amibeNode, c);
}
else
c.add(gn.getGroup());
}
}


View v = ViewManager.getDefault().getCurrentView();
for(Entry<Node, Collection<Group>> e:groups2Group.entrySet())
{
String[] groupsToDisplay = groupsToID(e.getValue());
AmibeNViewable interactor = AmibeNViewable.get(e.getKey(), v);
AmibeDataObject ado = e.getKey().getLookup().lookup(AmibeDataObject.class);
if(interactor != null)
{
AmibeToMesh reader = new AmibeToMesh(ado.getGroups().getMeshFile(), groupsToDisplay);
interactor.addTriangles(reader.getTriangles());
interactor.addBeams(reader.getBeams());
v.Render();
}
}
}
catch(IOException ex)
{
Exceptions.printStackTrace(ex);
}
catch(SAXException ex)
{
Exceptions.printStackTrace(ex);
}
}

private String[] groupsToID(Collection<Group> groupsToDisplay)
{
String[] idGroupsDisplayed = new String[groupsToDisplay.size()];
int i = 0;
Expand Down
13 changes: 5 additions & 8 deletions jcae/mesh-algos/src/org/jcae/netbeans/mesh/AlgoAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.TreeSet;
Expand All @@ -36,16 +35,13 @@
import javax.swing.JOptionPane;
import javax.swing.SwingUtilities;
import org.jcae.mesh.JCAEFormatter;
import org.jcae.mesh.xmldata.Group;
import org.jcae.netbeans.options.JCAEPanel;
import org.netbeans.api.progress.ProgressHandle;
import org.netbeans.api.progress.ProgressHandleFactory;
import org.openide.filesystems.FileUtil;
import org.openide.modules.InstalledFileLocator;
import org.openide.nodes.Node;
import org.openide.util.Cancellable;
import org.openide.util.Exceptions;
import org.openide.util.HelpCtx;
import org.openide.util.Utilities;
import org.openide.util.*;
import org.openide.util.actions.CookieAction;
import org.openide.windows.IOProvider;
import org.openide.windows.InputOutput;
Expand Down Expand Up @@ -210,7 +206,7 @@ protected void performAction(Node[] activatedNodes) {
"amibe-python/" + command + ".py",
"org.jcae.netbeans", false);
InputOutput io = IOProvider.getDefault().getIO(getName(), true);
if (Settings.getDefault().isRunInSameJVM())
if (NbPreferences.forModule(JCAEPanel.class).getBoolean("runInSameJVM", true))
runInSameVM(args, pyFile, io);
else
runInOtherVM(activatedNodes[0], args, pyFile, io);
Expand Down Expand Up @@ -277,7 +273,8 @@ private void runInOtherVM(Node node, List<String> args, File pyFile, InputOutput
File f = InstalledFileLocator.getDefault().locate(
"modules/jython/bin/jython" + ext, "org.jcae.netbeans.mesh", false);
pb.command().add(f.getPath());
for (String s : Settings.getDefault().parameters()) {
JCAEPanel j = new JCAEPanel(null);
for (String s : j.parameters()) {
if (s.startsWith("-") && !s.startsWith("-D")) {
s = "-J" + s;
}
Expand Down
Loading