CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Edit .C file

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Search this Thread Display Modes
Old   November 28, 2010, 06:54
Question Edit .C file
Usit McCarra
Join Date: Oct 2010
Posts: 51
Blog Entries: 2
Rep Power: 15
McCarra is on a distinguished road
Hello everybody,

How can I edit a .C file? My gedit says [Read-Only].

McCarra is offline   Reply With Quote

Old   November 28, 2010, 10:09
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings JosÚ,

My guess is that you are using Ubuntu 10.04 or 10.10 and have installed the Debian packages of OpenFOAM. If this is the case, the OpenFOAM source code is installed in /opt, which is a system folder and can only be edited using superuser powers, i.e. using sudo or using "su -" to change to the user root.

The proper way of editing OpenFOAM code is to copy the desired library or application into your user area, modifying it for building it in your user space and then doing the desired modifications. See this tutorial: How to add temperature to icoFoam
Also, you can see in the official user guide, this section: Compiling applications and libraries
Either that, or build OpenFOAM from source in your own user space: Source Pack Installation

Best regards,
wyldckat is offline   Reply With Quote


code, edit

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
OF 1.6 | Ubuntu 9.10 (64bit) | GLIBCXX_3.4.11 not found piprus OpenFOAM Installation 22 February 25, 2010 13:43
Version 15 on Mac OS X gschaider OpenFOAM Installation 113 December 2, 2009 10:23
[OpenFOAM] Paraview command not found hardy ParaView 7 September 18, 2008 04:59
Compiling OpenFOAM13 on AMD64 with Redhat Enterprise mbeaudoin OpenFOAM Installation 20 June 17, 2008 06:43
Importing I-DEAS unv file hbetb FLUENT 1 August 10, 2001 13:22

All times are GMT -4. The time now is 04:33.