CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Edit .C file

Register Blogs Community New Posts Updated Threads Search

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

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

thanks
McCarra is offline   Reply With Quote

Old   November 28, 2010, 11:09
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
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,
Bruno
__________________
wyldckat is offline   Reply With Quote

Reply

Tags
code, edit


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 14:43
Version 15 on Mac OS X gschaider OpenFOAM Installation 113 December 2, 2009 11:23
[OpenFOAM] Paraview command not found hardy ParaView 7 September 18, 2008 05:59
Compiling OpenFOAM13 on AMD64 with Redhat Enterprise mbeaudoin OpenFOAM Installation 20 June 17, 2008 07:43
Importing I-DEAS unv file hbetb FLUENT 1 August 10, 2001 14:22


All times are GMT -4. The time now is 14:57.