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

Error while implementing own tensor volume field.

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 22, 2020, 06:36
Default Error while implementing own tensor volume field.
  #1
New Member
 
Matias Haapalehto
Join Date: Jun 2020
Posts: 3
Rep Power: 6
haapalm is on a distinguished road
Hi,
I have implemented my own rank 4 tensor class (i.e. tensorRank4) , and I added these typedefs to (naively?) create volume fields:

Code:
typedef GeometricField<tensorRank4, fvPatchField, volMesh> volTensorRank4Field;
typedef dimensioned<tensorRank4> dimensionedTensorRank4;
When I try to instantiate the field using:
Code:
volTensorRank4Field a4
        (
         IOobject
         (
          "a4",
          runTime.timeName(),
          mesh,
          IOobject::NO_READ,
          IOobject::AUTO_WRITE
         ),
         mesh,
         dimensionedTensorRank4("a4", dimensionSet(0,0,0,0,0,0,0), 
             tensorRank4::zero)
        );
I get these compilation erros:
Code:
error: no match for call to ‘(const Foam::fvPatchFieldMapper) (Foam::fvPatchField<Foam::TensorRank4<double> >&, Foam::fvPatchField<Foam::TensorRank4<double> >&)’
  213 |     mapper(*this, *this);
      |     ~~~~~~^~~~~~~~~~~~~~
And
Code:
/scratch/work/haapalm3/OpenFOAM-7/src/finiteVolume/lnInclude/fvPatchField.C:213:11: note:   ‘Foam::fvPatchField<Foam::TensorRank4<double> >’ is not derived from ‘const Foam::tmp<Foam::Field<Type> >’
  213 |     mapper(*this, *this);
      |     ~~~~~~^~~~~~~~~~~~~~
haapalm 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
simpleDyMFoam on v1806 gamemakerh OpenFOAM Programming & Development 0 November 8, 2018 09:15
potential flows, helmholtz decomposition and other stuffs pigna Main CFD Forum 1 October 26, 2017 09:34
Steady simulation does not iterate in Time=1 agustinvo OpenFOAM Running, Solving & CFD 3 November 19, 2015 05:57
[General] How to create an additional vector with {Field 4, Field 5, Field 6} Bombacar ParaView 1 August 15, 2015 19:05
Demagnetization field jan0385 ANSYS 0 April 12, 2012 10:09


All times are GMT -4. The time now is 03:52.