Loading...
Searching...
No Matches
ITHACAtorch::torch2Foam Namespace Reference

Functions

template<>
torch::Tensor field2Torch (Field< vector > &field)
 
template<>
torch::Tensor field2Torch (Field< scalar > &field)
 
template<>
Field< vector > torch2Field (torch::Tensor &torchTensor)
 
template<>
Field< scalar > torch2Field (torch::Tensor &torchTensor)
 
template<>
torch::Tensor ptrList2Torch (PtrList< Field< vector > > &ptrList)
 
template<>
torch::Tensor ptrList2Torch (PtrList< Field< scalar > > &ptrList)
 
template<class type_f >
PtrList< Field< type_f > > torch2PtrList (torch::Tensor &tTensor)
 
template PtrList< Field< scalar > > torch2PtrList< scalar > (torch::Tensor &tTensor)
 
template PtrList< Field< vector > > torch2PtrList< vector > (torch::Tensor &tTensor)
 
template<class type_f >
torch::Tensor field2Torch (Field< type_f > &field)
 Convert an OpenFOAM field to a torch tensor, in case of field<vector> the tensor is arranged as t = [fx;fy;fz].
 
template<class type_f >
Field< type_f > torch2Field (torch::Tensor &tTensor)
 Convert an Torch TensorOpenFOAM to an OpenFoam Field.
 
template<class type_f >
torch::Tensor ptrList2Torch (PtrList< type_f > &ptrList)
 

Function Documentation

◆ field2Torch() [1/3]

template<>
torch::Tensor ITHACAtorch::torch2Foam::field2Torch ( Field< scalar > & field)

Definition at line 49 of file torch2Foam.C.

◆ field2Torch() [2/3]

template<class type_f >
torch::Tensor ITHACAtorch::torch2Foam::field2Torch ( Field< type_f > & field)

Convert an OpenFOAM field to a torch tensor, in case of field<vector> the tensor is arranged as t = [fx;fy;fz].

Parameters
fieldThe field
Template Parameters
type_ftype can be scalar or vector
Returns
the torch tensor

◆ field2Torch() [3/3]

template<>
torch::Tensor ITHACAtorch::torch2Foam::field2Torch ( Field< vector > & field)

Definition at line 39 of file torch2Foam.C.

◆ ptrList2Torch() [1/3]

template<>
torch::Tensor ITHACAtorch::torch2Foam::ptrList2Torch ( PtrList< Field< scalar > > & ptrList)

Definition at line 102 of file torch2Foam.C.

◆ ptrList2Torch() [2/3]

template<>
torch::Tensor ITHACAtorch::torch2Foam::ptrList2Torch ( PtrList< Field< vector > > & ptrList)

Definition at line 87 of file torch2Foam.C.

◆ ptrList2Torch() [3/3]

template<class type_f >
torch::Tensor ITHACAtorch::torch2Foam::ptrList2Torch ( PtrList< type_f > & ptrList)

◆ torch2Field() [1/3]

template<>
Field< vector > ITHACAtorch::torch2Foam::torch2Field ( torch::Tensor & torchTensor)

Definition at line 59 of file torch2Foam.C.

◆ torch2Field() [2/3]

template<>
Field< scalar > ITHACAtorch::torch2Foam::torch2Field ( torch::Tensor & torchTensor)

Definition at line 73 of file torch2Foam.C.

◆ torch2Field() [3/3]

template<class type_f >
Field< type_f > ITHACAtorch::torch2Foam::torch2Field ( torch::Tensor & tTensor)

Convert an Torch TensorOpenFOAM to an OpenFoam Field.

Parameters
tTensorThe Torch tensor
Template Parameters
type_ftype can be scalar or vector
Returns
the OF field

◆ torch2PtrList()

template<class type_f >
PtrList< Field< type_f > > ITHACAtorch::torch2Foam::torch2PtrList ( torch::Tensor & tTensor)

Definition at line 117 of file torch2Foam.C.

◆ torch2PtrList< scalar >()

template PtrList< Field< scalar > > ITHACAtorch::torch2Foam::torch2PtrList< scalar > ( torch::Tensor & tTensor)

◆ torch2PtrList< vector >()

template PtrList< Field< vector > > ITHACAtorch::torch2Foam::torch2PtrList< vector > ( torch::Tensor & tTensor)