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

help compiling AddBoundaryDiag

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 21, 2015, 10:26
Default help compiling AddBoundaryDiag
  #1
New Member
 
Join Date: Oct 2015
Posts: 15
Rep Power: 11
martel is on a distinguished road
Hi all,

I am trying to se the effect of the boundary conditions on the matrix diagonal coefficients for a very simple laplacian operator.

I use this simple code:

Code:
// Define a matrix that contains the coefficients of the Laplacian
    tmp<fvScalarMatrix> TEqnLaplaciano 
	  ( 
	   fvm::laplacian(DT,T) 
	    ); 

// Add BC contribution to matrix diagonal 
     scalarField& diag    = TEqnLaplaciano().diag();
     TEqnLaplaciano().addBoundaryDiag(diag,0);
But it does not compile. I get the compilation error:
Code:
In file included from /opt/openfoam240/src/finiteVolume/lnInclude/fvMatrix.H:1058:0,
                 from /opt/openfoam240/src/finiteVolume/lnInclude/ddtScheme.C:29,
                 from /opt/openfoam240/src/finiteVolume/lnInclude/ddtScheme.H:325,
                 from /opt/openfoam240/src/finiteVolume/lnInclude/fvcDdt.C:28,
                 from /opt/openfoam240/src/finiteVolume/lnInclude/fvcDdt.H:199,
                 from /opt/openfoam240/src/finiteVolume/lnInclude/fvc.H:44,
                 from /opt/openfoam240/src/finiteVolume/lnInclude/fvCFD.H:8,
                 from laplacianFoam.C:32:
/opt/openfoam240/src/finiteVolume/lnInclude/fvMatrix.C: In function ‘int main(int, char**)’:
/opt/openfoam240/src/finiteVolume/lnInclude/fvMatrix.C:116:6: error: ‘void Foam::fvMatrix<Type>::addBoundaryDiag(Foam::scalarField&, Foam::direction) const [with Type = double; Foam::scalarField = Foam::Field<double>; Foam::direction = unsigned char]’ is protected
 void Foam::fvMatrix<Type>::addBoundaryDiag
      ^
laplacianFoam.C:54:45: error: within this context
      TEqnLaplaciano().addBoundaryDiag(diag,0);
                                             ^
Related to some variables protected (??). And I don't know how to solve this protection problem.

Any help would be greatly welcome

Regards,

--CME
martel 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
Problem with Compiling UDFs in Ansys Fluent 13 (lnx64) Ali.beh Fluent UDF and Scheme Programming 3 August 27, 2018 05:22
[OpenFOAM.org] Trouble Compiling OpenFOAM-dev using Intel Compiler 15 for use on Xeon Phi foamer123 OpenFOAM Installation 9 August 20, 2015 15:03
compiling problem of a mass transfer udf majid_kamyab FLUENT 9 October 15, 2014 11:18
Help with KIVA4 source code compiling geothokar Main CFD Forum 0 September 3, 2010 06:40
Discussing UDF and C++ Compiling Big Stone FLUENT 9 April 12, 2004 16:07


All times are GMT -4. The time now is 05:30.