Hi,
I have been using COMSOL previously. Now I want to compare results from COMSOL to those computed in FeniCS. I would like to work with a solution from COMSOL in the same way as with the FeniCS result for example for comparison purposes or even visualization.
I think it would be vital if there is the way how to manually fill the Function object with the data for particular DOF base functions. If I will obtain DOF related values with proper ordering and if I am able to export mesh and specify correctly function space, how I can fill up the Function object with the data?
In the manual http://fenicsproject.org/documentation/dolfin/dev/python/programmers-reference/cpp/function/Function.html there is a section
Function(V, filename)
Create function from vector of dofs stored to file
Arguments
V (FunctionSpace)
The function space.
filename_vector (str)
The name of the file containing the vector.
filename_dofdata (str)
The name of the file containing the dofmap data.
I do not know what is the proper structure of the file which could be used as a argument for this constructor? In C++ this function is probably that with a signature
Function::Function(const FunctionSpace& V, std::string filename)
: Hierarchical<Function>(*this),
_function_space(reference_to_no_delete_pointer(V)),
allow_extrapolation(dolfin::parameters["allow_extrapolation"])
maybe it is also possible to use function
Function::Function(boost::shared_ptr<const FunctionSpace> V, boost::shared_ptr<GenericVector> x) function
What is a proper format of the file to pass to the constructor? Can I save this file somehow from my solution object? What is a DOF ordering in boost::shared_ptr x? Is it possible to do all the operations also from Python?
Thanks Vojtech.